Cannot merge function bookmark into master bookmark in mercurial

I'm trying to do more forking in Mercurial and decided to use bookmarks for this. This particular repo pushes not only to the mercury repo, but also to the git repo via hg-git.

I use track.current

in bookmark settings. Anyway, so I created a bookmark and made some commits

hg bookmark feature
hg update feature
hg commit ... 

      

and then i went to merge my feature branch back into my master branch

hg update master
hg merge feature

      

However, at this point, I get:

abort: nothing to merge
(use 'hg update' or check 'hg heads')

      

A glance at hg bookmarks

shows that wizard and function do point to different versions.

I don't understand why I am getting this message. I also made a mistake anyway. I didn't click on it, so my Mercurial repo looks great. However, hg-git took over the use and made a branch in my git repository. So now I have this very strange inconsistent source tree between two repositories. How can I fix this and how can I do it in the future?

+3


source to share


2 answers


Bookmarking in Mercurial doesn't actually create a new head (or branch, in other words), it names the revision (and then automatically updates when you commit while it's active). You don't actually get a new head (and therefore need to be merged) until you commit to the two bookmarks. It might be helpful to read it. Also, this answer has a good explanation.



+2


source


In this case, it looks like your bookmark feature

is a direct child master

. Mercurial doesn't do git-line fast-forwarding, so you just "fake" it. Instead:

hg update master
hg merge feature

      



You can simply:

# We still have the feature bookmark checked out
hg bookmark --delete feature
hg bookmark --force master

      

+1


source







All Articles