log template: parents in two lines?

Uwe Brauer oub at mat.ucm.es
Thu May 30 05:19:32 UTC 2024


Hi

 hg log -G 

Gives me 

#+begin_src 
○  changeset:   881:1d3e67c31898
│ │╲   parent:      880:0d856786ab86
│ │ │  parent:      865:05c501ce94de
│ │ │  user:        Uwe Brauer <oub at mat.ucm.es>
│ │ │  date:        Wed May 08 19:39:55 2024 +0200
│ │ │  summary:     Merge David y Sergios changes in
│ │ │
#+end_src

I'd like to have more colors, so I came up with 

#+begin_src 

changeset = "\x1B[33mchangeset:     {rev}:{node|short}\n{tags}{bookmarks}{ifeq(remotenames,"","","\x1B[48mRemote_Branch: {remotenames}\n")}\x1B[38mBranch:        {branch}\nAuthor:        {author}\nDate:          {date|rfc822date}\n{ifeq(topic,"","","\x1B[46mTopic:         {topic}\n")}Phase:         {phase}\n{ifeq(parents,"","","\x1B[47mParent:        {parents}\n")}Summary:       {desc|firstline}\n{nofiles}\n"
tag = "\x1B[42mtag:           {tag}\n"
bookmark = "\x1B[48mbookmark:      {bookmark}\n"
#+end_src

That results in 
#+begin_src 

○  changeset:     881:1d3e67c31898
│ │╲   Branch:        default
│ │ │  Author:        Uwe Brauer <oub at mat.ucm.es>
│ │ │  Date:          Wed, 08 May 2024 19:39:55 +0200
│ │ │  Phase:         public
│ │ │  Parent:        880:0d856786ab86 865:05c501ce94de
│ │ │  Summary:       Merge David y Sergios changes in
│ │ │

#+end_src

The colors are here not displayed, but the problem  is that 

#+begin_src 
n{ifeq(parents,"","","\x1B[47mParent:        {parents}\n")}
#+end_src

Results in one line for the parents and not in two as in =hg log -G=


Any idea how to achieve that?

Regards

Uwe Brauer 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20240530/a227991c/attachment.html>
-------------- next part --------------


-- 
I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the EU and NATO membership of Ukraine. 

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


More information about the Mercurial mailing list