# HG changeset patch # User Pierre-Yves David # Date 1406291236 -7200 # Node ID b96c9af18453517f41dd04f0fe954f9cf5fdb7a9 # Parent 205d549a972fc9d0e16c8372619b0d6d118443b8 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. diff -r 205d549a972f -r b96c9af18453 hgext/drophack.py --- a/hgext/drophack.py Wed Jul 30 13:38:33 2014 -0700 +++ b/hgext/drophack.py Fri Jul 25 14:27:16 2014 +0200 @@ -106,7 +106,7 @@ # lock from the beginning to prevent race wlock = lock = None try: - lock = repo.wlock() + wlock = repo.wlock() lock = repo.lock() # check they have no children if repo.revs('%ld and public()', revs): diff -r 205d549a972f -r b96c9af18453 tests/_exc-util.sh --- a/tests/_exc-util.sh Wed Jul 30 13:38:33 2014 -0700 +++ b/tests/_exc-util.sh Fri Jul 25 14:27:16 2014 +0200 @@ -20,7 +20,7 @@ hg ci -m "$1" } getid() { - hg id --hidden --debug -ir "$1" + hg log --hidden --template '{node}\n' --rev "$1" } setuprepos() { diff -r 205d549a972f -r b96c9af18453 tests/test-exchange-A5.t --- a/tests/test-exchange-A5.t Wed Jul 30 13:38:33 2014 -0700 +++ b/tests/test-exchange-A5.t Fri Jul 25 14:27:16 2014 +0200 @@ -54,7 +54,6 @@ $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'` $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'` $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` - invalid branchheads cache (served): tip differs $ hg log -G --hidden @ 8c0a98c83722 (draft): A1 | diff -r 205d549a972f -r b96c9af18453 tests/test-exchange-C4.t --- a/tests/test-exchange-C4.t Wed Jul 30 13:38:33 2014 -0700 +++ b/tests/test-exchange-C4.t Fri Jul 25 14:27:16 2014 +0200 @@ -56,7 +56,6 @@ created new head $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'` $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'` - invalid branchheads cache (served): tip differs $ hg prune -qd '0 0' . $ hg log -G --hidden x 7f7f229b13a6 (draft): C diff -r 205d549a972f -r b96c9af18453 tests/test-exchange-D4.t --- a/tests/test-exchange-D4.t Wed Jul 30 13:38:33 2014 -0700 +++ b/tests/test-exchange-D4.t Fri Jul 25 14:27:16 2014 +0200 @@ -49,7 +49,6 @@ $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A1)'` $ hg debugobsolete `getid 'desc(B0)'` bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B1)'` - invalid branchheads cache (served): tip differs $ hg log -G --hidden @ 069b05c3876d (draft): B1 |