# HG changeset patch # User Steve Losh # Date 1278786451 14400 # Node ID 6711e7217487213dce212b1ffe9bd78f016b8041 # Parent 62247513862f67add15908157102449cc6da592a web: whitespace diff -r 62247513862f -r 6711e7217487 review/web.py --- a/review/web.py Sat Jul 10 14:23:00 2010 -0400 +++ b/review/web.py Sat Jul 10 14:27:31 2010 -0400 @@ -149,7 +149,7 @@ body = request.form['new-comment-body'] style = 'markdown' if request.form.get('comment-markdown') else '' - + if body: current = request.form.get('current') if current: @@ -157,7 +157,7 @@ else: rcset, rev = _get_revision_or_404(revhash) rcset.add_comment(body, ufilename, filename, lines, style) - + return redirect("%s/changeset/%s/" % (app.site_root, revhash)) @app.route('/changeset//', methods=['GET', 'POST']) @@ -168,16 +168,16 @@ return _handle_signoff(revhash) elif not app.read_only or app.allow_anon: return _handle_comment(revhash) - + rcset, rev = _get_revision_or_404(revhash) - + cu_signoffs = rcset.signoffs_for_current_user() cu_signoff = cu_signoffs[0] if cu_signoffs else None - + tip = g.datastore.target['tip'].rev() newer = rcset.target[rev.rev() + 1] if rev.rev() < tip else None older = rcset.target[rev.rev() - 1] if rev.rev() > 0 else None - + return _render('changeset.html', rcset=rcset, rev=rev, cu_signoff=cu_signoff, newer=newer, older=older) @@ -218,12 +218,13 @@ def server_error(error): return _render('500.html'), 500 + def load_interface(ui, repo, read_only=False, allow_anon=False, open=False, address='127.0.0.1', port=8080): if open: import webbrowser webbrowser.open('http://localhost:%d/' % port) - + app.read_only = read_only app.debug = ui.debugflag app.allow_anon = allow_anon