webcommands: document "comparison" web command
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 06 Feb 2015 22:06:44 -0800
changeset 24093 c8639f90a715
parent 24092 55dfea651b7f
child 24094 9c810d46a093
webcommands: document "comparison" web command
mercurial/hgweb/webcommands.py
--- 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')