Submitter | Yuya Nishihara |
---|---|
Date | March 21, 2018, 1:51 p.m. |
Message ID | <5f2336d71c2403543586.1521640309@mimosa> |
Download | mbox | patch |
Permalink | /patch/29687/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -627,6 +627,14 @@ class engine(object): 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