changeset 802:d50858a8a17b

wrapper: fix bail_if_changed() after hg.d68ddccf276b Original fix by Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
author Patrick Mezard <pmezard@gmail.com>
date Sat, 14 May 2011 21:44:07 +0200
parents 37ad86983a6d
children 6b1ad75f8cda
files hgsubversion/wrappers.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -122,7 +122,11 @@ def push(repo, dest, force, revs):
     """push revisions starting at a specified head back to Subversion.
     """
     assert not revs, 'designated revisions for push remains unimplemented.'
-    cmdutil.bail_if_changed(repo)
+    if hasattr(cmdutil, 'bail_if_changed'):
+        cmdutil.bail_if_changed(repo)
+    else:
+        # Since 1.9 (d68ddccf276b)
+        cmdutil.bailifchanged(repo)
     checkpush = getattr(repo, 'checkpush', None)
     if checkpush:
         checkpush(force, revs)