| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a9a5414 commit 3480201
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -338,7 +338,7 @@ class Remote(LazyMixin, Iterable): | |||
| 338 | 338 | NOTE: When querying configuration, the configuration accessor will be cached | |
| 339 | 339 | to speed up subsequent accesses.""" | |
| 340 | 340 | ||
| 341 | - __slots__ = ("repo", "name", "_config_reader") | ||
| 341 | + __slots__ = ("repo", "name", "_config_reader", "fetch_no") | ||
| 342 | 342 | _id_attribute_ = "name" | |
| 343 | 343 | ||
| 344 | 344 | def __init__(self, repo, name): | |
@@ -348,6 +348,7 @@ def __init__(self, repo, name): | |||
| 348 | 348 | :param name: the name of the remote, i.e. 'origin'""" | |
| 349 | 349 | self.repo = repo | |
| 350 | 350 | self.name = name | |
| 351 | + self.fetch_no = 0 | ||
| 351 | 352 | ||
| 352 | 353 | if os.name == 'nt': | |
| 353 | 354 | # some oddity: on windows, python 2.5, it for some reason does not realize | |
@@ -523,7 +524,9 @@ def _get_fetch_info_from_stderr(self, proc, progress): | |||
| 523 | 524 | ||
| 524 | 525 | progress_handler = progress.new_message_handler() | |
| 525 | 526 | ||
| 527 | + stderr_fetch = open(join(self.repo.git_dir, '%03i_debug_git-python_stderr' % self.fetch_no), 'wb') | ||
| 526 | 528 | def my_progress_handler(line): | |
| 529 | + stderr_fetch.write((line + '\n').encode(defenc)) | ||
| 527 | 530 | for pline in progress_handler(line): | |
| 528 | 531 | if line.startswith('fatal:'): | |
| 529 | 532 | raise GitCommandError(("Error when fetching: %s" % line,), 2) | |
@@ -539,8 +542,12 @@ def my_progress_handler(line): | |||
| 539 | 542 | ||
| 540 | 543 | # We are only interested in stderr here ... | |
| 541 | 544 | handle_process_output(proc, None, my_progress_handler, finalize_process) | |
| 545 | + stderr_fetch.close() | ||
| 542 | 546 | ||
| 543 | 547 | # read head information | |
| 548 | + import shutil | ||
| 549 | + shutil.copyfile(join(self.repo.git_dir, 'FETCH_HEAD'), join(self.repo.git_dir, '%03i_debug_git-python_FETCH_HEAD' % self.fetch_no)) | ||
| 550 | + self.fetch_no += 1 | ||
| 544 | 551 | fp = open(join(self.repo.git_dir, 'FETCH_HEAD'), 'rb') | |
| 545 | 552 | fetch_head_info = [l.decode(defenc) for l in fp.readlines()] | |
| 546 | 553 | fp.close() | |
| Back | FazBrowse Home | New Git URL |
0 commit comments