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

20,131

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!

Share:
20,131
timmy
Author by

timmy

Updated on July 05, 2022

Comments

  • timmy
    timmy almost 2 years

    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