Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit152a60f

Browse files
committed
Merge branch 'victorgp-master'
2 parentse15b57b +c8c696b commit152a60f

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

‎git/remote.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,6 @@ def update(self, **kwargs):
538538

539539
def_get_fetch_info_from_stderr(self,proc,progress):
540540
# skip first line as it is some remote info we are not interested in
541-
# TODO: Use poll() to process stdout and stderr at same time
542541
output=IterableList('name')
543542

544543
# lines which are no progress are fetch info lines
@@ -551,11 +550,9 @@ def _get_fetch_info_from_stderr(self, proc, progress):
551550

552551
progress_handler=progress.new_message_handler()
553552

554-
forlineinproc.stderr:
555-
line=line.decode(defenc)
556-
line=line.rstrip()
553+
defmy_progress_handler(line):
557554
forplineinprogress_handler(line):
558-
ifline.startswith('fatal:'):
555+
ifline.startswith('fatal:')orline.startswith('error:'):
559556
raiseGitCommandError(("Error when fetching: %s"%line,),2)
560557
# END handle special messages
561558
forcmdincmds:
@@ -568,12 +565,7 @@ def _get_fetch_info_from_stderr(self, proc, progress):
568565
# end
569566

570567
# We are only interested in stderr here ...
571-
try:
572-
finalize_process(proc)
573-
exceptException:
574-
iflen(fetch_info_lines)==0:
575-
raise
576-
# end exception handler
568+
handle_process_output(proc,None,my_progress_handler,finalize_process)
577569

578570
# read head information
579571
fp=open(join(self.repo.git_dir,'FETCH_HEAD'),'rb')
@@ -593,7 +585,6 @@ def _get_push_info(self, proc, progress):
593585
# we hope stdout can hold all the data, it should ...
594586
# read the lines manually as it will use carriage returns between the messages
595587
# to override the previous one. This is why we read the bytes manually
596-
# TODO: poll() on file descriptors to know what to read next, process streams concurrently
597588
progress_handler=progress.new_message_handler()
598589
output=IterableList('name')
599590

@@ -647,7 +638,6 @@ def fetch(self, refspec=None, progress=None, **kwargs):
647638
args= [refspec]
648639

649640
proc=self.repo.git.fetch(self,*args,with_extended_output=True,as_process=True,v=True,**kwargs)
650-
proc.stdout.close()
651641
res=self._get_fetch_info_from_stderr(proc,progressorRemoteProgress())
652642
ifhasattr(self.repo.odb,'update_cache'):
653643
self.repo.odb.update_cache()
@@ -663,7 +653,6 @@ def pull(self, refspec=None, progress=None, **kwargs):
663653
:return: Please see 'fetch' method """
664654
kwargs=add_progress(kwargs,self.repo.git,progress)
665655
proc=self.repo.git.pull(self,refspec,with_extended_output=True,as_process=True,v=True,**kwargs)
666-
proc.stdout.close()
667656
res=self._get_fetch_info_from_stderr(proc,progressorRemoteProgress())
668657
ifhasattr(self.repo.odb,'update_cache'):
669658
self.repo.odb.update_cache()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp