# HG changeset patch # User Durham Goode # Date 1397085433 25200 # Node ID d6296f901fc71f32e30754336aae18b2cc6fac6b # Parent 61d4fb78370bc72160966fb4dc0685b5b90ae5e9 push: update push logic to match mercurial upstream Commit e10000369b47 in upstream Mercurial changed the checkpush function signature. So we need to update hgsubversion accordingly. Ran the tests against the tip of the hg repo, against a version of hg from January before the exchange module, and against a version of hg after pushoperations was added but before checkpush used it, and the tests passed in all cases. diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py --- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -180,7 +180,14 @@ def push(repo, dest, force, revs): cmdutil.bailifchanged(repo) checkpush = getattr(repo, 'checkpush', None) if checkpush: - checkpush(force, revs) + try: + # The checkpush function changed as of e10000369b47 in mercurial + from mercurial.exchange import pushoperation + pushop = pushoperation(repo, dest, force, revs, False) + checkpush(pushop) + except (ImportError, TypeError): + checkpush(force, revs) + ui = repo.ui old_encoding = util.swap_out_encoding()