batchfetch 1.2.3__tar.gz → 1.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {batchfetch-1.2.3 → batchfetch-1.2.4}/PKG-INFO +1 -1
- {batchfetch-1.2.3 → batchfetch-1.2.4}/batchfetch/batchfetch_git.py +34 -34
- {batchfetch-1.2.3 → batchfetch-1.2.4}/batchfetch.egg-info/PKG-INFO +1 -1
- {batchfetch-1.2.3 → batchfetch-1.2.4}/setup.py +1 -1
- {batchfetch-1.2.3 → batchfetch-1.2.4}/LICENSE +0 -0
- {batchfetch-1.2.3 → batchfetch-1.2.4}/README.md +0 -0
- {batchfetch-1.2.3 → batchfetch-1.2.4}/batchfetch/__init__.py +0 -0
- {batchfetch-1.2.3 → batchfetch-1.2.4}/batchfetch/batchfetch_base.py +0 -0
- {batchfetch-1.2.3 → batchfetch-1.2.4}/batchfetch/batchfetch_cli.py +0 -0
- {batchfetch-1.2.3 → batchfetch-1.2.4}/batchfetch/helpers.py +0 -0
- {batchfetch-1.2.3 → batchfetch-1.2.4}/batchfetch.egg-info/SOURCES.txt +0 -0
- {batchfetch-1.2.3 → batchfetch-1.2.4}/batchfetch.egg-info/dependency_links.txt +0 -0
- {batchfetch-1.2.3 → batchfetch-1.2.4}/batchfetch.egg-info/entry_points.txt +0 -0
- {batchfetch-1.2.3 → batchfetch-1.2.4}/batchfetch.egg-info/requires.txt +0 -0
- {batchfetch-1.2.3 → batchfetch-1.2.4}/batchfetch.egg-info/top_level.txt +0 -0
- {batchfetch-1.2.3 → batchfetch-1.2.4}/setup.cfg +0 -0
|
@@ -118,8 +118,8 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
118
118
|
else:
|
|
119
119
|
update_type = "UPDATE"
|
|
120
120
|
|
|
121
|
-
self.add_output(f"[GIT {update_type}] {self[self.main_key]}"
|
|
122
|
-
(f" (Ref: {self['revision']})"
|
|
121
|
+
self.add_output(f"[GIT {update_type}] {self[self.main_key]}"
|
|
122
|
+
+ (f" (Ref: {self['revision']})"
|
|
123
123
|
if self["revision"] else "") + "\n")
|
|
124
124
|
|
|
125
125
|
try:
|
|
@@ -138,7 +138,7 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
138
138
|
self._repo_fix_remote_origin()
|
|
139
139
|
self._run_pre_exec(cwd=self.git_local_dir)
|
|
140
140
|
|
|
141
|
-
self._repo_reset()
|
|
141
|
+
# self._repo_reset()
|
|
142
142
|
|
|
143
143
|
git_fetch_done = self._repo_fetch()
|
|
144
144
|
|
|
@@ -160,10 +160,10 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
160
160
|
except subprocess.CalledProcessError as err:
|
|
161
161
|
self.set_error(True)
|
|
162
162
|
self.add_output(self.indent_spaces + "[ERROR] " + str(err) + "\n")
|
|
163
|
-
self.add_output(self.indent_spaces
|
|
164
|
-
textwrap.indent(err.stdout, " " * self.indent)
|
|
165
|
-
"\n"
|
|
166
|
-
textwrap.indent(err.stderr, " " * self.indent))
|
|
163
|
+
self.add_output(self.indent_spaces
|
|
164
|
+
+ textwrap.indent(err.stdout, " " * self.indent)
|
|
165
|
+
+ "\n"
|
|
166
|
+
+ textwrap.indent(err.stderr, " " * self.indent))
|
|
167
167
|
|
|
168
168
|
if not self.is_error() and not self.is_changed():
|
|
169
169
|
self.add_output(self.indent_spaces + "[INFO] Nothing to do.\n")
|
|
@@ -203,8 +203,8 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
203
203
|
# directly to a commit. You need to resolve it to the
|
|
204
204
|
# commit it points to. Using `git rev-parse
|
|
205
205
|
# <tagname>^{commit}` allows getting the right revision.
|
|
206
|
-
commit_ref = self._git_tags(self["revision"]
|
|
207
|
-
"^{commit}")[0]
|
|
206
|
+
commit_ref = self._git_tags(self["revision"]
|
|
207
|
+
+ "^{commit}")[0]
|
|
208
208
|
self.branch_commit_ref = commit_ref.strip()
|
|
209
209
|
except GitRevisionDoesNotExist:
|
|
210
210
|
pass
|
|
@@ -214,15 +214,15 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
214
214
|
self.add_output(self.indent_spaces + "[INFO] Already deleted\n")
|
|
215
215
|
elif not self.git_local_dir.joinpath(".git").is_dir():
|
|
216
216
|
self.add_output(
|
|
217
|
-
self.indent_spaces
|
|
218
|
-
f"# Cannot be deleted because '{self.git_local_dir}' is "
|
|
217
|
+
self.indent_spaces
|
|
218
|
+
+ f"# Cannot be deleted because '{self.git_local_dir}' is "
|
|
219
219
|
"not a Git repository\n"
|
|
220
220
|
)
|
|
221
221
|
self.set_error(True)
|
|
222
222
|
elif self.git_local_dir.is_dir():
|
|
223
223
|
shutil.rmtree(str(self.git_local_dir))
|
|
224
|
-
self.add_output(self.indent_spaces
|
|
225
|
-
f"[INFO] Deleted: '{self.git_local_dir}'")
|
|
224
|
+
self.add_output(self.indent_spaces
|
|
225
|
+
+ f"[INFO] Deleted: '{self.git_local_dir}'")
|
|
226
226
|
self.set_changed(True)
|
|
227
227
|
|
|
228
228
|
def _repo_clone(self):
|
|
@@ -246,9 +246,9 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
246
246
|
do_git_fetch = True
|
|
247
247
|
elif not self["revision"]:
|
|
248
248
|
do_git_fetch = True
|
|
249
|
-
self.add_output(self.indent_spaces
|
|
250
|
-
"[INFO] Git fetch origin reason: "
|
|
251
|
-
"No 'revision:' specified\n")
|
|
249
|
+
self.add_output(self.indent_spaces
|
|
250
|
+
+ "[INFO] Git fetch origin reason: "
|
|
251
|
+
+ "No 'revision:' specified\n")
|
|
252
252
|
else:
|
|
253
253
|
do_git_fetch = False
|
|
254
254
|
commit_ref = None
|
|
@@ -264,10 +264,10 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
264
264
|
if not commit_ref and not self.is_branch:
|
|
265
265
|
do_git_fetch = True
|
|
266
266
|
self.add_output(
|
|
267
|
-
self.indent_spaces
|
|
268
|
-
"[INFO] Git fetch origin reason: "
|
|
269
|
-
f"The revision does not exist: {self['revision']}"
|
|
270
|
-
"\n")
|
|
267
|
+
self.indent_spaces
|
|
268
|
+
+ "[INFO] Git fetch origin reason: "
|
|
269
|
+
+ f"The revision does not exist: {self['revision']}"
|
|
270
|
+
+ "\n")
|
|
271
271
|
|
|
272
272
|
if not do_git_fetch:
|
|
273
273
|
try:
|
|
@@ -276,10 +276,10 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
276
276
|
f"refs/heads/{self['revision']}"]
|
|
277
277
|
run_simple(cmd, env=self.env, cwd=self.git_local_dir)
|
|
278
278
|
self.add_output(
|
|
279
|
-
self.indent_spaces
|
|
280
|
-
"[INFO] Git fetch origin reason: "
|
|
281
|
-
f"{self['revision']} is a branch, not a tag"
|
|
282
|
-
"\n")
|
|
279
|
+
self.indent_spaces
|
|
280
|
+
+ "[INFO] Git fetch origin reason: "
|
|
281
|
+
+ f"{self['revision']} is a branch, not a tag"
|
|
282
|
+
+ "\n")
|
|
283
283
|
do_git_fetch = True
|
|
284
284
|
except subprocess.CalledProcessError:
|
|
285
285
|
pass
|
|
@@ -302,8 +302,8 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
302
302
|
# Or the commit ref of HEAD hasn't changed
|
|
303
303
|
if not commit_ref_head or commit_ref_head != commit_ref:
|
|
304
304
|
self.add_output(
|
|
305
|
-
self.indent_spaces
|
|
306
|
-
"[INFO] Git fetch origin reason: "
|
|
305
|
+
self.indent_spaces
|
|
306
|
+
+ "[INFO] Git fetch origin reason: "
|
|
307
307
|
f"Commit ref head '{commit_ref_head}' != "
|
|
308
308
|
f"commit ref '{commit_ref_head}'"
|
|
309
309
|
"\n")
|
|
@@ -429,9 +429,9 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
429
429
|
# branch is a commit revision instead of a tag
|
|
430
430
|
try:
|
|
431
431
|
# Check if the branch exists
|
|
432
|
-
git_ref_branch = self._git_tags("origin/"
|
|
433
|
-
self["revision"]
|
|
434
|
-
"^{commit}")[0]
|
|
432
|
+
git_ref_branch = self._git_tags("origin/"
|
|
433
|
+
+ self["revision"]
|
|
434
|
+
+ "^{commit}")[0]
|
|
435
435
|
except GitRevisionDoesNotExist:
|
|
436
436
|
# Check if the commit ref exists
|
|
437
437
|
try:
|
|
@@ -445,9 +445,9 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
445
445
|
# Update the branch
|
|
446
446
|
self._run(["git", "checkout"] + [self["revision"]],
|
|
447
447
|
cwd=str(self.git_local_dir), env=self.env)
|
|
448
|
-
self.add_output(self.indent_spaces
|
|
449
|
-
"[INFO] Branch changed to "
|
|
450
|
-
self["revision"] + "\n")
|
|
448
|
+
self.add_output(self.indent_spaces
|
|
449
|
+
+ "[INFO] Branch changed to "
|
|
450
|
+
+ self["revision"] + "\n")
|
|
451
451
|
self.set_changed(True)
|
|
452
452
|
branch_changed = True
|
|
453
453
|
|
|
@@ -503,8 +503,8 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
503
503
|
if self.current_branch:
|
|
504
504
|
try:
|
|
505
505
|
self.add_output(
|
|
506
|
-
self.indent_spaces
|
|
507
|
-
"[INFO] Git fetch origin reason: "
|
|
506
|
+
self.indent_spaces
|
|
507
|
+
+ "[INFO] Git fetch origin reason: "
|
|
508
508
|
f"we need to set the upstream "
|
|
509
509
|
f"origin to {self.current_branch}"
|
|
510
510
|
"\n"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|