af974f8d1eec

Merged in ksander314/hg-review/issue-90 (pull request #12)

Fix issue #90.
[view raw] [browse files]
author Christophe de Vienne <cdevienne@gmail.com>
date Wed, 17 Dec 2014 10:21:27 +0100
parents 73d048325dfd (current diff) b443b42afe6f (diff)
children acf857ef0abe
branches/tags (none)
files

Changes

--- a/review/web.py	Fri Dec 12 10:36:19 2014 +0100
+++ b/review/web.py	Wed Dec 17 10:21:27 2014 +0100
@@ -173,6 +173,7 @@
 
 @app.route('/changeset/<revhash>/', methods=['GET', 'POST'])
 def changeset(revhash):
+    revhash = revhash.encode('ascii')
     if request.method == 'POST':
         signoff = request.form.get('signoff', None)
         if signoff and not app.read_only:
@@ -197,6 +198,7 @@
 def patch(revhash):
     result = StringIO.StringIO()
     try:
+        revhash = revhash.encode('ascii')
         diff_opts = _patch.diffopts(app.ui, {'git': True})
         cmdutil.export(g.datastore.target, [revhash], fp=result, opts=diff_opts)
     except error.RepoLookupError: