mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
bundle2: add some debugging information to the not-a-bundle error
I found this useful while trying to debug wireproto-related issues.
This commit is contained in:
parent
738cc44d4e
commit
1920cf0324
@ -678,6 +678,9 @@ def getunbundler(ui, fp, magicstring=None):
|
||||
magicstring = changegroup.readexactly(fp, 4)
|
||||
magic, version = magicstring[0:2], magicstring[2:4]
|
||||
if magic != 'HG':
|
||||
ui.debug(
|
||||
"error: invalid magic: %r (version %r), should be 'HG'\n"
|
||||
% (magic, version))
|
||||
raise error.Abort(_('not a Mercurial bundle'))
|
||||
unbundlerclass = formatmap.get(version)
|
||||
if unbundlerclass is None:
|
||||
|
Loading…
Reference in New Issue
Block a user