changeset 21644 | 17755dd8c509 |
parent 21628 | 7c5a85619dca |
child 21655 | 35095f332846 |
--- a/mercurial/bundle2.py Thu May 22 12:58:07 2014 -0700 +++ b/mercurial/bundle2.py Sat May 24 16:20:09 2014 -0700 @@ -769,6 +769,13 @@ self.consumed = True return data +def bundle2caps(remote): + """return the bundlecapabilities of a peer as dict""" + raw = remote.capable('bundle2-exp') + if not raw and raw != '': + return {} + capsblob = urllib.unquote(remote.capable('bundle2-exp')) + return decodecaps(capsblob) @parthandler('b2x:changegroup') def handlechangegroup(op, inpart):