log log -G should show the branch

Uwe Brauer oub at mat.ucm.es
Mon Oct 21 08:38:52 UTC 2019


   > 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.

So I use 

glg3  = log  -G --template '\x1B[33mcommit    {rev}:{node|short}\nBranch:   {branch}\nAuthor:   {author}\nDate:     {date|rfc822date}\nPhase:    {phase}\nSummary:  {desc|firstline}\n{ifeq(activebookmark,"","","Bookmark: {activebookmark}")}\n{nofiles}\n' 

Great, thanks

Uwe 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5025 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20191021/6afb92f6/attachment.p7s>


More information about the Mercurial mailing list