--- a/tests/test-remove.t Tue Aug 31 16:36:31 2010 +0200
+++ b/tests/test-remove.t Wed Sep 01 12:28:34 2010 +0200
@@ -1,5 +1,6 @@
$ remove() {
> hg rm $@
+ > echo "exit code: $?"
> hg st
> # do not use ls -R, which recurses in .hg subdirs on Mac OS X 10.5
> find . -name .hg -prune -o -type f -print | sort
@@ -14,6 +15,7 @@
$ remove foo
not removing foo: file is untracked
+ exit code: 1
? foo
./foo
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -28,6 +30,7 @@
$ hg add bar
$ remove bar
not removing bar: file has been marked for add (use -f to force removal)
+ exit code: 1
A bar
./bar
./foo
@@ -36,6 +39,7 @@
01 state clean, options none
$ remove foo
+ exit code: 0
R foo
? bar
./bar
@@ -46,6 +50,7 @@
$ echo b >> foo
$ remove foo
not removing foo: file is modified (use -f to force removal)
+ exit code: 1
M foo
? bar
./bar
@@ -56,6 +61,7 @@
$ rm foo
$ remove foo
+ exit code: 0
R foo
? bar
./bar
@@ -66,6 +72,7 @@
$ echo b > bar
$ hg add bar
$ remove -f bar
+ exit code: 0
? bar
./bar
./foo
@@ -75,6 +82,7 @@
11 state clean, options -f
$ remove -f foo
+ exit code: 0
R foo
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -82,6 +90,7 @@
$ echo b >> foo
$ remove -f foo
+ exit code: 0
R foo
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -89,6 +98,7 @@
$ rm foo
$ remove -f foo
+ exit code: 0
R foo
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -98,6 +108,7 @@
$ hg add bar
$ remove -A bar
not removing bar: file still exists (use -f to force removal)
+ exit code: 1
A bar
./bar
./foo
@@ -107,6 +118,7 @@
$ remove -A foo
not removing foo: file still exists (use -f to force removal)
+ exit code: 1
? bar
./bar
./foo
@@ -117,6 +129,7 @@
$ echo b >> foo
$ remove -A foo
not removing foo: file still exists (use -f to force removal)
+ exit code: 1
M foo
? bar
./bar
@@ -127,6 +140,7 @@
$ rm foo
$ remove -A foo
+ exit code: 0
R foo
? bar
./bar
@@ -137,6 +151,7 @@
$ echo b > bar
$ hg add bar
$ remove -Af bar
+ exit code: 0
? bar
./bar
./foo
@@ -146,6 +161,7 @@
31 state clean, options -Af
$ remove -Af foo
+ exit code: 0
R foo
./foo
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -154,6 +170,7 @@
$ echo b >> foo
$ remove -Af foo
+ exit code: 0
R foo
./foo
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -162,6 +179,7 @@
$ rm foo
$ remove -Af foo
+ exit code: 0
R foo
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -180,6 +198,7 @@
$ remove test
removing test/bar
removing test/foo
+ exit code: 0
R test/bar
R test/foo
./foo
@@ -191,6 +210,7 @@
$ remove -f test
removing test/bar
removing test/foo
+ exit code: 0
R test/bar
R test/foo
./foo
@@ -202,6 +222,7 @@
$ remove -A test
not removing test/foo: file still exists (use -f to force removal)
removing test/bar
+ exit code: 1
R test/bar
./foo
./test/foo
@@ -213,6 +234,7 @@
$ remove -Af test
removing test/bar
removing test/foo
+ exit code: 0
R test/bar
R test/foo
./foo