changeset 10530:ed87b6c60e0b stable

hgweb: fix handling of arguments in the between command The 'pairs' argument was coded to be optional, but the code would crash if it was not provided.
author Sune Foldager <cryo@cyanite.org>
date Tue, 23 Feb 2010 11:34:08 -0500
parents 076e8a8000a3
children e3eff76552f1
files mercurial/hgweb/protocol.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/protocol.py	Mon Feb 22 23:30:01 2010 -0800
+++ b/mercurial/hgweb/protocol.py	Tue Feb 23 11:34:08 2010 -0500
@@ -62,9 +62,8 @@
     yield resp
 
 def between(repo, req):
-    if 'pairs' in req.form:
-        pairs = [map(bin, p.split("-"))
-                 for p in req.form['pairs'][0].split(" ")]
+    pairs = [map(bin, p.split("-"))
+             for p in req.form['pairs'][0].split(" ")]
     resp = cStringIO.StringIO()
     for b in repo.between(pairs):
         resp.write(" ".join(map(hex, b)) + "\n")