update: standardize error message for dirty update --check
authorSiddharth Agarwal <sid0@fb.com>
Mon, 23 Sep 2013 20:33:02 -0700
changeset 19801 41abe2e3e3b7
parent 19800 4894e0d9462d
child 19802 94c394653b2a
update: standardize error message for dirty update --check This and following patches will standardize the error message for dirty working directories to "uncommitted changes".
mercurial/commands.py
mercurial/merge.py
tests/test-casecollision-merge.t
tests/test-largefiles.t
tests/test-merge5.t
tests/test-update-branches.t
tests/test-update-issue1456.t
--- a/mercurial/commands.py	Mon Sep 23 20:08:52 2013 -0700
+++ b/mercurial/commands.py	Mon Sep 23 20:33:02 2013 -0700
@@ -5850,7 +5850,7 @@
     if check:
         c = repo[None]
         if c.dirty(merge=False, branch=False, missing=True):
-            raise util.Abort(_("uncommitted local changes"))
+            raise util.Abort(_("uncommitted changes"))
         if rev is None:
             rev = repo[repo[None].branch()].rev()
         mergemod._checkunknown(repo, repo[None], repo[rev])
--- a/mercurial/merge.py	Mon Sep 23 20:08:52 2013 -0700
+++ b/mercurial/merge.py	Mon Sep 23 20:33:02 2013 -0700
@@ -669,7 +669,7 @@
     2 = abort: uncommitted changes (commit and merge, or update --clean to
                  discard changes)
     3 = abort: uncommitted changes (commit or update --clean to discard changes)
-    4 = abort: uncommitted local changes
+    4 = abort: uncommitted changes (checked in commands.py)
     5 = incompatible options (checked in commands.py)
 
     Return the same tuple as applyupdates().
--- a/tests/test-casecollision-merge.t	Mon Sep 23 20:08:52 2013 -0700
+++ b/tests/test-casecollision-merge.t	Mon Sep 23 20:33:02 2013 -0700
@@ -293,7 +293,7 @@
   [255]
 
   $ hg update --check
-  abort: uncommitted local changes
+  abort: uncommitted changes
   [255]
 
   $ hg update --clean
--- a/tests/test-largefiles.t	Mon Sep 23 20:08:52 2013 -0700
+++ b/tests/test-largefiles.t	Mon Sep 23 20:33:02 2013 -0700
@@ -1104,7 +1104,7 @@
 
 "update --check" refuses to update with uncommitted changes.
   $ hg update --check 8
-  abort: uncommitted local changes
+  abort: uncommitted changes
   [255]
 
 "update --clean" leaves correct largefiles in working copy, even when there is
--- a/tests/test-merge5.t	Mon Sep 23 20:08:52 2013 -0700
+++ b/tests/test-merge5.t	Mon Sep 23 20:33:02 2013 -0700
@@ -19,7 +19,7 @@
   [255]
   $ rm b
   $ hg update -c
-  abort: uncommitted local changes
+  abort: uncommitted changes
   [255]
   $ hg revert b
   $ hg update -c
--- a/tests/test-update-branches.t	Mon Sep 23 20:08:52 2013 -0700
+++ b/tests/test-update-branches.t	Mon Sep 23 20:33:02 2013 -0700
@@ -157,12 +157,12 @@
   parent=2
 
   $ revtest '-c dirty linear'   dirty 1 2 -c
-  abort: uncommitted local changes
+  abort: uncommitted changes
   parent=1
   M foo
 
   $ revtest '-c dirtysub linear'   dirtysub 1 2 -c
-  abort: uncommitted local changes
+  abort: uncommitted changes
   parent=1
   M sub/suba
 
--- a/tests/test-update-issue1456.t	Mon Sep 23 20:08:52 2013 -0700
+++ b/tests/test-update-issue1456.t	Mon Sep 23 20:33:02 2013 -0700
@@ -18,7 +18,7 @@
 
   $ echo dirty > foo
   $ hg up -c
-  abort: uncommitted local changes
+  abort: uncommitted changes
   [255]
   $ hg up -q
   $ cat foo