Mercurial > public > mercurial-scm > hg-stable
diff mercurial/sshrepo.py @ 5196:86e95b93559a
Merge with crew-stable
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 17 Aug 2007 23:20:13 -0300 |
parents | 664a1c312972 6d5ed61c508c |
children | b534c502bfb3 |
line wrap: on
line diff
--- a/mercurial/sshrepo.py Fri Aug 17 20:18:05 2007 -0300 +++ b/mercurial/sshrepo.py Fri Aug 17 23:20:13 2007 -0300 @@ -175,6 +175,7 @@ def unbundle(self, cg, heads, source): d = self.call("unbundle", heads=' '.join(map(hex, heads))) if d: + # remote may send "unsynced changes" self.raise_(repo.RepoError(_("push refused: %s") % d)) while 1: @@ -188,14 +189,15 @@ self.pipeo.flush() self.readerr() - d = self.pipei.readline() - if d != '\n': - return 1 - l = int(self.pipei.readline()) r = self.pipei.read(l) - if not r: - return 1 + if r: + # remote may send "unsynced changes" + self.raise_(hg.RepoError(_("push failed: %s") % r)) + + self.readerr() + l = int(self.pipei.readline()) + r = self.pipei.read(l) return int(r) def addchangegroup(self, cg, source, url):