Add tag/rev/node search to hgweb
authormpm@selenic.com
Thu, 26 May 2005 10:08:47 -0800
changeset 165 7fc8385df514
parent 164 2e87f04880ab
child 166 39624c47060f
Add tag/rev/node search to hgweb
mercurial/hgweb.py
templates/changelog.tmpl
--- a/mercurial/hgweb.py	Thu May 26 09:56:20 2005 -0800
+++ b/mercurial/hgweb.py	Thu May 26 10:08:47 2005 -0800
@@ -524,7 +524,8 @@
         if not args.has_key('cmd') or args['cmd'][0] == 'changelog':
             hi = self.repo.changelog.count()
             if args.has_key('rev'):
-                hi = int(args['rev'][0])
+                hi = args['rev'][0]
+                hi = self.repo.changelog.rev(self.repo.lookup(hi))
 
             write(self.changelog(hi))
             
--- a/templates/changelog.tmpl	Thu May 26 09:56:20 2005 -0800
+++ b/templates/changelog.tmpl	Thu May 26 10:08:47 2005 -0800
@@ -4,10 +4,20 @@
 <body>
 <h2>changelog for #repo#</h2>
 
-navigate: #changenav#<br>
+<form>
+search:
+<input type="hidden" name="cmd" value="changelog">
+<input name="rev" type="text" width="30">
+navigate: #changenav#<br/>
+</form>
 
 #entries#
 
-navigate: #changenav#<br>
+<form>
+search:
+<input type="hidden" name="cmd" value="changelog">
+<input name="rev" type="text" width="30">
+navigate: #changenav#<br/>
+</form>
 
 #footer#