Commits

Luke Plant committed 004c228

Fixed crasher with Mercurial 1.9 due to renamed cmdutil function

Comments (0)

Files changed (1)

         os.unlink(os.path.join(repo.path, 'histedit-state'))
         return
     else:
-        cmdutil.bail_if_changed(repo)
+        if hasattr(cmdutil, 'bail_if_changed'):
+            # Mercurial < 1.9
+            cmdutil.bail_if_changed(repo)
+        else:
+            cmdutil.bailifchanged(repo)
+
         if os.path.exists(os.path.join(repo.path, 'histedit-state')):
             raise util.Abort('history edit already in progress, try '
                              '--continue or --abort')