comparison mercurial/cmdutil.py @ 45796:e9555305c5c6

templates: include all non-branch namespaces in default one-line summary I left out branches and custom namespaces on purpose from D9252 because I figured that people like us (Google) who have custom namespaces can also have custom configs. However, I just realized that this makes everyone with the topic extension lose the topic they've had in rebase output for a long time (ever since someone was nice enough to add it in D741). Sorry about the churn. The more generic template couldn't easily keep the "log.bookmark" label in the template because the namespace is called "bookmarks" (plural). That means that we can't be compatible with users' existing configs for "log.bookmark", so I decided to change the labels to be in a brand-new "oneline-summary" namespace. Differential Revision: https://phab.mercurial-scm.org/D9262
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 29 Oct 2020 09:03:08 -0700
parents f90a5c211251
children 976b26bdd0d8
comparison
equal deleted inserted replaced
45795:c4ab93849383 45796:e9555305c5c6
1222 if not spec: 1222 if not spec:
1223 spec = default_spec 1223 spec = default_spec
1224 if not spec: 1224 if not spec:
1225 spec = ( 1225 spec = (
1226 b'{separate(" ", ' 1226 b'{separate(" ", '
1227 b'label("log.changeset", "{rev}:{node|short}")' 1227 b'label("oneline-summary.changeset", "{rev}:{node|short}")'
1228 b', ' 1228 b', '
1229 b'label("log.tag", tags)' 1229 b'join(filter(namespaces % "{ifeq(namespace, "branches", "", join(names % "{label("oneline-summary.{namespace}", name)}", " "))}"), " ")'
1230 b', '
1231 b'label("log.bookmark", bookmarks)'
1232 b')} ' 1230 b')} '
1233 b'"{label("log.desc", desc|firstline)}"' 1231 b'"{label("oneline-summary.desc", desc|firstline)}"'
1234 ) 1232 )
1235 text = rendertemplate(ctx, spec) 1233 text = rendertemplate(ctx, spec)
1236 return text.split(b'\n')[0] 1234 return text.split(b'\n')[0]
1237 1235
1238 1236