batchfetch 1.1.1__tar.gz → 1.1.2__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.1/batchfetch.egg-info → batchfetch-1.1.2}/PKG-INFO +1 -1
- {batchfetch-1.1.1 → batchfetch-1.1.2}/batchfetch/batchfetch_base.py +1 -1
- {batchfetch-1.1.1 → batchfetch-1.1.2}/batchfetch/batchfetch_git.py +24 -14
- {batchfetch-1.1.1 → batchfetch-1.1.2/batchfetch.egg-info}/PKG-INFO +1 -1
- {batchfetch-1.1.1 → batchfetch-1.1.2}/setup.py +1 -1
- {batchfetch-1.1.1 → batchfetch-1.1.2}/.gitignore +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/LICENSE +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/README.md +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/batchfetch/__init__.py +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/batchfetch/batchfetch_cli.py +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/batchfetch/helpers.py +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/batchfetch.egg-info/SOURCES.txt +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/batchfetch.egg-info/dependency_links.txt +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/batchfetch.egg-info/entry_points.txt +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/batchfetch.egg-info/requires.txt +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/batchfetch.egg-info/top_level.txt +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/run_tests.sh +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/setup.cfg +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/tests/data/test-md5sum.txt +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/tests/data/test-run_simple.sh +0 -0
- {batchfetch-1.1.1 → batchfetch-1.1.2}/tests/test_helpers.py +0 -0
|
@@ -58,7 +58,7 @@ class TaskBase:
|
|
|
58
58
|
|
|
59
59
|
# Options
|
|
60
60
|
self.options = {}
|
|
61
|
-
self.options.update(deepcopy(self.global_options_values))
|
|
61
|
+
self.options.update(deepcopy(self.global_options_values))
|
|
62
62
|
self.options.update(deepcopy(self._item_options))
|
|
63
63
|
schema = Schema(self.global_options_schema)
|
|
64
64
|
schema.validate(self.options)
|
|
@@ -227,21 +227,31 @@ class BatchFetchGit(BatchFetchBase):
|
|
|
227
227
|
do_git_pull = True
|
|
228
228
|
else: # The reference exists
|
|
229
229
|
try:
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
# <tagname>^{commit}` allows getting the right reference.
|
|
234
|
-
commit_ref_head = self._git_tags("HEAD^{commit}")[0]
|
|
235
|
-
except GitReferenceDoesNotExist:
|
|
236
|
-
# HEAD is detached
|
|
237
|
-
commit_ref_head = None
|
|
238
|
-
|
|
239
|
-
# The wanted commit reference does not exist
|
|
240
|
-
# Or the commit ref of HEAD hasn't changed
|
|
241
|
-
if commit_ref and commit_ref_head == commit_ref:
|
|
242
|
-
do_git_pull = False
|
|
243
|
-
else:
|
|
230
|
+
cmd = ["git", "show-ref", "--verify", "--quiet",
|
|
231
|
+
f"refs/heads/{self['reference']}"]
|
|
232
|
+
run_simple(cmd, env=self.env, cwd=self.git_local_dir)
|
|
244
233
|
do_git_pull = True
|
|
234
|
+
except subprocess.CalledProcessError:
|
|
235
|
+
pass
|
|
236
|
+
|
|
237
|
+
if not do_git_pull:
|
|
238
|
+
try:
|
|
239
|
+
# If the tag is annotated, it points to a tag object,
|
|
240
|
+
# not directly to a commit. You need to resolve it to
|
|
241
|
+
# the commit it points to. Using `git rev-parse
|
|
242
|
+
# <tagname>^{commit}` allows getting the right
|
|
243
|
+
# reference.
|
|
244
|
+
commit_ref_head = self._git_tags("HEAD^{commit}")[0]
|
|
245
|
+
except GitReferenceDoesNotExist:
|
|
246
|
+
# HEAD is detached
|
|
247
|
+
commit_ref_head = None
|
|
248
|
+
|
|
249
|
+
# The wanted commit reference does not exist
|
|
250
|
+
# Or the commit ref of HEAD hasn't changed
|
|
251
|
+
if commit_ref and commit_ref_head == commit_ref:
|
|
252
|
+
do_git_pull = False
|
|
253
|
+
else:
|
|
254
|
+
do_git_pull = True
|
|
245
255
|
|
|
246
256
|
if not do_git_pull:
|
|
247
257
|
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
|