diff mercurial/filemerge.py @ 28955:78759f78a44e

templater: factor out function that creates templater from string template This function will host loading of template aliases. It is not defined at templater, but at formatter, since formatter is the module handling ui stuff in front of templater.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 10 Apr 2016 17:23:09 +0900
parents f97a0bcfd7a1
children 99b50346b750
line wrap: on
line diff
--- a/mercurial/filemerge.py	Sun Apr 03 23:26:48 2016 +0900
+++ b/mercurial/filemerge.py	Sun Apr 10 17:23:09 2016 +0900
@@ -17,6 +17,7 @@
 
 from . import (
     error,
+    formatter,
     match,
     scmutil,
     simplemerge,
@@ -526,7 +527,7 @@
 
     ui = repo.ui
     template = ui.config('ui', 'mergemarkertemplate', _defaultconflictmarker)
-    tmpl = templater.templater(cache={'conflictmarker': template})
+    tmpl = formatter.maketemplater(ui, 'conflictmarker', template)
 
     pad = max(len(l) for l in labels)