diff 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
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Thu Oct 29 13:29:05 2020 +0100
+++ b/mercurial/cmdutil.py	Thu Oct 29 09:03:08 2020 -0700
@@ -1224,13 +1224,11 @@
     if not spec:
         spec = (
             b'{separate(" ", '
-            b'label("log.changeset", "{rev}:{node|short}")'
-            b', '
-            b'label("log.tag", tags)'
+            b'label("oneline-summary.changeset", "{rev}:{node|short}")'
             b', '
-            b'label("log.bookmark", bookmarks)'
+            b'join(filter(namespaces % "{ifeq(namespace, "branches", "", join(names % "{label("oneline-summary.{namespace}", name)}", " "))}"), " ")'
             b')} '
-            b'"{label("log.desc", desc|firstline)}"'
+            b'"{label("oneline-summary.desc", desc|firstline)}"'
         )
     text = rendertemplate(ctx, spec)
     return text.split(b'\n')[0]