templater: don't search randomly for templates - trust util.datapath
authorMads Kiilerich <madski@unity3d.com>
Sun, 28 Sep 2014 16:57:37 +0200
changeset 22636 d844e220792a
parent 22635 660861a6fad4
child 22637 149141c3a25f
templater: don't search randomly for templates - trust util.datapath The search was introduced in 2653740d8118. It might have been necessary back then when using __file__ directly and frozen-ness wasn't considered. Now we should know exactly where the templates can be found.
mercurial/templater.py
--- a/mercurial/templater.py	Sun Sep 28 16:57:37 2014 +0200
+++ b/mercurial/templater.py	Sun Sep 28 16:57:37 2014 +0200
@@ -711,7 +711,7 @@
 
 def templatepaths():
     '''return locations used for template files.'''
-    pathsrel = ['templates', '../templates']
+    pathsrel = ['templates']
     paths = [os.path.normpath(os.path.join(util.datapath, f))
              for f in pathsrel]
     return [p for p in paths if os.path.isdir(p)]