diff --git a/git-remote-hg b/git-remote-hg index c24f4f9..54a6949 100755 --- a/git-remote-hg +++ b/git-remote-hg @@ -1016,7 +1016,13 @@ def checkheads(repo, remote, p_revs): return ret -def push_unsafe(repo, remote, parsed_refs, p_revs): +def push(repo, remote, parsed_refs, p_revs): + if hasattr(remote, 'canpush') and not remote.canpush(): + print("error cannot push") + + if not p_revs: + # nothing to push + return force = force_push @@ -1050,16 +1056,6 @@ def push_unsafe(repo, remote, parsed_refs, p_revs): return ret -def push(repo, remote, parsed_refs, p_revs): - if hasattr(remote, 'canpush') and not remote.canpush(): - print("error cannot push") - - if not p_revs: - # nothing to push - return - - return push_unsafe(repo, remote, parsed_refs, p_revs) - def check_tip(ref, kind, name, heads): try: ename = '%s/%s' % (kind, name)