[PATCH] Move default page name into map file

Jeff Sipek jeffpc at optonline.net
Fri Aug 5 20:20:57 CDT 2005


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.

Josef "Jeff" Sipek


 mercurial/hgweb.py |    5 ++++-
 templates/map      |    1 +
 2 files changed, 5 insertions(+), 1 deletion(-)


diff -r 9c918287d10b -r 4f5697f70268 mercurial/hgweb.py
--- a/mercurial/hgweb.py	Thu Aug  4 21:31:25 2005
+++ b/mercurial/hgweb.py	Sat Aug  6 01:16:20 2005
@@ -622,7 +622,10 @@
                             "footer":self.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'):
diff -r 9c918287d10b -r 4f5697f70268 templates/map
--- a/templates/map	Thu Aug  4 21:31:25 2005
+++ b/templates/map	Sat Aug  6 01:16:20 2005
@@ -1,3 +1,4 @@
+default = "changelog"
 header = header.tmpl
 footer = footer.tmpl
 search = search.tmpl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.selenic.com/pipermail/mercurial/attachments/20050805/07f67343/attachment.pgp


More information about the Mercurial mailing list