changeset 165:7fc8385df514

Add tag/rev/node search to hgweb
author mpm@selenic.com
date Thu, 26 May 2005 10:08:47 -0800
parents 2e87f04880ab
children 39624c47060f
files mercurial/hgweb.py templates/changelog.tmpl
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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#