diff -r b33b91ca2ec2 -r 04aafcec00b9 mercurial/templater.py --- a/mercurial/templater.py Sun Mar 18 12:28:19 2018 +0900 +++ b/mercurial/templater.py Fri Mar 16 22:36:40 2018 +0900 @@ -627,6 +627,14 @@ raise return self._cache[t] + def preload(self, t): + """Load, parse, and cache the specified template if available""" + try: + self._load(t) + return True + except templateutil.TemplateNotFound: + return False + def process(self, t, mapping): '''Perform expansion. t is name of map element to expand. mapping contains added elements for use during expansion. Is a