Some things I don't Understand

Giorgos Keramidas keramida at ceid.upatras.gr
Tue Feb 24 09:03:21 CST 2009


On Tue, 24 Feb 2009 09:34:57 -0500, bradford <fingermark at gmail.com> wrote:
> Thanks for your answer Giorgos.  Most of the mercurial tips and
> workflows I have "delicioused" are ML comments that you have made
> (available via nabble).
>
> It may be that I am still learning mercurial, but I do not understand
> the point of this:
>
>  hg up -C keramida-test
>  hg merge d707a0286621
>  hg commit -m 'Merge from upstream'
>
> Is d707a0286621 the tip (and the 'keramida' bookmark)?  Won't the
> changes be merged in when you hg pull, hg update, and hg merge?  Why
> would you need to update to your older revision?

The 'keramida-test' bookmark is the old 'tip', before pulling.

When you run "hg update -C bookmark-name" then the bookmark extension
updates a file inside the `.hg/' repository directory called
`.hg/bookmarks.current'.  This is then used as the current bookmark for
the new tip after the merge, so if you start with a history like:

                   o d707a0286621 (tip)
                   |
                   |     o [keramida-test]
                   |    /
                   |   /
                   o--'

and merge the two heads, you will get:

                   o. [keramida-test]
                   | \
                   |  \
      d707a0286621 o   |
                   |   |
                   |   o old-keramida-test changeset
                   |   |
                   |   |
                   o---'

The `[bookmarks]track.current = True' hgrc option depends on having a
`current' bookmark to work correctly.  By updating to a --clean copy of
the bookmark code, you just ensure that the `current' bookmark is set
before the merge.



More information about the Mercurial mailing list