changeset 24162:758dd85b6ad6

test-obsolete: use 'log -T {node}' instead of 'id --debug -i' to lookup hash I ran into a case when adding a test where there were cryptic hg command line errors. I eventually traced it back to 'hg id' printing debug messages before the hash: invalid branchheads cache (served): tip differs <hash> This method should eliminate any other output except the node.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 28 Feb 2015 01:12:54 -0500
parents 7a2194473155
children bb11081562d7
files tests/test-obsolete.t
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-obsolete.t	Fri Feb 27 17:46:03 2015 -0600
+++ b/tests/test-obsolete.t	Sat Feb 28 01:12:54 2015 -0500
@@ -11,7 +11,7 @@
   >    hg ci -m "add $1"
   > }
   $ getid() {
-  >    hg id --debug --hidden -ir "desc('$1')"
+  >    hg log -T "{node}\n" --hidden -r "desc('$1')"
   > }
 
   $ cat > debugkeys.py <<EOF
@@ -621,7 +621,7 @@
 
 check filelog view
 
-  $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg id --debug --id`/'babar'
+  $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar'
   200 Script output follows
 
   $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/68'