[PATCH 18 of 22 hgweb-help] webcommands: document "comparison" web command
Gregory Szorc
gregory.szorc at gmail.com
Sat Feb 7 01:15:56 CST 2015
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1423289204 28800
# Fri Feb 06 22:06:44 2015 -0800
# Node ID 9927627531e8e504fb630294561e3b8bb8b61ce7
# Parent e87c340ae85db7a83cf50843162f19dae35276b7
webcommands: document "comparison" web command
diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -853,8 +853,23 @@ def filediff(web, req, tmpl):
diff = webcommand('diff')(filediff)
@webcommand('comparison')
def comparison(web, req, tmpl):
+ """
+ /comparison/{revision}/{path}
+ -----------------------------
+
+ Show a comparison between the old and new versions of a file from changes
+ made on a particular revision.
+
+ This is similar to the ``diff`` handler. However, this form features
+ a split or side-by-side diff rather than a unified diff.
+
+ The ``context`` query string argument can be used to control the lines of
+ context in the diff.
+
+ The ``filecomparison`` template is rendered.
+ """
ctx = webutil.changectx(web.repo, req)
if 'file' not in req.form:
raise ErrorResponse(HTTP_NOT_FOUND, 'file not given')
path = webutil.cleanpath(web.repo, req.form['file'][0])
More information about the Mercurial-devel
mailing list