D5517: tests: use more portable flags in test-fix.t
hooper (Danny Hooper)
phabricator at mercurial-scm.org
Mon Jan 7 23:26:13 UTC 2019
hooper created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
`head --lines N` is known to not exist on OSX.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5517
AFFECTED FILES
hgext/fix.py
tests/test-fix.t
CHANGE DETAILS
diff --git a/tests/test-fix.t b/tests/test-fix.t
--- a/tests/test-fix.t
+++ b/tests/test-fix.t
@@ -173,8 +173,8 @@
in a text file by ensuring that 'sort' runs before 'head':
[fix]
- sort:command = sort --numeric-sort
- head:command = head --lines=10
+ sort:command = sort -n
+ head:command = head -n 10
sort:pattern = numbers.txt
head:pattern = numbers.txt
sort:priority = 2
@@ -1159,10 +1159,10 @@
$ cat >> .hg/hgrc <<EOF
> [fix]
- > head:command = head --lines=5
+ > head:command = head -n 5
> head:pattern = numbers.txt
> head:priority = 1
- > sort:command = sort --numeric-sort
+ > sort:command = sort -n
> sort:pattern = numbers.txt
> sort:priority = 2
> EOF
diff --git a/hgext/fix.py b/hgext/fix.py
--- a/hgext/fix.py
+++ b/hgext/fix.py
@@ -62,8 +62,8 @@
in a text file by ensuring that 'sort' runs before 'head'::
[fix]
- sort:command = sort --numeric-sort
- head:command = head --lines=10
+ sort:command = sort -n
+ head:command = head -n 10
sort:pattern = numbers.txt
head:pattern = numbers.txt
sort:priority = 2
To: hooper, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list