[PATCH] 'hg status -q' output skips non-tracked files

Thomas Arendsen Hein thomas at intevation.de
Sun Mar 2 13:59:53 CST 2008


* Thomas Arendsen Hein <thomas at intevation.de> [20080302 19:19]:
> * Jesse Glick <jesse.glick at sun.com> [20080302 16:38]:
> > ERROR: test-status output changed
> > --- Expected output
> > +++ Test output
> > @@ -124,3 +124,7 @@
> >   adding deleted
> >   adding modified
> >   adding removed
> > +/space/src/hg/tests/test-status: 65: function: not found
> > +[: 78: 0: unexpected operator
> > +[: 81: -ne: argument expected
> > +/space/src/hg/tests/test-status: 82: Syntax error: "}" unexpected
> > 
> > ERROR: test-status failed with error code 2
> 
> I can reproduce this with a non-bash /bin/sh and will look at how to
> fix it later.

That was an easy one (I just looked at the body of the assert
function when reviewing this). Additionally I run checkbashisms
which only stumbled over some inline python code, but was otherwise
happy.

# HG changeset patch
# User Thomas Arendsen Hein <thomas at intevation.de>
# Date 1204487640 -3600
# Node ID 0ab0da2215d7559de2cd8b97818da1ae3fa76658
# Parent  305d4450036a9293eec7b3b057be34fd539f4538
test-status: Make assert function definition sh compatible.

diff -r 305d4450036a -r 0ab0da2215d7 tests/test-status
--- a/tests/test-status	Sun Mar 02 13:52:34 2008 +0100
+++ b/tests/test-status	Sun Mar 02 20:54:00 2008 +0100
@@ -62,7 +62,7 @@ hg copy modified copied
 # Run status with 2 different flags.
 # Check if result is the same or different.
 # If result is not as expected, raise error
-function assert {
+assert() {
     hg status $1 > ../a
     hg status $2 > ../b
     out=`diff ../a ../b`

-- 
thomas at intevation.de - http://intevation.de/~thomas/ - OpenPGP key: 0x5816791A
Intevation GmbH, Osnabrueck - Register: Amtsgericht Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner


More information about the Mercurial-devel mailing list