[PATCH 5 of 9] update: standardize error message for dirty update --check
Siddharth Agarwal
sid0 at fb.com
Mon Sep 23 23:51:02 CDT 2013
# HG changeset patch
# User Siddharth Agarwal <sid0 at 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".
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
More information about the Mercurial-devel
mailing list