Changeset 1f18453ba26a…
Parent c6b44e175bf4…
by Jack Bowman <jack@fogcreek.com>
Changes to 2 files · Browse files at 1f18453ba26a Showing diff from parent c6b44e175bf4 Diff from another changeset...
@@ -102,7 +102,13 @@ current_push_size = min(push_size, len(outgoing))
ui.debug('pushing: %d\n' % current_push_size)
# force the push, because we checked above that by the time the whole push is done, we'll have merged back to one head
- remote_heads = repo.push(other, force=True, revs=outgoing[:current_push_size])
+ try:
+ # mercurial < 3.2
+ remote_heads = repo.push(other, force=True, revs=outgoing[:current_push_size])
+ except AttributeError:
+ # mercurial 3.2+
+ from mercurial import exchange
+ remote_heads = exchange.push(repo, other, force=True, revs=outgoing[:current_push_size])
if remote_heads: # push succeeded
outgoing = outgoing[current_push_size:]
ui.debug('pushed %d ok\n' % current_push_size)
|
Loading...