# HG changeset patch # User Sushil khanchi # Date 1538380230 -19800 # Node ID e1f6f9da82c1cd430d801212ec33be966fc117d0 # Parent fb22c7a6ca8b01824b7757fc10171a119e931cef 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. diff -r fb22c7a6ca8b -r e1f6f9da82c1 hgext3rd/evolve/evolvecmd.py --- 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') diff -r fb22c7a6ca8b -r e1f6f9da82c1 hgext3rd/evolve/utility.py --- 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',