changeset 4938:d8033f75a52e

obslog: use singular name "succnode" for each element of {succnodes} The name that we pass for formatlist() is the name of each element. After this patch, you'll write '{succnodes % "{succnode}"}' instead of the confusing '{succnodes % "{succnodes}"}' (where the two "succnodes" refer to different things. Users can write templates that are compatible across this change by using e.g. '{succnodes % "{if(succnode, succnode, succnodes)}"}'.
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 07 Nov 2019 13:21:20 -0800
parents bb2b4f6c99dc
children 7aba58dc4b73
files hgext3rd/evolve/obshistory.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obshistory.py	Wed Nov 13 13:47:55 2019 +0700
+++ b/hgext3rd/evolve/obshistory.py	Thu Nov 07 13:21:20 2019 -0800
@@ -547,7 +547,7 @@
         fm.plain(b' as ')
 
         shortsnodes = (nodemod.short(succnode) for succnode in sorted(succnodes))
-        nodes = fm.formatlist(shortsnodes, b'succnodes', sep=b', ')
+        nodes = fm.formatlist(shortsnodes, b'succnode', sep=b', ')
         fm.write(b'succnodes', b'%s', nodes,
                  label=b"evolve.node")
 
@@ -675,7 +675,7 @@
         fm.plain(b' as ')
 
         shortsnodes = (nodemod.short(succnode) for succnode in sorted(succnodes))
-        nodes = fm.formatlist(shortsnodes, b'succnodes', sep=b', ')
+        nodes = fm.formatlist(shortsnodes, b'succnode', sep=b', ')
         fm.write(b'succnodes', b'%s', nodes,
                  label=b"evolve.node")