# HG changeset patch # User Pierre-Yves David # Date 2021-02-19 21:56:46 # Node ID 9cd4f58467af8cf237979946ab4da058033b5aa6 # Parent cb15216a52f5b86a144ea2f1c1966f119673b961 test-copies: filter out the linkrev part of `debugindex` It is not really useful for the tests and is a large source of churn when adding more revisions to the tests. Differential Revision: https://phab.mercurial-scm.org/D10050 diff --git a/tests/test-copies-chain-merge.t b/tests/test-copies-chain-merge.t --- a/tests/test-copies-chain-merge.t +++ b/tests/test-copies-chain-merge.t @@ -14,6 +14,19 @@ Setup use git diff to see rename + $ cat << EOF >> ./no-linkrev + > #!$PYTHON + > # filter out linkrev part of the debugindex command + > import sys + > for line in sys.stdin: + > if " linkrev " in line: + > print(line.rstrip()) + > else: + > l = "%s *%s" % (line[:6], line[14:].rstrip()) + > print(l) + > EOF + $ chmod +x no-linkrev + $ cat << EOF >> $HGRCPATH > [diff] > git=yes @@ -372,12 +385,12 @@ Merge: created new head $ hg mv --force i d $ hg commit -m "f-2: rename i -> d" - $ hg debugindex d + $ hg debugindex d | ../no-linkrev rev linkrev nodeid p1 p2 - 0 2 d8252ab2e760 000000000000 000000000000 (no-changeset !) - 0 2 ae258f702dfe 000000000000 000000000000 (changeset !) - 1 8 b004912a8510 000000000000 000000000000 - 2 22 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) + 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !) + 0 * ae258f702dfe 000000000000 000000000000 (changeset !) + 1 * b004912a8510 000000000000 000000000000 + 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) $ hg up 'desc("b-1")' 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-changeset !) 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (changeset !) @@ -1543,13 +1556,13 @@ The bugs makes recorded copy is differen $ hg manifest --debug --rev 'desc("b-1")' | grep '644 d' d8252ab2e760b0d4e5288fd44cbd15a0fa567e16 644 d (no-changeset !) ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 d (changeset !) - $ hg debugindex d | head -n 4 + $ hg debugindex d | head -n 4 | ../no-linkrev rev linkrev nodeid p1 p2 - 0 2 d8252ab2e760 000000000000 000000000000 (no-changeset !) - 0 2 ae258f702dfe 000000000000 000000000000 (changeset !) - 1 8 b004912a8510 000000000000 000000000000 - 2 22 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) - 2 25 5cce88bf349f ae258f702dfe 000000000000 (changeset !) + 0 * d8252ab2e760 000000000000 000000000000 (no-changeset !) + 0 * ae258f702dfe 000000000000 000000000000 (changeset !) + 1 * b004912a8510 000000000000 000000000000 + 2 * 7b79e2fe0c89 000000000000 000000000000 (no-changeset !) + 2 * 5cce88bf349f ae258f702dfe 000000000000 (changeset !) Log output should not include a merge commit as it did not happen @@ -1610,11 +1623,11 @@ Subcase: new copy information on both si b76eb76580df486c3d51d63c5c210d4dd43a8ac7 644 f $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' e8825b386367b29fec957283a80bb47b47483fe1 644 f - $ hg debugindex f + $ hg debugindex f | ../no-linkrev rev linkrev nodeid p1 p2 - 0 4 b76eb76580df 000000000000 000000000000 - 1 10 e8825b386367 000000000000 000000000000 - 2 19 2ff93c643948 b76eb76580df e8825b386367 + 0 * b76eb76580df 000000000000 000000000000 + 1 * e8825b386367 000000000000 000000000000 + 2 * 2ff93c643948 b76eb76580df e8825b386367 #else $ hg manifest --debug --rev 'desc("mAEm-0")' | grep '644 f' ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f @@ -1624,9 +1637,9 @@ Subcase: new copy information on both si ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f $ hg manifest --debug --rev 'desc("e-2")' | grep '644 f' ae258f702dfeca05bf9b6a22a97a4b5645570f11 644 f - $ hg debugindex f + $ hg debugindex f | ../no-linkrev rev linkrev nodeid p1 p2 - 0 4 ae258f702dfe 000000000000 000000000000 + 0 * ae258f702dfe 000000000000 000000000000 #endif # Here the filelog based implementation is not looking at the rename