Search code examples
mercurialrepositorytortoisehg

hg heads shown two heads but nothing to merge


My problem is when i clone project repository on new development environment, my repo has wrong state (half-year old, Fri Mar 28)

So i need to update local cloned repo to current state manually by command 'hg update tip' each time.

I have two different heads, my hg heads output:

localhost:projectname nikolay$ hg heads
changeset:   98:30e06a47b383
branch:      dev
tag:         tip
user:        Nikolay Shabak <mail@example.com>
date:        Sat Sep 06 16:11:19 2014 +0400
summary:     current head summary

changeset:   17:70e9cccc18c1
user:        Nikolay Shabak <mail@example.com>
date:        Fri Mar 28 20:57:17 2014 +0400
summary:     another head summary

But when i try to merge existing heads, it says:

localhost:projectname nikolay$ hg merge
abort: nothing to merge

My question is: how i can merge (or remove) second head in repository?

Thanks!


Solution

  • Your two heads are not even from the same branch. Issuing a hg merge without arguments is intended to merge the two heads of the current branch.

    If you really wish to merge the heads from the two branches (default and dev), use the command

    hg merge <other_branch>