From ce03a401c6fb5a890a3fbf03ab51f70a80370ec1 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 28 Oct 2008 16:12:03 -0700 Subject: [PATCH] Stop hiding remote missing object errors Hiding error messages from the remote peer is not a good idea, as users should be made aware when the remote peer is not a complete Git repository so they can alert the administrators and have the repository corrected. Signed-off-by: Shawn O. Pearce --- project.py | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/project.py b/project.py index 7a61b1c8..d38af12b 100644 --- a/project.py +++ b/project.py @@ -762,41 +762,9 @@ class Project(object): def _RemoteFetch(self, name=None): if not name: name = self.remote.name - - hide_errors = False - if self.extraRemotes or self.snapshots: - hide_errors = True - - proc = GitCommand(self, + return GitCommand(self, ['fetch', name], - bare = True, - capture_stderr = hide_errors) - if hide_errors: - err = proc.process.stderr.fileno() - buf = '' - while True: - b = os.read(err, 256) - if b: - buf += b - while buf: - r = buf.find('remote: error: unable to find ') - if r >= 0: - lf = buf.find('\n') - if lf < 0: - break - buf = buf[lf + 1:] - continue - - cr = buf.find('\r') - if cr < 0: - break - os.write(2, buf[0:cr + 1]) - buf = buf[cr + 1:] - if not b: - if buf: - os.write(2, buf) - break - return proc.Wait() == 0 + bare = True).Wait() == 0 def _Checkout(self, rev, quiet=False): cmd = ['checkout']