Show More
@@ -769,6 +769,13 b' class unbundlepart(unpackermixin):' | |||||
769 | self.consumed = True |
|
769 | self.consumed = True | |
770 | return data |
|
770 | return data | |
771 |
|
771 | |||
|
772 | def bundle2caps(remote): | |||
|
773 | """return the bundlecapabilities of a peer as dict""" | |||
|
774 | raw = remote.capable('bundle2-exp') | |||
|
775 | if not raw and raw != '': | |||
|
776 | return {} | |||
|
777 | capsblob = urllib.unquote(remote.capable('bundle2-exp')) | |||
|
778 | return decodecaps(capsblob) | |||
772 |
|
779 | |||
773 | @parthandler('b2x:changegroup') |
|
780 | @parthandler('b2x:changegroup') | |
774 | def handlechangegroup(op, inpart): |
|
781 | def handlechangegroup(op, inpart): |
@@ -208,9 +208,7 b' def _pushbundle2(pushop):' | |||||
208 |
|
208 | |||
209 | The only currently supported type of data is changegroup but this will |
|
209 | The only currently supported type of data is changegroup but this will | |
210 | evolve in the future.""" |
|
210 | evolve in the future.""" | |
211 | capsblob = urllib.unquote(pushop.remote.capable('bundle2-exp')) |
|
211 | bundler = bundle2.bundle20(pushop.ui, bundle2.bundle2caps(pushop.remote)) | |
212 | caps = bundle2.decodecaps(capsblob) |
|
|||
213 | bundler = bundle2.bundle20(pushop.ui, caps) |
|
|||
214 | # create reply capability |
|
212 | # create reply capability | |
215 | capsblob = bundle2.encodecaps(pushop.repo.bundle2caps) |
|
213 | capsblob = bundle2.encodecaps(pushop.repo.bundle2caps) | |
216 | bundler.newpart('b2x:replycaps', data=capsblob) |
|
214 | bundler.newpart('b2x:replycaps', data=capsblob) |
General Comments 0
You need to be logged in to leave comments.
Login now