equal
deleted
inserted
replaced
130 _pushdiscovery(pushop) |
130 _pushdiscovery(pushop) |
131 if _pushcheckoutgoing(pushop): |
131 if _pushcheckoutgoing(pushop): |
132 pushop.repo.prepushoutgoinghooks(pushop.repo, |
132 pushop.repo.prepushoutgoinghooks(pushop.repo, |
133 pushop.remote, |
133 pushop.remote, |
134 pushop.outgoing) |
134 pushop.outgoing) |
135 if pushop.remote.capable('bundle2'): |
135 if pushop.remote.capable('bundle2-exp'): |
136 _pushbundle2(pushop) |
136 _pushbundle2(pushop) |
137 else: |
137 else: |
138 _pushchangeset(pushop) |
138 _pushchangeset(pushop) |
139 _pushcomputecommonheads(pushop) |
139 _pushcomputecommonheads(pushop) |
140 _pushsyncphase(pushop) |
140 _pushsyncphase(pushop) |
205 """push data to the remote using bundle2 |
205 """push data to the remote using bundle2 |
206 |
206 |
207 The only currently supported type of data is changegroup but this will |
207 The only currently supported type of data is changegroup but this will |
208 evolve in the future.""" |
208 evolve in the future.""" |
209 # Send known head to the server for race detection. |
209 # Send known head to the server for race detection. |
210 capsblob = urllib.unquote(pushop.remote.capable('bundle2')) |
210 capsblob = urllib.unquote(pushop.remote.capable('bundle2-exp')) |
211 caps = bundle2.decodecaps(capsblob) |
211 caps = bundle2.decodecaps(capsblob) |
212 bundler = bundle2.bundle20(pushop.ui, caps) |
212 bundler = bundle2.bundle20(pushop.ui, caps) |
213 # create reply capability |
213 # create reply capability |
214 capsblob = bundle2.encodecaps(pushop.repo.bundle2caps) |
214 capsblob = bundle2.encodecaps(pushop.repo.bundle2caps) |
215 bundler.addpart(bundle2.bundlepart('replycaps', data=capsblob)) |
215 bundler.addpart(bundle2.bundlepart('replycaps', data=capsblob)) |
513 raise util.Abort(msg) |
513 raise util.Abort(msg) |
514 |
514 |
515 lock = pullop.repo.lock() |
515 lock = pullop.repo.lock() |
516 try: |
516 try: |
517 _pulldiscovery(pullop) |
517 _pulldiscovery(pullop) |
518 if pullop.remote.capable('bundle2'): |
518 if pullop.remote.capable('bundle2-exp'): |
519 _pullbundle2(pullop) |
519 _pullbundle2(pullop) |
520 if 'changegroup' in pullop.todosteps: |
520 if 'changegroup' in pullop.todosteps: |
521 _pullchangeset(pullop) |
521 _pullchangeset(pullop) |
522 if 'phases' in pullop.todosteps: |
522 if 'phases' in pullop.todosteps: |
523 _pullphase(pullop) |
523 _pullphase(pullop) |