utility: add a template alias that will be used in evolve msgs
This template use stack alias s# instead of rev number in messages
printed when we run `hg evolve`.
For example, this template's msgs will look like this:
move:[s3] add aaa
atop:[s2] add bbb
move:[s4] add ccc
I will be using this template in upcoming patches.
--- a/hgext3rd/evolve/evolvecmd.py Mon Oct 01 12:37:42 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py Mon Oct 01 13:20:30 2018 +0530
@@ -44,6 +44,7 @@
TROUBLES = compat.TROUBLES
shorttemplate = utility.shorttemplate
+stacktemplate = utility.stacktemplate
_bookmarksupdater = rewriteutil.bookmarksupdater
sha1re = re.compile(r'\b[0-9a-f]{6,40}\b')
--- a/hgext3rd/evolve/utility.py Mon Oct 01 12:37:42 2018 +0530
+++ b/hgext3rd/evolve/utility.py Mon Oct 01 13:20:30 2018 +0530
@@ -14,6 +14,7 @@
from mercurial.node import nullrev
shorttemplate = "[{label('evolve.rev', rev)}] {desc|firstline}\n"
+stacktemplate = "[s{label('evolve.rev', topicidx)}] {desc|firstline}\n"
def obsexcmsg(ui, message, important=False):
verbose = ui.configbool('experimental', 'verbose-obsolescence-exchange',