# HG changeset patch # User Durham Goode # Date 1397085433 25200 # Node ID 8b20e1bbcd239d54a3d098c0f8d64f596bb01646 # Parent c55b94dc3a4831208b7b1888d1d6f2f1496480e6 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()