Changing the wdir() {rev} and {node} output

Yuya Nishihara yuya at tcha.org
Fri May 3 14:17:13 UTC 2019


On Tue, 30 Apr 2019 22:11:56 -0400, Matt Harbison wrote:
> Note that {id|short} just shears off the string after 12 characters.   
> Maybe it would help if we taught {short} to let the '+' (and the second  
> node in the case of a merge) through?

I have unsent patch in my repository. Appears that I thought it would be
okay to map {"<hash>+"|short} to {"<hash>"|short}+, but is unacceptably
weird to handle "<hash>+<hash>+" in that way.

> I suppose we could also add {shortid} here.  But if part of the concern is  
> not wanting to see ff..ff, maybe we can add {id} to the changeset  
> templater for the log command too?  Use that for display, and {node} to  
> feed to a program.  For commits, there would never be a '+' or second  
> node.  That doesn't help with {rev} though.  Maybe a {display} filter  
> would work for both {node} and {rev}?  (With a better name of course.)

{id}-ish template keyword seems fine. I thought about the filter, but it
seemed unnecessarily complicated if the filter supports both {rev} and {node}.


More information about the Mercurial-devel mailing list