changeset 1897 | 58b6784cf9f1 |
parent 1896 | f8f818a04f5b |
child 1899 | 888d298ddb91 |
--- a/mercurial/templater.py Sun Feb 26 12:59:28 2006 -0800 +++ b/mercurial/templater.py Sun Feb 26 13:09:26 2006 -0800 @@ -105,3 +105,9 @@ "permissions": (lambda x: x and "-rwxr-xr-x" or "-rw-r--r--"), "rfc822date": lambda x: util.datestr(x, "%a, %d %b %Y %H:%M:%S"), } + +def templatepath(): + for f in "templates", "../templates": + p = os.path.join(os.path.dirname(__file__), f) + if os.path.isdir(p): + return os.path.normpath(p)