hgweb page with hg log -b <branchname>

Johan Samyn johan.samyn at gmail.com
Sun Dec 27 13:57:59 CST 2009


2009/12/24 Matt Mackall <mpm at selenic.com>
>
> On Thu, 2009-12-24 at 14:09 +0100, Johan Samyn wrote:
> > Hi,
> > I plan on adding an extra link "revisions" to each branch line on the
> > branches page in the hgweb interface. It should produce a new page
> > with the results of a "hg log -b <branchname>" command (layout based
> > on the shortlog page).
>
> Sounds good. What's your plan for extending our URL syntax to include a
> branch name?
>

I'm actually working with '.../branchlog/<shortnode>/<branchname>'.
The corresponding function branchlog() in hgweb/webcommands.py
extracts the 'file' part of the req.form as the branchname.

I could have used '.../log/<shortnode>/<branchname>, as the revisions
link in the files page does with the filename, but that makes it hard
to distinguish a file from a branch I guess. (ex.: what if there is a
file and a branch with the same name ?)

In fact I think it should be '.../branchlog/<branchname>'. And
properly getting the 'branchname' part out of the req.form. I can use
this form already, and extract the 'node' part of the req.form as the
branchname. But that's not quite correct, isn't it ? So I'll have to
do some more studying to have a 'branch' part of it's own in the
req.form.

Johan


More information about the Mercurial-devel mailing list