tests: add test for
issue5343 (grafting with copies)
It seems that
issue5353 resulted in a lot of tests in test-graft.t,
but the bug actually reported in that issue didn't get a test
case. This patch adds one for the "move" and one for the "copy"
version of it. I also added a "copy+modify" case, to show what should
be a merge conflict. I didn't add one for the "backwards" version of
it since the comment says that that was already covered by previous
work.
The tests added by this patch show the broken behavior (the bug is
still open). I suspect the results returned from mergecopies() are not
expressive enough to fix this issue: it has a dict for copies to merge
with, but that can only give one more filename, but here we need two
(one for the path on the remote side and one for the path in the merge
base). I want to have it tested anyway since I'm about to refactor
mergecopies().
Differential Revision: https://phab.mercurial-scm.org/D6242
$ hg init repo
$ cd repo
$ touch foo
$ hg ci -Am 'add foo'
adding foo
$ hg up -C null
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
this should be stored as a delta against rev 0
$ echo foo bar baz > foo
$ hg ci -Am 'add foo again'
adding foo
created new head
$ hg debugindex foo
rev linkrev nodeid p1 p2
0 0 b80de5d13875 000000000000 000000000000
1 1 0376abec49b8 000000000000 000000000000
$ cd ..