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

login
register
mail settings
Submitter Gregory Szorc
Date Feb. 7, 2015, 7:15 a.m.
Message ID <024264fd401ebcc927eb.1423293350@gps-mbp.local>
Download mbox | patch
Permalink /patch/7750/
State Accepted
Headers show

Comments

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

Patch

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)