[PATCH] remove: properly set return code when warnings are issued

Martin Geisler mg at lazybytes.net
Wed Sep 1 05:32:42 CDT 2010


Brodie Rao <brodie at bitheap.org> writes:

> # HG changeset patch
> # User Brodie Rao <brodie at bitheap.org>
> # Date 1283214445 14400
> # Branch stable
> # Node ID 91142314b384998289aa06e239b4c426e00adda3
> # Parent  ee601a6264e0e78caa36a43709494669214fccfe
> remove: properly set return code when warnings are issued

Very nice, I pushed this on the stable branch (07ac2a560fce).

When I ran the updated test, the exit codes were output a bit later than
the .out file expected -- I guess you made the .out file with an echo
statement right after the 'hg rm' call? No problem, I changed the test
back to echo the exit code after each 'hg rm' call :)

The changes looked like this:

ERROR: /home/mg/src/mercurial-crew/tests/test-remove output changed
--- /home/mg/src/mercurial-crew/tests/test-remove.out 
+++ /home/mg/src/mercurial-crew/tests/test-remove.err 
@@ -1,16 +1,16 @@
 % file not managed
 not removing foo: file is untracked
-1
 ? foo
 ./foo
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+1
 % 00 state added, options none
 not removing bar: file has been marked for add (use -f to force removal)
-1
 A bar
 ./bar
 ./foo
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+1
 % 01 state clean, options none
 R foo
 ? bar


-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100901/f4f5b3d2/attachment.pgp>


More information about the Mercurial-devel mailing list