| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -346,7 +346,7 @@ class Remote(LazyMixin, Iterable): | |||
| 346 | 346 | NOTE: When querying configuration, the configuration accessor will be cached | |
| 347 | 347 | to speed up subsequent accesses.""" | |
| 348 | 348 | ||
| 349 | - __slots__ = ("repo", "name", "_config_reader") | ||
| 349 | + __slots__ = ("repo", "name", "_config_reader", "fetch_no") | ||
| 350 | 350 | _id_attribute_ = "name" | |
| 351 | 351 | ||
| 352 | 352 | def __init__(self, repo, name): | |
@@ -356,6 +356,7 @@ def __init__(self, repo, name): | |||
| 356 | 356 | :param name: the name of the remote, i.e. 'origin'""" | |
| 357 | 357 | self.repo = repo | |
| 358 | 358 | self.name = name | |
| 359 | + self.fetch_no = 0 | ||
| 359 | 360 | ||
| 360 | 361 | if os.name == 'nt': | |
| 361 | 362 | # some oddity: on windows, python 2.5, it for some reason does not realize | |
@@ -551,6 +552,9 @@ def _get_fetch_info_from_stderr(self, proc, progress): | |||
| 551 | 552 | progress_handler = progress.new_message_handler() | |
| 552 | 553 | ||
| 553 | 554 | def my_progress_handler(line): | |
| 555 | + stderr_fetch = open(join(self.repo.git_dir, '%03i_debug_git-python_stderr' % self.fetch_no), 'ab') | ||
| 556 | + stderr_fetch.write((line + '\n').encode(defenc)) | ||
| 557 | + stderr_fetch.close() | ||
| 554 | 558 | for pline in progress_handler(line): | |
| 555 | 559 | if line.startswith('fatal:') or line.startswith('error:'): | |
| 556 | 560 | raise GitCommandError(("Error when fetching: %s" % line,), 2) | |
@@ -567,6 +571,11 @@ def my_progress_handler(line): | |||
| 567 | 571 | # We are only interested in stderr here ... | |
| 568 | 572 | handle_process_output(proc, None, my_progress_handler, finalize_process) | |
| 569 | 573 | ||
| 574 | + import shutil | ||
| 575 | + shutil.copyfile(join(self.repo.git_dir, 'FETCH_HEAD'), join(self.repo.git_dir, | ||
| 576 | + '%03i_debug_git-python_FETCH_HEAD' % self.fetch_no)) | ||
| 577 | + self.fetch_no += 1 | ||
| 578 | + | ||
| 570 | 579 | # read head information | |
| 571 | 580 | fp = open(join(self.repo.git_dir, 'FETCH_HEAD'), 'rb') | |
| 572 | 581 | fetch_head_info = [l.decode(defenc) for l in fp.readlines()] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments