# HG changeset patch # User Augie Fackler # Date 1539506245 14400 # Node ID 96164fb9b9130bc2148fc454cf4c6eed0797c001 # Parent 46b55f279571b31f5869062db73fa8105b675683 logcmdutil: add a helpful assertion to catch mistyped templates early This would have made a defect in test-notify.t much easier to figure out. Differential Revision: https://phab.mercurial-scm.org/D5097 diff -r 46b55f279571 -r 96164fb9b913 mercurial/logcmdutil.py --- a/mercurial/logcmdutil.py Sun Oct 14 05:28:01 2018 -0400 +++ b/mercurial/logcmdutil.py Sun Oct 14 04:37:25 2018 -0400 @@ -460,6 +460,8 @@ self.footer = self.t.render(self._parts['footer'], props) def templatespec(tmpl, mapfile): + if pycompat.ispy3: + assert not isinstance(tmpl, str), 'tmpl must not be a str' if mapfile: return formatter.templatespec('changeset', tmpl, mapfile) else: