https://bz.mercurial-scm.org/show_bug.cgi?id=6163
Bug ID: 6163 Summary: rebasing when copy source is unrelated is broken Product: Mercurial Version: 4.8 Hardware: PC OS: Linux Status: UNCONFIRMED Severity: bug Priority: wish Component: rebase Assignee: bugzi...@mercurial-scm.org Reporter: martinv...@google.com CC: mercurial-devel@mercurial-scm.org Consider this history: @ 4 'rename x to y' | o 3 'add x again' | | o 2 'modify x' | | | o 1 'add x' |/ o 0 'base' Assume 1 and 3 have the same content so there is no conflict. We now do `hg rebase -r 2 -d 4`. We would expect that to merge the changed file 'x' from commit 2 into file 'y'. However, we instead get a moidfy/delete conflict since 57203e0210f8 (copies: calculate mergecopies() based on pathcopies(), 2019-04-11). The issue is that pathcopies() considers 'x' in commit 1 and 'x' in commit 3 to be unrelated since it chains the copies in 0->1 with the copies in 0->4. It's technically correct that they are not related, but this case happens quite frequently in practice, so we need to handle it better. Also consider this similar case: @ 4 'rename x to y' | o 3 'add x again' | o 2 'remove x' | | o 1 'modify x' |/ o 0 'add x' The 'x' in commit 0 and the 'x' in commit 3 are technically not related here either. However, pathcopies() doesn't handle that case so it still considers them related. I consider it a bug in pathcopies(). I've meant to fix that bug, but we clearly need to fix the bug above first. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel