Patchwork [5,of,9] update: standardize error message for dirty update --check

login
register
mail settings
Submitter Siddharth Agarwal
Date Sept. 24, 2013, 4:51 a.m.
Message ID <b23d3c39a94127cbe900.1379998262@dev1091.prn1.facebook.com>
Download mbox | patch
Permalink /patch/2617/
State Accepted
Commit 41abe2e3e3b7828de0d3bfa66016c70f52d8324d
Headers show

Comments

Siddharth Agarwal - Sept. 24, 2013, 4:51 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1379993582 25200
#      Mon Sep 23 20:33:02 2013 -0700
# Node ID b23d3c39a94127cbe90085b3dde47084282f3ed2
# Parent  f12996d75571ec2568906159e39277ade0579681
update: standardize error message for dirty update --check

This and following patches will standardize the error message for dirty working
directories to "uncommitted changes".

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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])
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -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().
diff --git a/tests/test-casecollision-merge.t b/tests/test-casecollision-merge.t
--- a/tests/test-casecollision-merge.t
+++ b/tests/test-casecollision-merge.t
@@ -293,7 +293,7 @@ 
   [255]
 
   $ hg update --check
-  abort: uncommitted local changes
+  abort: uncommitted changes
   [255]
 
   $ hg update --clean
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -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
diff --git a/tests/test-merge5.t b/tests/test-merge5.t
--- a/tests/test-merge5.t
+++ b/tests/test-merge5.t
@@ -19,7 +19,7 @@ 
   [255]
   $ rm b
   $ hg update -c
-  abort: uncommitted local changes
+  abort: uncommitted changes
   [255]
   $ hg revert b
   $ hg update -c
diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t
--- a/tests/test-update-branches.t
+++ b/tests/test-update-branches.t
@@ -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
 
diff --git a/tests/test-update-issue1456.t b/tests/test-update-issue1456.t
--- a/tests/test-update-issue1456.t
+++ b/tests/test-update-issue1456.t
@@ -18,7 +18,7 @@ 
 
   $ echo dirty > foo
   $ hg up -c
-  abort: uncommitted local changes
+  abort: uncommitted changes
   [255]
   $ hg up -q
   $ cat foo