Show More
@@ -131,10 +131,6 def push(repo, remote, force=False, revs | |||||
131 | lock = pushop.remote.lock() |
|
131 | lock = pushop.remote.lock() | |
132 | try: |
|
132 | try: | |
133 | _pushdiscovery(pushop) |
|
133 | _pushdiscovery(pushop) | |
134 | if _pushcheckoutgoing(pushop): |
|
|||
135 | pushop.repo.prepushoutgoinghooks(pushop.repo, |
|
|||
136 | pushop.remote, |
|
|||
137 | pushop.outgoing) |
|
|||
138 |
|
|
134 | if (pushop.repo.ui.configbool('experimental', 'bundle2-exp', | |
139 |
|
|
135 | False) | |
140 |
|
|
136 | and pushop.remote.capable('bundle2-exp')): | |
@@ -214,6 +210,12 def _pushb2ctx(pushop, bundler): | |||||
214 | return |
|
210 | return | |
215 | pushop.stepsdone.add('changesets') |
|
211 | pushop.stepsdone.add('changesets') | |
216 | # Send known heads to the server for race detection. |
|
212 | # Send known heads to the server for race detection. | |
|
213 | pushop.stepsdone.add('changesets') | |||
|
214 | if not _pushcheckoutgoing(pushop): | |||
|
215 | return | |||
|
216 | pushop.repo.prepushoutgoinghooks(pushop.repo, | |||
|
217 | pushop.remote, | |||
|
218 | pushop.outgoing) | |||
217 | if not pushop.force: |
|
219 | if not pushop.force: | |
218 | bundler.newpart('B2X:CHECK:HEADS', data=iter(pushop.remoteheads)) |
|
220 | bundler.newpart('B2X:CHECK:HEADS', data=iter(pushop.remoteheads)) | |
219 | cg = changegroup.getlocalbundle(pushop.repo, 'push', pushop.outgoing) |
|
221 | cg = changegroup.getlocalbundle(pushop.repo, 'push', pushop.outgoing) | |
@@ -237,6 +239,9 def _pushbundle2(pushop): | |||||
237 | extrainfo = _pushbundle2extraparts(pushop, bundler) |
|
239 | extrainfo = _pushbundle2extraparts(pushop, bundler) | |
238 | # add the changegroup bundle |
|
240 | # add the changegroup bundle | |
239 | cgreplyhandler = _pushb2ctx(pushop, bundler) |
|
241 | cgreplyhandler = _pushb2ctx(pushop, bundler) | |
|
242 | # do not push if no other parts than the capability | |||
|
243 | if bundler.nbparts <= 1: | |||
|
244 | return | |||
240 | stream = util.chunkbuffer(bundler.getchunks()) |
|
245 | stream = util.chunkbuffer(bundler.getchunks()) | |
241 | try: |
|
246 | try: | |
242 | reply = pushop.remote.unbundle(stream, ['force'], 'push') |
|
247 | reply = pushop.remote.unbundle(stream, ['force'], 'push') | |
@@ -268,6 +273,11 def _pushchangeset(pushop): | |||||
268 | if 'changesets' in pushop.stepsdone: |
|
273 | if 'changesets' in pushop.stepsdone: | |
269 | return |
|
274 | return | |
270 | pushop.stepsdone.add('changesets') |
|
275 | pushop.stepsdone.add('changesets') | |
|
276 | if not _pushcheckoutgoing(pushop): | |||
|
277 | return | |||
|
278 | pushop.repo.prepushoutgoinghooks(pushop.repo, | |||
|
279 | pushop.remote, | |||
|
280 | pushop.outgoing) | |||
271 | outgoing = pushop.outgoing |
|
281 | outgoing = pushop.outgoing | |
272 | unbundle = pushop.remote.capable('unbundle') |
|
282 | unbundle = pushop.remote.capable('unbundle') | |
273 | # TODO: get bundlecaps from remote |
|
283 | # TODO: get bundlecaps from remote |
General Comments 0
You need to be logged in to leave comments.
Login now