Mercurial > hg
changeset 32007:f12b6185d435
testlib: move the prune alias into a shell script for Windows
Cramming all of this directly into an alias doesn't play nicely on Windows.
Various test-exchange-obsmarkers-case-XX.t were failing with:
abort: cannot select revision when creating marker
It turned out that inside debugcommands.debugobsolete(), the following differed
from Linux (where they were empty, at least in the case I debugged):
'rev': ['.`;'],
'template': "'{node}\\n'"
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 16 Apr 2017 00:29:38 -0400 |
parents | c84c83b5df0f |
children | 9a782e7e651e |
files | tests/testlib/exchange-obsmarker-util.sh |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/testlib/exchange-obsmarker-util.sh Sat Apr 15 18:13:10 2017 +0200 +++ b/tests/testlib/exchange-obsmarker-util.sh Sun Apr 16 00:29:38 2017 -0400 @@ -1,6 +1,13 @@ #!/bin/sh # setup config and various utility to test obsolescence marker exchanges tests +cat >> $TESTTMP/prune.sh << EOF +rev=\`hg log --hidden --template '{node}\n' --rev "\$3"\` + +hg debugobsolete --record-parents \$1 "\$2" \$rev \ + && hg up --quiet 'max((::.) - obsolete())' +EOF + cat >> $HGRCPATH <<EOF [web] # We test http pull and push, drop authentication requirement @@ -29,8 +36,7 @@ # fix date used to create obsolete markers. debugobsolete=debugobsolete -d '0 0' # poor man substiture to the evolve 'hg prune'. using prune makes the test clearer and -prune =!hg debugobsolete --record-parents \$1 "\$2" \`hg log --hidden --template '{node}\n' --rev "\$3"\`;\ - hg up --quiet 'max((::.) - obsolete())' +prune = !sh $TESTTMP/prune.sh \$1 "\$2" "\$3" EOF mkcommit() {