mirror of
https://github.com/facebook/sapling.git
synced 2025-01-06 04:43:19 +03:00
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:
parent
8f7a14f45c
commit
9c2cf95fb6
@ -933,14 +933,22 @@ class remoterepository:
|
|||||||
def branches(self, nodes):
|
def branches(self, nodes):
|
||||||
n = " ".join(map(hex, nodes))
|
n = " ".join(map(hex, nodes))
|
||||||
d = self.do_cmd("branches", nodes=n).read()
|
d = self.do_cmd("branches", nodes=n).read()
|
||||||
br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ]
|
try:
|
||||||
return br
|
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):
|
def between(self, pairs):
|
||||||
n = "\n".join(["-".join(map(hex, p)) for p in pairs])
|
n = "\n".join(["-".join(map(hex, p)) for p in pairs])
|
||||||
d = self.do_cmd("between", pairs=n).read()
|
d = self.do_cmd("between", pairs=n).read()
|
||||||
p = [ l and map(bin, l.split(" ")) or [] for l in d.splitlines() ]
|
try:
|
||||||
return p
|
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):
|
def changegroup(self, nodes):
|
||||||
n = " ".join(map(hex, nodes))
|
n = " ".join(map(hex, nodes))
|
||||||
|
Loading…
Reference in New Issue
Block a user