diff mercurial/debugcommands.py @ 45235:91aa9bba3dc9

templater: make templatepaths() return a single path, or None The function returns either a singleton list or an empty list, so it makes more sense to return a value or None. The plural in the name also doesn't make sense, but `templatepath()` is already taken, so I renamed it to `templatedir()` instead. Differential Revision: https://phab.mercurial-scm.org/D8786
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 21 Jul 2020 13:11:49 -0700
parents 87047efbc6a6
children d5ccc059fbcd
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Tue Jul 21 13:05:37 2020 -0700
+++ b/mercurial/debugcommands.py	Tue Jul 21 13:11:49 2020 -0700
@@ -1668,8 +1668,8 @@
     fm.data(re2=bool(util._re2))
 
     # templates
-    p = templater.templatepaths()
-    fm.write(b'templatedirs', b'checking templates (%s)...\n', b' '.join(p))
+    p = templater.templatedir()
+    fm.write(b'templatedirs', b'checking templates (%s)...\n', p)
     fm.condwrite(not p, b'', _(b" no template directories found\n"))
     if p:
         m = templater.templatepath(b"map-cmdline.default")