# HG changeset patch # User Matt Mackall # Date 2012-01-29 18:59:11 # Node ID 73da3e2b185fc72ca8e9e4d4435ec94db0cafa08 # Parent 2494a8b42dfbce110feed459dd15f3cba885782c # Parent f8955a7f82e6a06a682cd95631fd1c5e55f46103 merge with i18n diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -71,6 +71,7 @@ testpats = [ (r'[^>\n]>\s*\$HGRCPATH', "don't overwrite $HGRCPATH, append to it"), (r'^stop\(\)', "don't use 'stop' as a shell function name"), (r'(\[|\btest\b).*-e ', "don't use 'test -e', use 'test -f'"), + (r'^alias\b.*=', "don't use alias, use a function"), ], # warnings [] diff --git a/tests/test-diff-unified.t b/tests/test-diff-unified.t --- a/tests/test-diff-unified.t +++ b/tests/test-diff-unified.t @@ -107,17 +107,6 @@ 0 lines of context hunk header matches g > c3 > c4 > EOF - $ diff -U0 f1 f2 - --- f1 * (glob) - +++ f2 * (glob) - @@ -0,0 +1 @@ - +c1 - @@ -1,0 +3 @@ - +c3 - @@ -3 +4,0 @@ - -c5 - [1] - $ mv f2 f1 $ hg diff -U0 --nodates diff -r 55d8ff78db23 f1 diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t --- a/tests/test-phases-exchange.t +++ b/tests/test-phases-exchange.t @@ -2,7 +2,7 @@ > [extensions] > graphlog= > EOF - $ alias hgph='hg log -G --template "{rev} {phase} {desc} - {node|short}\n"' + $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; } $ mkcommit() { > echo "$1" > "$1" diff --git a/tests/test-phases.t b/tests/test-phases.t --- a/tests/test-phases.t +++ b/tests/test-phases.t @@ -1,4 +1,4 @@ - $ alias hglog='hg log --template "{rev} {phaseidx} {desc}\n"' + $ hglog() { hg log --template "{rev} {phaseidx} {desc}\n" $*; } $ mkcommit() { > echo "$1" > "$1" > hg add "$1" diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t --- a/tests/test-run-tests.t +++ b/tests/test-run-tests.t @@ -18,7 +18,7 @@ Multi-line command: Return codes before inline python: - $ false + $ sh -c 'exit 1' [1] Doctest commands: