[PATCH] Move default page name into map file
authorJeff Sipek <jeffpc@optonline.net>
Mon, 08 Aug 2005 19:49:48 -0800
changeset 858 c333dfa8fa1a
parent 857 41b344235bb7
child 859 6390c377a9e6
child 860 8ccbac05cf59
[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.
mercurial/hgweb.py
templates/map
--- a/mercurial/hgweb.py	Mon Aug 08 19:49:34 2005 -0800
+++ b/mercurial/hgweb.py	Mon Aug 08 19:49:48 2005 -0800
@@ -622,7 +622,10 @@
                             "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	Mon Aug 08 19:49:34 2005 -0800
+++ b/templates/map	Mon Aug 08 19:49:48 2005 -0800
@@ -1,3 +1,4 @@
+default = "changelog"
 header = header.tmpl
 footer = footer.tmpl
 search = search.tmpl