Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial Merge of Two Named Branches: Working Directory Has No Ancestor

Tags:

mercurial

I have two named branches, SPRINT_009 and SPRINT_010. Some changesets have been committed to SPRINT_009 that I would like to merge into SPRINT_010. I was able to merge the changesets from branch_one back into default without any trouble. I am having problems merging the changesets from branch_one into branch_two.

default       A -- B -- C -- G -- H -- I -- J -- K -- L -- N -- O -- P
                         \                             \            /
SPRINT_009     D -- E -- F -----------------  ---------- ----------
                                                         \
SPRINT_010                                                M

Here are the commands I am using:

hg update branch_two
hg merge branch_one

However I get the following message:

abort: merging with a working directory ancestor has no effect

Does anyone know what exactly I am doing wrong?

**EDIT: I've added a picture of the graph. The drawing is conceptual ** enter image description here

like image 614
timmy Avatar asked Sep 07 '12 00:09

timmy


1 Answers

The problem was that I hadn't performed an hg pull before attempting the merge. Normally we do our development on a Windows machine using TortoiseHg. We modified the name of one of our resources on the support branch, from fooBAR to fooBar and ran into the mercurial case folding problem. We were trying to get around this by merging the branches on a Linux box. I am so used to using TortoiseHg that I forgot the most basic of commands!

like image 126
timmy Avatar answered Sep 27 '22 23:09

timmy