# HG changeset patch # User Martin von Zweigbergk # Date 2019-05-07 05:06:23 # Node ID d5b35d6972a503f819a9c484f73928d32ffbd28c # Parent d1c7446d0c58e812bed2d0a8f697966c24063df4 tests: update annotate tests to work around simplemerge bug test-annotate.t and test-fastannotate.hg were failing with --pure since 57203e0210f8 (copies: calculate mergecopies() based on pathcopies(), 2019-04-11). It turned out to be because the pure file merge code behaved differently. I'm guessing it's the mdiff.get_matching_blocks() that behaves differently, but I haven't confirmed that. With this content in the base: a a a And this on the local side: a z a And this on the other side: a a a b4 c b6 It produced this conflict: a z a <<<<<<< working copy: b80e3e32f75a - test: c ||||||| base a ======= a b4 c b5 >>>>>>> merge rev: 64afcdf8e29e - test: mergeb I don't care enough about the pure Python code to fix it, so this patch just updates the tests to manually resolve the conflict. Differential Revision: https://phab.mercurial-scm.org/D6351 diff --git a/tests/test-annotate.t b/tests/test-annotate.t --- a/tests/test-annotate.t +++ b/tests/test-annotate.t @@ -273,10 +273,31 @@ annotate after merge with -l > EOF $ hg ci -mc -d '3 0' created new head +Work around the pure version not resolving the conflict like native code +#if pure + $ hg merge + merging b + warning: conflicts while merging b! (edit, then use 'hg resolve --mark') + 0 files updated, 0 files merged, 0 files removed, 1 files unresolved + use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon + [1] + $ cat < b + > a + > z + > a + > b4 + > c + > b5 + > EOF + $ hg resolve -m b + (no more unresolved files) + $ rm b.orig +#else $ hg merge merging b 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) +#endif $ echo d >> b $ hg ci -mmerge2 -d '4 0' diff --git a/tests/test-fastannotate-hg.t b/tests/test-fastannotate-hg.t --- a/tests/test-fastannotate-hg.t +++ b/tests/test-fastannotate-hg.t @@ -273,10 +273,31 @@ annotate after merge with -l > EOF $ hg ci -mc -d '3 0' created new head +Work around the pure version not resolving the conflict like native code +#if pure + $ hg merge + merging b + warning: conflicts while merging b! (edit, then use 'hg resolve --mark') + 0 files updated, 0 files merged, 0 files removed, 1 files unresolved + use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon + [1] + $ cat < b + > a + > z + > a + > b4 + > c + > b5 + > EOF + $ hg resolve -m b + (no more unresolved files) + $ rm b.orig +#else $ hg merge merging b 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) +#endif $ echo d >> b $ hg ci -mmerge2 -d '4 0'