# HG changeset patch # User Sune Foldager # Date 2010-02-23 16:34:08 # Node ID ed87b6c60e0be7934f35530401b02667b06a853a # Parent 076e8a8000a330930c484193762d35d7f288fe63 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. diff --git a/mercurial/hgweb/protocol.py b/mercurial/hgweb/protocol.py --- a/mercurial/hgweb/protocol.py +++ b/mercurial/hgweb/protocol.py @@ -62,9 +62,8 @@ def branches(repo, req): 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")