diff -r 5cac3accdaa1 -r 2d15c59a001b mercurial/wireproto.py --- a/mercurial/wireproto.py Mon Apr 06 17:23:11 2015 -0700 +++ b/mercurial/wireproto.py Tue Apr 07 16:01:32 2015 -0700 @@ -363,7 +363,9 @@ opts[key] = value f = self._callcompressable("getbundle", **opts) bundlecaps = kwargs.get('bundlecaps') - if bundlecaps is not None and 'HG2Y' in bundlecaps: + if bundlecaps is None: + bundlecaps = () # kwargs could have it to None + if util.any((cap.startswith('HG2') for cap in bundlecaps)): return bundle2.getunbundler(self.ui, f) else: return changegroupmod.cg1unpacker(f, 'UN')