hg log -G for bookmarks
Scott Palmer
swpalmer at gmail.com
Thu Feb 4 15:55:40 UTC 2016
> On Feb 4, 2016, at 10:13 AM, Uwe Brauer <oub at mat.ucm.es> wrote:
>
> Hi Simon,
>
>
>> On Thu, Feb 4, 2016 at 10:28 AM, Uwe Brauer <oub at mat.ucm.es> wrote:
>
>
>
>
>> If you wanted to see all ancestor revisions for a particular
>> bookmark, you might write "hg log -Gr ::book1". If you wanted to see
>> the tree for all bookmarks, you could use "hg log -Gr '::bookmark()'"
>
> Hm I still have a problem.
>
> Branches: I did
>
> echo one > test.txt
> hg init
> hg add test.txt
> echo two >> test.txt
> hg commit -m "2"
> hg branch master
> hg commit -m "3"
> echo three >> test.txt
> hg commit -m "4"
> hg update default
This ‘update default' is where you go back in history to create a new fork in the tree.
> echo four >> test.txt
> hg commit -m "5"
> hg log -G
>
> And then
>
> hg log -G
>
> Returned:
> @ changeset: 3:9e0a15adc191
> | tag: tip
> | parent: 0:9cba518d5f5d
> | user: Uwe Brauer <oub at mat.ucm.es>
> | date: Thu Feb 04 15:01:25 2016 +0000
> | summary: 5
> |
> | o changeset: 2:d7a2c8821279
> | | branch: master
> | | user: Uwe Brauer <oub at mat.ucm.es>
> | | date: Thu Feb 04 15:01:24 2016 +0000
> | | summary: 4
> | |
> | o changeset: 1:a3aed2d2743c
> |/ branch: master
> | user: Uwe Brauer <oub at mat.ucm.es>
> | date: Thu Feb 04 15:01:23 2016 +0000
> | summary: 3
> |
> o changeset: 0:9cba518d5f5d
> user: Uwe Brauer <oub at mat.ucm.es>
> date: Thu Feb 04 15:01:22 2016 +0000
> summary: 2
>
>
> So far so good. Now to bookmarks
>
>
> echo one > test.txt
> hg init
> hg add test.txt
> echo two >> test.txt
> hg commit -m "2"
> hg bookmark master
> hg commit -m "3"
> echo three >> test.txt
> hg commit -m "4"
> hg bookmark book1
> hg update book1
> echo four >> test.txt
> hg commit -m "5"
> hg log -Gr '::bookmark()’
>
You haven’t done the equivalent here. Before ‘hg bookmark master’ you probably want to establish a bookmark representing the equivalent of the ‘default’ branch you have in the named branches workflow. E.g. do ‘hg bookmark @‘ before ‘hg bookmark master’. Then ‘hg update @‘ before ‘hg bookmark book1’
Scott
> But now I see a different thing:
>
> @ changeset: 2:510400455b95
> | bookmark: book1
> | tag: tip
> | user: Uwe Brauer <oub at mat.ucm.es>
> | date: Thu Feb 04 15:03:13 2016 +0000
> | summary: 5
> |
> o changeset: 1:ba5cb90c015b
> | bookmark: master
> | user: Uwe Brauer <oub at mat.ucm.es>
> | date: Thu Feb 04 15:03:12 2016 +0000
> | summary: 4
> |
> o changeset: 0:755d311e9398
> user: Uwe Brauer <oub at mat.ucm.es>
> date: Thu Feb 04 15:03:10 2016 +0000
> summary: 2
>
> So the question is how do I get a graph, with a tree, with trunk and
> branches as in the first case.
>
>
> Uwe Brauer
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
More information about the Mercurial
mailing list