hg log -G for bookmarks

Andrew Halberstadt halbersa at gmail.com
Thu Feb 4 14:22:06 UTC 2016


You may be misunderstanding bookmarks.

A bookmark is a glorified tag. The difference being that it
automatically gets updated when you make a new commit (if it is
activated). Bookmarks aren't branches, but they can be used to replicate
a git-like branching workflow (which is probably where you got
confused). Unlike named branches, only a single commit is tagged with a
bookmark at a time.

You should read through [1] for more information.

-Andrew

[1] http://mercurial.aragost.com/kick-start/en/bookmarks/

On 04/02/16 05:28 AM, Uwe Brauer wrote:
>>>> "John" == John W <jwdevel at gmail.com> writes:
>
> Hi John,
>
>
>     > Hi Uwe,
>     > I might not be fully understanding you, but at least for me, on plain
>     > Mercurial 3.0, I see bookmarks noted in the "log -G" output. Is the
>     > below not what you see?
>
> It seems that I did not explain myself clearly enough
>
>     > $ hg log -G
>
>     > @  changeset:   1:fa8246e34747
>     > |  bookmark:    branch1       ### <---- This is what you want, yes? NO!
>     > |  tag:         tip
>     > |  user:        John Waugh <j.waugh at f5.com>
>     > |  date:        Wed Feb 03 10:10:16 2016 -0800
>     > |  summary:     change in branch1
>     > |
>     > o  changeset:   0:61c0917d884d
>     >    user:        John Waugh <j.waugh at f5.com>
>     >    date:        Wed Feb 03 10:09:42 2016 -0800
>     >    summary:     initial commit
>
> As far as I know, there are at least 2 possibilities of branching:[1]
>
>      -  using named branches
>
>      -  using bookmarks.
>
> And I think it would be wise to stick to one of theses possibilities
> that is not mixing named branches with bookmarks, but this is just my
> personal impression.
>
> Now if you chose named branches as I do, consider the following example
>
> hg log -G gives
>
>
> o  changeset:   148:aab09c89a511
> |  branch:      Uwe
> |  parent:      145:2c468b090b4b
> |  user:        Uwe Brauer <oub at mat.ucm.es>
> |  date:        Sat Jan 30 18:34:18 2016 +0000
> |  summary:     Checkin README.md from Ern branch
> |
> | @  changeset:   147:12a0e10e0c63
> | |  branch:      Ern
> | |  user:        Uwe Brauer <oub at mat.ucm.es>
> | |  date:        Sat Jan 30 17:57:14 2016 +0000
> | |  summary:     Minor upgrade, README
> | |
> | o  changeset:   146:8432f47039de
> |/   branch:      Ern
> |    user:        Uwe Brauer <oub at mat.ucm.es>
> |    date:        Fri Jan 29 17:21:02 2016 +0000
> |    summary:     Add information to README.md
> |
>
> It is displayed in a tree form. The question is now, suppose I would chose
> bookmarks for branching not named branches, I look for a possibility
> that
>
> hg log -G --some-option-or-template
>
> would give
>
>
> o  changeset:   148:aab09c89a511
> |  bookmark:      Uwe
> |  parent:      145:2c468b090b4b
> |  user:        Uwe Brauer <oub at mat.ucm.es>
> |  date:        Sat Jan 30 18:34:18 2016 +0000
> |  summary:     Checkin README.md from Ern branch
> |
> | @  changeset:   147:12a0e10e0c63
> | |  bookmark:      Ern
> | |  user:        Uwe Brauer <oub at mat.ucm.es>
> | |  date:        Sat Jan 30 17:57:14 2016 +0000
> | |  summary:     Minor upgrade, README
> | |
> | o  changeset:   146:8432f47039de
> |/   bookmark:      Ern
> |    user:        Uwe Brauer <oub at mat.ucm.es>
> |    date:        Fri Jan 29 17:21:02 2016 +0000
> |    summary:     Add information to README.md
> |
>
>
>
> And that seems not to be possible if I have understood the answers
> correctly
>
> Uwe Brauer
>
> Footnotes:
> [1]  according to
>       http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/
>       one could consider, cloning and anonymous branching, also as
>       branching which gives 4 possible mode.s
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
>





More information about the Mercurial mailing list