log log -G should show the branch

Cameron Simpson cs at cskk.id.au
Tue Oct 22 04:05:43 UTC 2019


On 21Oct2019 11:38, Uwe Brauer <oub at mat.ucm.es> wrote:
>   > On 20Oct2019 17:15, Uwe Brauer <oub at mat.ucm.es> wrote:
>   > Hmm. I like my log to look like this:
>   >    '{author|email} {desc|firstline}\n{date|isodate}
>   > {rev}:{node|short}<-{ifeq(p2node|short,"000000000000",p1node|short,join(parents))}{ifeq(branch,"default","","
>   > [{branch}]")}{ifeq(activebookmark,"","","@{activebookmark}")}{ifeq(count(tags),0,"","
>   > ({join(tags)})")}\n\n'
>
>   > Have a look at the {ifeq(...)} stuff, it should let you do what you
>   > want. For example, the above writes this:
>
>Aha, thanks, the only thing is if I use ifeq and there is no bookmark an
>empty line is inserted, I solved that by moving it to the end.

Might be better to include it inside the ifeq:

  {ifeq(activebookmark,"","","Bookmark: {activebookmark}\n")}

producing a complete line if there's a bookmark, no line at all 
otherwise.

Cheers,
Cameron Simpson <cs at cskk.id.au>



More information about the Mercurial mailing list