hgweb: link directly to a branch, not using changeset ID
Simon King
simon at simonking.org.uk
Mon Jun 9 17:02:15 UTC 2014
On Mon, Jun 9, 2014 at 5:11 PM, Lasse Kliemann <lasse.kliemann at gmail.com> wrote:
> In the hgweb interface, it is possible to browse the latest changeset of
> a branch like so:
>
> branches --> BRANCH_NAME --> browse (*)
>
> The URL then contains the respective changeset ID. So, when a new
> changeset is commited in BRANCH_NAME, then this URL will be outdated in
> the sense that it does not reflect the latest changes in the branch.
>
> Which URL can be used to always show files in the latest changeset of
> BRANCH_NAME? I'd like to spare my users having to do (*) each time.
>
> Thank you!
>
If you just want a URL you can send people that will always be up to
date, you can take any existing URL with a changeset identifier in it,
and replace that with the branch name. For example:
http://selenic.com/hg/file/stable
...will always show the "browse" view for the latest changeset on the
stable branch, and
http://selenic.com/hg/graph/stable
...will always show the graph for the stable branch. So as long as
your users start from the URL you sent them, they will be fine.
There are multiple bugs open for having the branch name (or other
identifier, such as tag) stay in the URL as you navigate around:
http://bz.selenic.com/show_bug.cgi?id=2296
http://bz.selenic.com/show_bug.cgi?id=2826
http://bz.selenic.com/show_bug.cgi?id=3594
Simon
More information about the Mercurial
mailing list