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