Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/templater.py @ 1897:58b6784cf9f1
move hgweb.templatepath into templater
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Sun, 26 Feb 2006 13:09:26 -0800 |
parents | f8f818a04f5b |
children | 888d298ddb91 |
line wrap: on
line diff
--- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -105,3 +105,9 @@ common_filters = { "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)