# HG changeset patch # User Matt Mackall # Date 1305061726 18000 # Node ID d68ddccf276b1750b4e0b99f4038bde410b81c55 # Parent 00a0ab08f9866b9029d2e9de09e0d04e28fa7b60 cmdutil: bail_if_changed to bailifchanged diff -r 00a0ab08f986 -r d68ddccf276b hgext/rebase.py --- 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): diff -r 00a0ab08f986 -r d68ddccf276b mercurial/cmdutil.py --- 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] diff -r 00a0ab08f986 -r d68ddccf276b mercurial/commands.py --- 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"]