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

login
register
mail settings
Submitter Gregory Szorc
Date Feb. 7, 2015, 7:16 a.m.
Message ID <6197d9d30340e688f5c9.1423293360@gps-mbp.local>
Download mbox | patch
Permalink /patch/7760/
State Accepted
Headers show

Comments

Gregory Szorc - Feb. 7, 2015, 7:16 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1423290340 28800
#      Fri Feb 06 22:25:40 2015 -0800
# Node ID 6197d9d30340e688f5c9843631252c781c3c316d
# Parent  8aa04da3b94ef23efe0ac4fe708885de83869bd1
webcommands: document "graph" web command
Sean Farley - Feb. 7, 2015, 11:21 p.m.
Gregory Szorc writes:

> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@gmail.com>
> # Date 1423290340 28800
> #      Fri Feb 06 22:25:40 2015 -0800
> # Node ID 6197d9d30340e688f5c9843631252c781c3c316d
> # Parent  8aa04da3b94ef23efe0ac4fe708885de83869bd1
> webcommands: document "graph" web command

Besides from the conflict markers, this series looks good to me and
seems pretty straight-forward.
Augie Fackler - Feb. 8, 2015, 7:44 p.m.
On Sat, Feb 07, 2015 at 03:21:13PM -0800, Sean Farley wrote:
>
> Gregory Szorc writes:
>
> > # HG changeset patch
> > # User Gregory Szorc <gregory.szorc@gmail.com>
> > # Date 1423290340 28800
> > #      Fri Feb 06 22:25:40 2015 -0800
> > # Node ID 6197d9d30340e688f5c9843631252c781c3c316d
> > # Parent  8aa04da3b94ef23efe0ac4fe708885de83869bd1
> > webcommands: document "graph" web command
>
> Besides from the conflict markers, this series looks good to me and
> seems pretty straight-forward.

I agree. If nothing else, the docstrings are a huge value (I learned
about features in archive today!). I'm not seeing all the docs I
expect on $HGWEB_URL/help/hgweb (no archive docs, for example), but
it's a good enough start I'm going to queue it and we'll refine it as
we go.

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -1161,8 +1161,24 @@  def static(web, req, tmpl):
     return []
 
 @webcommand('graph')
 def graph(web, req, tmpl):
+    """
+    /graph[/{revision}]
+    -------------------
+
+    Show information about the graphical topology of the repository.
+
+    Information rendered by this handler can be used to create visual
+    representations of repository topology.
+
+    The ``revision`` URL parameter controls the starting changeset.
+
+    The ``revcount`` query string argument can define the number of changesets
+    to show information for.
+
+    This handler will render the ``graph`` template.
+    """
 
     ctx = webutil.changectx(web.repo, req)
     rev = ctx.rev()