batchfetch 1.3.4__tar.gz → 1.3.5__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.3.4 → batchfetch-1.3.5}/PKG-INFO +1 -1
- {batchfetch-1.3.4 → batchfetch-1.3.5}/batchfetch/batchfetch_cli.py +1 -0
- {batchfetch-1.3.4 → batchfetch-1.3.5}/batchfetch/batchfetch_git.py +15 -12
- {batchfetch-1.3.4 → batchfetch-1.3.5}/batchfetch.egg-info/PKG-INFO +1 -1
- {batchfetch-1.3.4 → batchfetch-1.3.5}/setup.py +1 -1
- {batchfetch-1.3.4 → batchfetch-1.3.5}/LICENSE +0 -0
- {batchfetch-1.3.4 → batchfetch-1.3.5}/README.md +0 -0
- {batchfetch-1.3.4 → batchfetch-1.3.5}/batchfetch/__init__.py +0 -0
- {batchfetch-1.3.4 → batchfetch-1.3.5}/batchfetch/batchfetch_base.py +0 -0
- {batchfetch-1.3.4 → batchfetch-1.3.5}/batchfetch/helpers.py +0 -0
- {batchfetch-1.3.4 → batchfetch-1.3.5}/batchfetch.egg-info/SOURCES.txt +0 -0
- {batchfetch-1.3.4 → batchfetch-1.3.5}/batchfetch.egg-info/dependency_links.txt +0 -0
- {batchfetch-1.3.4 → batchfetch-1.3.5}/batchfetch.egg-info/entry_points.txt +0 -0
- {batchfetch-1.3.4 → batchfetch-1.3.5}/batchfetch.egg-info/requires.txt +0 -0
- {batchfetch-1.3.4 → batchfetch-1.3.5}/batchfetch.egg-info/top_level.txt +0 -0
- {batchfetch-1.3.4 → batchfetch-1.3.5}/setup.cfg +0 -0
|
@@ -111,6 +111,7 @@ class BatchFetchCli:
|
|
|
111
111
|
# Paths specified in the batchfetch.yaml file
|
|
112
112
|
untracked_paths = None
|
|
113
113
|
if "options" in yaml_dict and \
|
|
114
|
+
isinstance(yaml_dict["options"], dict) and \
|
|
114
115
|
"ignore_untracked" in yaml_dict["options"]:
|
|
115
116
|
untracked_paths = \
|
|
116
117
|
yaml_dict["options"]["ignore_untracked"]
|
|
@@ -117,7 +117,7 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
117
117
|
|
|
118
118
|
self.add_output(f"[GIT {update_type}] {self[self.main_key]}"
|
|
119
119
|
+ (f" (Ref: {self['revision']})"
|
|
120
|
-
|
|
120
|
+
if self["revision"] else "") + "\n")
|
|
121
121
|
|
|
122
122
|
try:
|
|
123
123
|
# Delete
|
|
@@ -130,32 +130,34 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
130
130
|
|
|
131
131
|
# Update
|
|
132
132
|
if self.git_local_dir.is_dir():
|
|
133
|
+
do_git_fetch = self["git_pull"]
|
|
134
|
+
|
|
133
135
|
# Pre exec
|
|
134
|
-
|
|
136
|
+
if do_git_fetch:
|
|
137
|
+
self._update_current_branch_name()
|
|
138
|
+
|
|
135
139
|
self._repo_fix_remote_origin()
|
|
136
140
|
self._exec_before(cwd=self.git_local_dir)
|
|
137
141
|
|
|
138
142
|
if not self["revision"]:
|
|
139
143
|
self.values["revision"] = self._run_get_firstline(
|
|
140
|
-
"git symbolic-ref
|
|
141
|
-
).split("/")[-1]
|
|
144
|
+
"git symbolic-ref --short HEAD")
|
|
142
145
|
if not self["revision"]:
|
|
143
146
|
raise BatchFetchError(
|
|
144
147
|
"Unable to determine the default origin branch"
|
|
145
148
|
)
|
|
146
149
|
|
|
147
150
|
self.add_output(self.indent_spaces +
|
|
148
|
-
|
|
151
|
+
"[INFO] Update revision to: '" +
|
|
149
152
|
self["revision"] + "'\n")
|
|
150
153
|
|
|
151
|
-
|
|
154
|
+
if do_git_fetch:
|
|
155
|
+
git_fetch_done = self._repo_fetch()
|
|
152
156
|
|
|
153
|
-
|
|
154
|
-
git_branch_changed = self._repo_fix_branch()
|
|
157
|
+
self._repo_fix_branch()
|
|
155
158
|
|
|
156
|
-
git_merge_done = False
|
|
157
159
|
if git_fetch_done:
|
|
158
|
-
|
|
160
|
+
self._git_merge()
|
|
159
161
|
|
|
160
162
|
if self.get_changed():
|
|
161
163
|
self._exec_after(cwd=self.git_local_dir)
|
|
@@ -192,6 +194,8 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
192
194
|
|
|
193
195
|
:param cmd: Command to be executed. Can be a list or a string.
|
|
194
196
|
:param kwargs: Additional keyword arguments for Popen.
|
|
197
|
+
:cwd: Current working directory.
|
|
198
|
+
:env: Environment variables.
|
|
195
199
|
:return: Tuple containing two lists: stdout lines and stderr lines.
|
|
196
200
|
"""
|
|
197
201
|
if not cwd:
|
|
@@ -264,11 +268,10 @@ class BatchFetchGit(TaskBatchFetch):
|
|
|
264
268
|
# Merge
|
|
265
269
|
do_git_fetch = self["git_pull"]
|
|
266
270
|
do_git_fetch = False
|
|
267
|
-
commit_ref = None
|
|
268
271
|
|
|
269
272
|
try:
|
|
270
273
|
# Check if the revision such as
|
|
271
|
-
|
|
274
|
+
_, _ = self._run(["git", "cat-file", "-e", self["revision"]])
|
|
272
275
|
except subprocess.CalledProcessError:
|
|
273
276
|
do_git_fetch = True
|
|
274
277
|
self.add_output(
|
|
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
|