Skip to content

Commit

Permalink
Merge fix from Chris to hide unpacking objects from git during tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Nov 30, 2011
2 parents 9246413 + c653319 commit 883b904
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -2,6 +2,7 @@ Jelmer Vernooij <jelmer@samba.org>
James Westby <jw+debian@jameswestby.net> James Westby <jw+debian@jameswestby.net>
John Carr <john.carr@unrouted.co.uk> John Carr <john.carr@unrouted.co.uk>
Dave Borowitz <dborowitz@google.com> Dave Borowitz <dborowitz@google.com>
Chris Eberle <eberle1080@gmail.com>


Hervé Cauwelier <herve@itaapy.com> wrote the original tutorial. Hervé Cauwelier <herve@itaapy.com> wrote the original tutorial.


Expand Down
7 changes: 6 additions & 1 deletion dulwich/client.py
Expand Up @@ -524,14 +524,19 @@ class SubprocessGitClient(TraditionalGitClient):


def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
self._connection = None self._connection = None
self._stderr = None
self._stderr = kwargs.get('stderr')
if 'stderr' in kwargs:
del kwargs['stderr']
GitClient.__init__(self, *args, **kwargs) GitClient.__init__(self, *args, **kwargs)


def _connect(self, service, path): def _connect(self, service, path):
import subprocess import subprocess
argv = ['git', service, path] argv = ['git', service, path]
p = SubprocessWrapper( p = SubprocessWrapper(
subprocess.Popen(argv, bufsize=0, stdin=subprocess.PIPE, subprocess.Popen(argv, bufsize=0, stdin=subprocess.PIPE,
stdout=subprocess.PIPE)) stdout=subprocess.PIPE,
stderr=self._stderr))
return Protocol(p.read, p.write, return Protocol(p.read, p.write,
report_activity=self._report_activity), p.can_read report_activity=self._report_activity), p.can_read


Expand Down
2 changes: 1 addition & 1 deletion dulwich/tests/compat/test_client.py
Expand Up @@ -272,7 +272,7 @@ def tearDown(self):
CompatTestCase.tearDown(self) CompatTestCase.tearDown(self)


def _client(self): def _client(self):
return client.SubprocessGitClient() return client.SubprocessGitClient(stderr=subprocess.PIPE)


def _build_path(self, path): def _build_path(self, path):
return self.gitroot + path return self.gitroot + path
Expand Down

0 comments on commit 883b904

Please sign in to comment.