[Bug 3984] New: Merge with ambiguous ancestor does the wrong thing
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Tue Jul 16 16:38:36 CDT 2013
http://bz.selenic.com/show_bug.cgi?id=3984
Priority: normal
Bug ID: 3984
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: Merge with ambiguous ancestor does the wrong thing
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: telliott at apptio.com
Hardware: PC
Status: UNCONFIRMED
Version: 2.6
Component: Mercurial
Product: Mercurial
(I don't _think_ this is the same thing as 1327, but correct me if I'm wrong)
Mercurial version 2.6 (+ AFAIK, we tested with 2.6.0, 2.6.1, and 2.6.2) cannot
determine the common ancestor, whereas 2.2.2 and 2.4.2 can.
For the repro steps below, the following is the result in 2.2.2:
> hg log -r "ancestor(I, J)"
changeset: D
parent: B
> hg up I
> hg merge J
Does exactly what we want it to. Causes the changes in J to be merged into
default.
In 2.6.x, the log command does nothing, and the attempt to merge causes 22
thousand files (that were deleted or have been moved) to be re-added to the
repository in default.
Repro steps for the last time this occurred:
--------------------------------------------
(I can come up with a simple repository with changesets that exhibits the
problem, but it's too much work I don't have time for right now)
- Have a repository with a bunch of changes, two branches (foo, default).
- Ensure the branches are merged together at some point. I'll assume the
following initial state for the example:
default: A ---+ C (Merge of B and A)
foo branch: B --/
Person 1:
1. Make a change to foo branch (D)
2. Merge that change to default (E)
default: A ---+ C ----+ E
foo branch: B --/-- D --/
Person 2: (Have NOT pulled 1's changes yet)
1. Make a change to foo branch (F)
2. Merge that change to default (G)
3. Try to push. Ooops, multiple heads! Pull person 1's changes.
4. Merge B & D on Foo (H)
5. Merge C and E on default (I)
default: A -----+ C ---+ G --+ I
/ / E -/
/ /
foo branch: B --/-- F ----+ H
D ---/
(Note that person 2 did NOT merge H and I into default. Bad person 2! Even
though it's no-op, they should have done it)
Person 3: (Up to date with all of the above)
1. Make a change to foo branch (J)
2. Merge that change to default (K)
default: I -------+ K
foo branch: H -- J -/
*** This merge into K does the WRONG thing, it adds 22 thousand files back to
the
repository.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list