diff hgext/rebase.py @ 45771:f90a5c211251

rebase: change and standarize template for rebase's one-line summary This removes the default template in rebase and switches to a centrally defined template. I've simplified it a bit to avoid the conditional parenthesis. I've also added labels so the different parts can be easily colored. The template is somewhat similar to what we've used internally at Google for a few years. I'm happy to change the template if others have opinions. Should we reuse the `color.log.` names as I have? Differential Revision: https://phab.mercurial-scm.org/D9252
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 27 Oct 2020 15:33:15 -0700
parents 96fcc37a9c80
children 1703a7f9d5b8
line wrap: on
line diff
--- a/hgext/rebase.py	Thu Oct 22 23:10:06 2020 -0700
+++ b/hgext/rebase.py	Tue Oct 27 15:33:15 2020 -0700
@@ -146,13 +146,8 @@
 
 def _ctxdesc(ctx):
     """short description for a context"""
-    labels_spec = b'join(filter(namespaces % "{ifeq(namespace, "branches", "", join(names, " "))}"), " ")'
-    spec = b'{rev}:{node|short} "{desc|firstline}"{if(%s, " ({%s})")}' % (
-        labels_spec,
-        labels_spec,
-    )
     return cmdutil.format_changeset_summary(
-        ctx.repo().ui, ctx, command=b'rebase', default_spec=spec
+        ctx.repo().ui, ctx, command=b'rebase'
     )