# HG changeset patch # User Matt Harbison # Date 1425103974 18000 # Node ID 758dd85b6ad621de82fa2028ea34f16a75599f87 # Parent 7a21944731557cd18dc5c53969318d80ec547e2d 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 This method should eliminate any other output except the node. diff -r 7a2194473155 -r 758dd85b6ad6 tests/test-obsolete.t --- 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 <