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