[Updated] D8846: templatespec: logcmdutil.templatespec() gets either template or mapfile
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sun Aug 2 16:34:20 UTC 2020
Closed by commit rHGdfb67cd1da7f: templatespec: logcmdutil.templatespec() gets either template or mapfile (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8846?vs=22150&id=22187
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8846/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8846
AFFECTED FILES
mercurial/logcmdutil.py
CHANGE DETAILS
diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py
--- a/mercurial/logcmdutil.py
+++ b/mercurial/logcmdutil.py
@@ -603,12 +603,13 @@
def templatespec(tmpl, mapfile):
- if pycompat.ispy3:
- assert not isinstance(tmpl, str), b'tmpl must not be a str'
+ assert not (tmpl and mapfile)
if mapfile:
- return formatter.templatespec(b'changeset', tmpl, mapfile)
+ return formatter.mapfile_templatespec(b'changeset', mapfile)
else:
- return formatter.templatespec(b'', tmpl, None)
+ if pycompat.ispy3:
+ assert not isinstance(tmpl, str), b'tmpl must not be a str'
+ return formatter.literal_templatespec(tmpl)
def _lookuptemplate(ui, tmpl, style):
To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200802/de28d5b5/attachment-0002.html>
More information about the Mercurial-patches
mailing list