batchfetch 1.1.7__tar.gz → 1.1.8__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.1.7/batchfetch.egg-info → batchfetch-1.1.8}/PKG-INFO +1 -1
- {batchfetch-1.1.7 → batchfetch-1.1.8}/batchfetch/batchfetch_git.py +42 -41
- {batchfetch-1.1.7 → batchfetch-1.1.8/batchfetch.egg-info}/PKG-INFO +1 -1
- {batchfetch-1.1.7 → batchfetch-1.1.8}/setup.py +1 -1
- {batchfetch-1.1.7 → batchfetch-1.1.8}/.gitignore +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/LICENSE +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/README.md +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/batchfetch/__init__.py +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/batchfetch/batchfetch_base.py +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/batchfetch/batchfetch_cli.py +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/batchfetch/helpers.py +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/batchfetch.egg-info/SOURCES.txt +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/batchfetch.egg-info/dependency_links.txt +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/batchfetch.egg-info/entry_points.txt +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/batchfetch.egg-info/requires.txt +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/batchfetch.egg-info/top_level.txt +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/run_tests.sh +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/setup.cfg +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/tests/data/test-md5sum.txt +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/tests/data/test-run_simple.sh +0 -0
- {batchfetch-1.1.7 → batchfetch-1.1.8}/tests/test_helpers.py +0 -0
|
@@ -136,8 +136,7 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
136
136
|
|
|
137
137
|
git_merge_done = self._repo_pull()
|
|
138
138
|
git_branch_changed = False
|
|
139
|
-
|
|
140
|
-
git_branch_changed = self._repo_fix_branch()
|
|
139
|
+
git_branch_changed = self._repo_fix_branch()
|
|
141
140
|
|
|
142
141
|
if git_merge_done or git_branch_changed:
|
|
143
142
|
self._repo_update_submodules()
|
|
@@ -254,50 +253,52 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
254
253
|
pass
|
|
255
254
|
|
|
256
255
|
if not commit_ref and not self.is_branch:
|
|
256
|
+
do_git_pull = True
|
|
257
257
|
self.add_output(
|
|
258
258
|
self.indent_spaces +
|
|
259
|
-
"[INFO] Git fetch origin reason:" +
|
|
259
|
+
"[INFO] Git fetch origin reason: " +
|
|
260
260
|
f"The reference does not exist: {self['reference']}" +
|
|
261
261
|
"\n")
|
|
262
262
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
263
|
+
if not do_git_pull:
|
|
264
|
+
try:
|
|
265
|
+
# Check if the branch is a tag or a branch
|
|
266
|
+
cmd = ["git", "show-ref", "--verify", "--quiet",
|
|
267
|
+
f"refs/heads/{self['reference']}"]
|
|
268
|
+
run_simple(cmd, env=self.env, cwd=self.git_local_dir)
|
|
269
|
+
self.add_output(
|
|
270
|
+
self.indent_spaces +
|
|
271
|
+
"[INFO] Git fetch origin reason:" +
|
|
272
|
+
f"{self['reference']} is a branch, not a tag" +
|
|
273
|
+
"\n")
|
|
274
|
+
do_git_pull = True
|
|
275
|
+
except subprocess.CalledProcessError:
|
|
276
|
+
pass
|
|
277
|
+
|
|
278
|
+
if not do_git_pull and commit_ref:
|
|
279
|
+
# This is to check if a tag has been changed
|
|
280
|
+
try:
|
|
281
|
+
# If the tag is annotated, it points to a tag object,
|
|
282
|
+
# not directly to a commit. You need to resolve it to
|
|
283
|
+
# the commit it points to. Using `git rev-parse
|
|
284
|
+
# <tagname>^{commit}` allows getting the right
|
|
285
|
+
# reference.
|
|
286
|
+
commit_ref_head = self._git_tags("HEAD^{commit}")[0]
|
|
287
|
+
commit_ref_head = commit_ref_head.strip()
|
|
288
|
+
except GitReferenceDoesNotExist:
|
|
289
|
+
# HEAD is detached
|
|
290
|
+
commit_ref_head = None
|
|
291
|
+
|
|
292
|
+
# The wanted commit reference does not exist
|
|
293
|
+
# Or the commit ref of HEAD hasn't changed
|
|
294
|
+
if not commit_ref_head or commit_ref_head != commit_ref:
|
|
295
|
+
self.add_output(
|
|
296
|
+
self.indent_spaces +
|
|
297
|
+
"[INFO] Git fetch origin reason: "
|
|
298
|
+
f"Commit ref head '{commit_ref_head}' != "
|
|
299
|
+
f"commit ref '{commit_ref_head}'"
|
|
300
|
+
"\n")
|
|
301
|
+
do_git_pull = True
|
|
301
302
|
|
|
302
303
|
if not do_git_pull:
|
|
303
304
|
self.add_output(self.indent_spaces + "[INFO] git pull ignored\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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|