batchfetch 1.2.3__tar.gz → 1.2.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: batchfetch
3
- Version: 1.2.3
3
+ Version: 1.2.5
4
4
  Summary: Efficiently clone and pull multiple Git repositories.
5
5
  Home-page: https://github.com/jamescherti/batchfetch
6
6
  Author: James Cherti
@@ -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
 
@@ -149,8 +149,8 @@ class BatchFetchGit(TaskBatchFetch):
149
149
  if git_fetch_done:
150
150
  git_merge_done = self._git_merge()
151
151
 
152
- if (git_fetch_done and git_merge_done) or git_branch_changed:
153
- self._repo_update_submodules()
152
+ # if (git_fetch_done and git_merge_done) or git_branch_changed:
153
+ # self._repo_update_submodules()
154
154
 
155
155
  if self.get_changed():
156
156
  self._run_post_exec(cwd=self.git_local_dir)
@@ -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"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: batchfetch
3
- Version: 1.2.3
3
+ Version: 1.2.5
4
4
  Summary: Efficiently clone and pull multiple Git repositories.
5
5
  Home-page: https://github.com/jamescherti/batchfetch
6
6
  Author: James Cherti
@@ -22,7 +22,7 @@ from setuptools import find_packages, setup
22
22
 
23
23
  setup(
24
24
  name="batchfetch",
25
- version="1.2.3",
25
+ version="1.2.5",
26
26
  packages=find_packages(),
27
27
  description="Efficiently clone and pull multiple Git repositories.",
28
28
  license="GPLv3",
File without changes
File without changes
File without changes