hg log -G for bookmarks
Uwe Brauer
oub at mat.ucm.es
Fri Feb 5 10:59:38 UTC 2016
>>> "Matt" == Matt Mackall <mpm at selenic.com> writes:
> On Thu, 2016-02-04 at 15:13 +0000, Uwe Brauer wrote:
>> Branches: I did
> I'm going to draw a graph of your repo at each step, sideways, time left to
> right.
thanks
>> hg log -Gr '::bookmark()'
> The -r '::bookmark()' is unnecessary.
Most likely I misunderstood Simon.
> This output is fully correct. To get a graph analogous to your first one, do:
Thanks very much. That was *extremely* helpful, because
- I understood now, that there is a difference between:
hg branch master
hg commit -m "3"
And
hg bookmark master
hg commit -m "3"
That was not clear to me before.
- I am now more convinced than ever that I prefer named branches
over bookmarks.
But there is a small side effect of this, which concerns the git-hg
plugin.
Recently there was a discussing on the matlab-emacs list to switch from
CVS to a more modern system, unfortunately git won over hg (I was the
only one who voted for hg).
So I would like to use the hg-git plugin and, then of course I cannot
use named named branches, because the hg-git plugin does not translate
them well, I should use bookmarks then.
What puzzled me was the following: modifying your approach (replaching @
by master because git needs it) I did
hg init
hg bookmark master
echo one > test.txt
hg add test.txt
hg commit -m "0"
hg bookmark book1
echo two >> test.txt
hg commit -m "1"
echo three >> test.txt
hg commit -m "2"
hg update master
echo four >> test.txt
hg commit -m "3"
hg log -G
Which gives the graph we discussed.
I pushed that to an empty git repo
but then
git log --graph --all --decorate
gave
* commit ddda480004d1baf240d6e65232d59216141da16c (book1)
| Author: Uwe Brauer <oub at mat.ucm.es>
| Date: Fri Feb 5 10:42:58 2016 +0000
|
| 2
|
* commit 69dd9be92747de9b8e3dc49563ae41807e58a8bb
| Author: Uwe Brauer <oub at mat.ucm.es>
| Date: Fri Feb 5 10:42:57 2016 +0000
|
| 1
|
| * commit d79d64d89c863d702a5c1dee4532c3372d5b55cc (HEAD, master)
|/ Author: Uwe Brauer <oub at mat.ucm.es>
| Date: Fri Feb 5 10:42:58 2016 +0000
|
| 3
|
* commit f3b0ceb79f80c096e37db006a1eff51e9a69ca46
Author: Uwe Brauer <oub at mat.ucm.es>
Date: Fri Feb 5 10:42:56 2016 +0000
0
Which is not exactly the same, as the result of
hg log -G
Regards
Uwe Brauer
More information about the Mercurial
mailing list