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.
--- 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)]