[PATCH] fix obsolete option for head
Benoit Boissinot
benoit.boissinot at ens-lyon.org
Fri Nov 11 14:25:22 UTC 2005
On Thu, Sep 08, 2005 at 11:02:44AM +0200, Benoit Boissinot wrote:
> On 9/8/05, Florian Weimer <fw at deneb.enyo.de> wrote:
> > * Benoit Boissinot:
> >
> > > -head -3 port > port1
> > > +head -n 3 port > port1
> >
> > This change is wrong and reduces portability to old systems. If this
> > is a problem, use "sed 3q".
Since it is in the test directory and other tests use the posix
compliant version (head -n), i doubt people with old systems will
be bothered and i think the patch should be applied.
regards,
Benoit
# HG changeset patch
# User Benoit Boissinot <benoit.boissinot at ens-lyon.org>
# Node ID 377bd9b45a059f3891bc16a3a8266b631cfe93ab
# Parent c85e5bbfd141ca56e840ebaf4499faa2c6ccf839
use posix compliant option for head
head -N is not posix compliant, head -n N should be used instead
diff -r c85e5bbfd141 -r 377bd9b45a05 tests/test-grep
--- a/tests/test-grep Wed Nov 9 13:42:16 2005 -0800
+++ b/tests/test-grep Fri Nov 11 15:23:45 2005 +0100
@@ -14,7 +14,7 @@
hg commit -m 2 -u spam -d '2 0'
echo 'import/export' >> port
hg commit -m 3 -u eggs -d '3 0'
-head -3 port > port1
+head -n 3 port > port1
mv port1 port
hg commit -m 4 -u spam -d '4 0'
hg grep port port
More information about the Mercurial
mailing list