[PATCH] Move default page name into map file
Move default page name from code into the map file. This way, different
hgweb styles/themes are free to select their default (no cmd in args)
page.
--- a/mercurial/hgweb.py
+++ b/mercurial/hgweb.py
@@ -622,7 +622,10 @@ class hgweb:
"footer":footer,
})
- if not args.has_key('cmd') or args['cmd'][0] == 'changelog':
+ if not args.has_key('cmd'):
+ args['cmd'] = [self.t.cache['default'],]
+
+ if args['cmd'][0] == 'changelog':
c = self.repo.changelog.count() - 1
hi = c
if args.has_key('rev'):
--- a/templates/map
+++ b/templates/map
@@ -1,3 +1,4 @@
+default = "changelog"
header = header.tmpl
footer = footer.tmpl
search = search.tmpl