changeset 24093:c8639f90a715

webcommands: document "comparison" web command
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 06 Feb 2015 22:06:44 -0800
parents 55dfea651b7f
children 9c810d46a093
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Fri Feb 06 22:02:14 2015 -0800
+++ b/mercurial/hgweb/webcommands.py	Fri Feb 06 22:06:44 2015 -0800
@@ -851,6 +851,21 @@
 
 @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')