[Bug 4797] New: Inconsistent behavior when merging divergent bookmarks

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Thu Aug 27 13:46:08 UTC 2015


http://bz.selenic.com/show_bug.cgi?id=4797

          Priority: normal
            Bug ID: 4797
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Inconsistent behavior when merging divergent bookmarks
          Severity: bug
    Classification: Unclassified
                OS: Windows
          Reporter: gabor.stefanik at nng.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 3.5
         Component: bookmarks
           Product: Mercurial

In a repository with divergent bookmarks (e.g. "bookmark" and
"bookmark at default"), merging shows inconsistent behavior depending on which
direction the merge is performed in:

Updating to "bookmark" and issuing "hg merge" without a revision automatically
finds "bookmark at default" as the partner. After merging, "bookmark" moves to the
merge commit, while "bookmark at default" is deleted. This is the expected
behavior.

Updating to "bookmark at default", then merging without an explicit rev also finds
the merge partner successfully, but after the merge, the bookmark divergence
fails to be resolved: "bookmark at default" moves forward, but "bookmark" stays
behind. Expected behavior would be to move "bookmark" forward, and delete
"bookmrark at default", just like in the previous case.

By automatically choosing the merge partner in the 2nd case, we mislead the
user into thinking that we are really "merging the bookmarks", just like in the
first case - but the end result is different. In other words, we are using
"divergence resolution" logic for the partner selection in both cases, but the
actual merge & commit uses "merge from foreign branch/bookmark" logic in case
2, and "divergence resolution" logic in case 1.

We should either reject the no-explicit-rev merge in case 2, or (IMO
preferably) use "divergence resolution" logic for the final commit in both
cases.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list