Skip to content
Snippets Groups Projects
Commit 0aae80d14fed authored by Siddharth Agarwal's avatar Siddharth Agarwal
Browse files

bundle2: add some debugging information to the not-a-bundle error

I found this useful while trying to debug wireproto-related issues.
parent 98e2c78e309c
No related branches found
No related tags found
No related merge requests found
......@@ -678,6 +678,9 @@
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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment