merge: catch unexpected responses

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

merge: catch unexpected responses

This dumps the data received from the remote server in case we fail to
parse its output.

manifest hash: da5232649a0e02645bccd8b50665d9c3e247fdc2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnkMRywK+sNU5EO8RApAGAKCw7ZHF4YUaTi3ychbUe5Lr47OsCwCfUqKg
lxA/sgDmeDMbmwbV5S+Beik=
=y6TB
-----END PGP SIGNATURE-----
This commit is contained in:
mpm@selenic.com 2005-06-01 15:21:53 -08:00
parent 8f7a14f45c
commit 9c2cf95fb6

View File

@ -933,14 +933,22 @@ class remoterepository:
def branches(self, nodes):
n = " ".join(map(hex, nodes))
d = self.do_cmd("branches", nodes=n).read()
br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ]
return br
try:
br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ]
return br
except:
self.ui.warn("unexpected response:\n" + d[:400] + "\n...\n")
raise
def between(self, pairs):
n = "\n".join(["-".join(map(hex, p)) for p in pairs])
d = self.do_cmd("between", pairs=n).read()
p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ]
return p
try:
p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ]
return p
except:
self.ui.warn("unexpected response:\n" + d[:400] + "\n...\n")
raise
def changegroup(self, nodes):
n = " ".join(map(hex, nodes))