Patchwork [8,of,9] cmdutil.bailifchanged: standardize error message for dirty working dir

login
register
mail settings
Submitter Siddharth Agarwal
Date Sept. 24, 2013, 4:51 a.m.
Message ID <f09250867ab6ad487a2f.1379998265@dev1091.prn1.facebook.com>
Download mbox | patch
Permalink /patch/2620/
State Accepted
Commit 061ce98c888d9983cee0101ee76c853e1c570aaf
Headers show

Comments

Siddharth Agarwal - Sept. 24, 2013, 4:51 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1379997097 25200
#      Mon Sep 23 21:31:37 2013 -0700
# Node ID f09250867ab6ad487a2f1bfadc1f204b4db7ccdd
# Parent  810004375c9648296a4716567f63a541f7ecc70c
cmdutil.bailifchanged: standardize error message for dirty working dir

This affects rebase, graft, histedit, and other similar commands.

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -84,7 +84,7 @@ 
         raise util.Abort(_('outstanding uncommitted merge'))
     modified, added, removed, deleted = repo.status()[:4]
     if modified or added or removed or deleted:
-        raise util.Abort(_("outstanding uncommitted changes"))
+        raise util.Abort(_('uncommitted changes'))
     ctx = repo[None]
     for s in sorted(ctx.substate):
         if ctx.sub(s).dirty():
diff --git a/tests/test-graft.t b/tests/test-graft.t
--- a/tests/test-graft.t
+++ b/tests/test-graft.t
@@ -71,7 +71,7 @@ 
   $ hg up -q 0
   $ echo foo > a
   $ hg graft 1
-  abort: outstanding uncommitted changes
+  abort: uncommitted changes
   [255]
   $ hg revert a