changeset 14289:d68ddccf276b

cmdutil: bail_if_changed to bailifchanged
author Matt Mackall <mpm@selenic.com>
date Tue, 10 May 2011 16:08:46 -0500
parents 00a0ab08f986
children 86e70956da4f
files hgext/rebase.py mercurial/cmdutil.py mercurial/commands.py
diffstat 3 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Sun May 08 23:27:48 2011 +0200
+++ b/hgext/rebase.py	Tue May 10 16:08:46 2011 -0500
@@ -132,7 +132,7 @@
                 if basef:
                     raise util.Abort(_('cannot specify a base with detach'))
 
-            cmdutil.bail_if_changed(repo)
+            cmdutil.bailifchanged(repo)
             result = buildstate(repo, destf, srcf, basef, detachf)
             if not result:
                 # Empty state built, nothing to rebase
@@ -531,7 +531,7 @@
             ui.debug('--update and --rebase are not compatible, ignoring '
                      'the update flag\n')
 
-        cmdutil.bail_if_changed(repo)
+        cmdutil.bailifchanged(repo)
         revsprepull = len(repo)
         origpostincoming = commands.postincoming
         def _dummy(*args, **kwargs):
--- a/mercurial/cmdutil.py	Sun May 08 23:27:48 2011 +0200
+++ b/mercurial/cmdutil.py	Tue May 10 16:08:46 2011 -0500
@@ -78,7 +78,7 @@
 
     return p
 
-def bail_if_changed(repo):
+def bailifchanged(repo):
     if repo.dirstate.p2() != nullid:
         raise util.Abort(_('outstanding uncommitted merge'))
     modified, added, removed, deleted = repo.status()[:4]
--- a/mercurial/commands.py	Sun May 08 23:27:48 2011 +0200
+++ b/mercurial/commands.py	Tue May 10 16:08:46 2011 -0500
@@ -243,7 +243,7 @@
     if date:
         opts['date'] = util.parsedate(date)
 
-    cmdutil.bail_if_changed(repo)
+    cmdutil.bailifchanged(repo)
     node = cmdutil.revsingle(repo, rev).node()
 
     op1, op2 = repo.dirstate.parents()
@@ -426,7 +426,7 @@
                 # bisect
                 nodes, changesets, good = hbisect.bisect(repo.changelog, state)
                 # update to next check
-                cmdutil.bail_if_changed(repo)
+                cmdutil.bailifchanged(repo)
                 hg.clean(repo, nodes[0], show_stats=False)
         finally:
             hbisect.save_state(repo, state)
@@ -462,7 +462,7 @@
                          % (extendnode.rev(), extendnode)))
                 if noupdate:
                     return
-                cmdutil.bail_if_changed(repo)
+                cmdutil.bailifchanged(repo)
                 return hg.clean(repo, extendnode.node())
         raise util.Abort(_("nothing to extend"))
 
@@ -480,7 +480,7 @@
                    "(%d changesets remaining, ~%d tests)\n")
                  % (rev, short(node), changesets, tests))
         if not noupdate:
-            cmdutil.bail_if_changed(repo)
+            cmdutil.bailifchanged(repo)
             return hg.clean(repo, node)
 
 def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False,
@@ -2606,7 +2606,7 @@
         raise util.Abort(_('similarity must be between 0 and 100'))
 
     if opts.get('exact') or not opts.get('force'):
-        cmdutil.bail_if_changed(repo)
+        cmdutil.bailifchanged(repo)
 
     d = opts["base"]
     strip = opts["strip"]