[PATCH 12 of 22 hgweb-help] webcommands: document "log" web command

Gregory Szorc gregory.szorc at gmail.com
Sat Feb 7 01:15:50 CST 2015


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1423285983 28800
#      Fri Feb 06 21:13:03 2015 -0800
# Node ID 024264fd401ebcc927eb12a32377e438b8335a8d
# Parent  8b2a12f65895dfad960ef4f5d301e99c1219d7a4
webcommands: document "log" web command

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -46,8 +46,23 @@ class webcommand(object):
         return func
 
 @webcommand('log')
 def log(web, req, tmpl):
+    """
+    /log[/{revision}[/{path}]]
+    --------------------------
+
+    Show repository or file history.
+
+    For URLs of the form ``/log/{revision}``, a list of changesets starting at
+    the specified changeset identifier is shown. If ``{revision}`` is not
+    defined, the default is ``tip``. This form is equivalent to the
+    ``changelog`` handler.
+
+    For URLs of the form ``/log/{revision}/{file}``, the history for a specific
+    file will be shown. This form is equivalent to the ``filelog`` handler.
+    """
+
     if 'file' in req.form and req.form['file'][0]:
         return filelog(web, req, tmpl)
     else:
         return changelog(web, req, tmpl)


More information about the Mercurial-devel mailing list