Mercurial > hg
comparison hgext/rebase.py @ 45770:96fcc37a9c80
rebase: make summary template configurable, with default to shared template
Differential Revision: https://phab.mercurial-scm.org/D9251
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 22 Oct 2020 23:10:06 -0700 |
parents | b4c193509cd0 |
children | f90a5c211251 |
comparison
equal
deleted
inserted
replaced
45769:b4c193509cd0 | 45770:96fcc37a9c80 |
---|---|
32 copies, | 32 copies, |
33 destutil, | 33 destutil, |
34 dirstateguard, | 34 dirstateguard, |
35 error, | 35 error, |
36 extensions, | 36 extensions, |
37 formatter, | |
38 merge as mergemod, | 37 merge as mergemod, |
39 mergestate as mergestatemod, | 38 mergestate as mergestatemod, |
40 mergeutil, | 39 mergeutil, |
41 node as nodemod, | 40 node as nodemod, |
42 obsolete, | 41 obsolete, |
50 revsetlang, | 49 revsetlang, |
51 rewriteutil, | 50 rewriteutil, |
52 scmutil, | 51 scmutil, |
53 smartset, | 52 smartset, |
54 state as statemod, | 53 state as statemod, |
55 templatekw, | |
56 util, | 54 util, |
57 ) | 55 ) |
58 | 56 |
59 # The following constants are used throughout the rebase module. The ordering of | 57 # The following constants are used throughout the rebase module. The ordering of |
60 # their values must be maintained. | 58 # their values must be maintained. |
151 labels_spec = b'join(filter(namespaces % "{ifeq(namespace, "branches", "", join(names, " "))}"), " ")' | 149 labels_spec = b'join(filter(namespaces % "{ifeq(namespace, "branches", "", join(names, " "))}"), " ")' |
152 spec = b'{rev}:{node|short} "{desc|firstline}"{if(%s, " ({%s})")}' % ( | 150 spec = b'{rev}:{node|short} "{desc|firstline}"{if(%s, " ({%s})")}' % ( |
153 labels_spec, | 151 labels_spec, |
154 labels_spec, | 152 labels_spec, |
155 ) | 153 ) |
156 return cmdutil.rendertemplate(ctx, spec) | 154 return cmdutil.format_changeset_summary( |
155 ctx.repo().ui, ctx, command=b'rebase', default_spec=spec | |
156 ) | |
157 | 157 |
158 | 158 |
159 class rebaseruntime(object): | 159 class rebaseruntime(object): |
160 """This class is a container for rebase runtime state""" | 160 """This class is a container for rebase runtime state""" |
161 | 161 |