Mercurial > evolve
comparison tests/_exc-util.sh @ 1001:f7f4a1fac6c0
test: use `hg log` in the `getid` function
using `hg id` to retrieve full lenght node requires to use --debug. This may
include debug output (regarding branch cache invalidation for example) that
breaks the test. We now use `hg log` with a custom template. This is a simple,
clean and robust solution.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 25 Jul 2014 14:27:16 +0200 |
parents | b177fde040dd |
children | 59bc29c84ce0 |
comparison
equal
deleted
inserted
replaced
1000:8043ae3612e4 | 1001:f7f4a1fac6c0 |
---|---|
18 echo "$1" > "$1" | 18 echo "$1" > "$1" |
19 hg add "$1" | 19 hg add "$1" |
20 hg ci -m "$1" | 20 hg ci -m "$1" |
21 } | 21 } |
22 getid() { | 22 getid() { |
23 hg id --hidden --debug -ir "$1" | 23 hg log --hidden --template '{node}\n' --rev "$1" |
24 } | 24 } |
25 | 25 |
26 setuprepos() { | 26 setuprepos() { |
27 echo creating test repo for test case $1 | 27 echo creating test repo for test case $1 |
28 mkdir $1 | 28 mkdir $1 |