Show More
@@ -614,7 +614,6 class gitsubrepo(abstractsubrepo): | |||
|
614 | 614 | return self._gitdir(commands, env=env, stream=stream)[0] |
|
615 | 615 | |
|
616 | 616 | def _gitdir(self, commands, env=None, stream=False): |
|
617 | commands = ['--no-pager'] + commands | |
|
618 | 617 | return self._gitnodir(commands, env=env, stream=stream, cwd=self._path) |
|
619 | 618 | |
|
620 | 619 | def _gitnodir(self, commands, env=None, stream=False, cwd=None): |
@@ -623,6 +622,7 class gitsubrepo(abstractsubrepo): | |||
|
623 | 622 | The methods tries to call the git command. versions previor to 1.6.0 |
|
624 | 623 | are not supported and very probably fail. |
|
625 | 624 | """ |
|
625 | self._ui.debug('%s: git %s\n' % (self._relpath, ' '.join(commands))) | |
|
626 | 626 | # print git's stderr, which is mostly progress and useful info |
|
627 | 627 | p = subprocess.Popen(['git'] + commands, bufsize=-1, cwd=cwd, env=env, |
|
628 | 628 | close_fds=util.closefds, |
@@ -636,15 +636,12 class gitsubrepo(abstractsubrepo): | |||
|
636 | 636 | |
|
637 | 637 | if p.returncode != 0 and p.returncode != 1: |
|
638 | 638 | # there are certain error codes that are ok |
|
639 |
command = |
|
|
640 | for arg in commands: | |
|
641 | if not arg.startswith('-'): | |
|
642 | command = arg | |
|
643 | break | |
|
639 | command = commands[0] | |
|
644 | 640 | if command == 'cat-file': |
|
645 | 641 | return retdata, p.returncode |
|
646 | 642 | # for all others, abort |
|
647 |
raise util.Abort('git %s error %d' % |
|
|
643 | raise util.Abort('git %s error %d in %s' % | |
|
644 | (command, p.returncode, self._relpath)) | |
|
648 | 645 | |
|
649 | 646 | return retdata, p.returncode |
|
650 | 647 |
General Comments 0
You need to be logged in to leave comments.
Login now