--- a/mercurial/bundle2.py Wed Jan 13 15:47:37 2016 -0600
+++ b/mercurial/bundle2.py Tue Jan 12 21:01:06 2016 -0800
@@ -1240,7 +1240,7 @@
Exists to allow extensions (like evolution) to mutate the capabilities.
"""
caps = capabilities.copy()
- caps['changegroup'] = tuple(sorted(changegroup.packermap.keys()))
+ caps['changegroup'] = tuple(sorted(changegroup.supportedversions(repo)))
if obsolete.isenabled(repo, obsolete.exchangeopt):
supportedformat = tuple('V%i' % v for v in obsolete.formats)
caps['obsmarkers'] = supportedformat
@@ -1277,8 +1277,7 @@
op.gettransaction()
unpackerversion = inpart.params.get('version', '01')
# We should raise an appropriate exception here
- unpacker = changegroup.packermap[unpackerversion][1]
- cg = unpacker(inpart, None)
+ cg = changegroup.getunbundler(unpackerversion, inpart, None)
# the source and url passed here are overwritten by the one contained in
# the transaction.hookargs argument. So 'bundle2' is a placeholder
nbchangesets = None