[PATCH 2 of 2 V2] hgwebdir: add a "URL breadcrumb" to the index pages

Matt Mackall mpm at selenic.com
Fri Oct 19 01:23:56 CDT 2012

On Wed, 2012-08-08 at 17:34 +0200, Angel Ezquerra wrote:
> # HG changeset patch
> # User Angel Ezquerra <angel.ezquerra at gmail.com>
> # Date 1343330979 -7200
> # Node ID 1add64c35e1078347a0168b2aa359098a2e51144
> # Parent  8ede519e92791f3ad2fddafcaa5f40976c3bdc69
> hgwebdir: add a "URL breadcrumb" to the index pages
> A "URL breadcrumb" is a path where each of the path items can be clicked to go
> to the corresponding path page.

Finally got around to looking at these two, sorry for the delay. FYI,
they came dead last in cleaning out my inbox because they meant figuring
out how to configure an hgwebdir instance with collapsed folders to see
what they really looked like, which is just hard enough that there's
always something easier to review. I'm guessing this is why no one else
chimed in either. Setting up a demo server often helps when discussing
changes like this.

> This lets you go up the folder hierarchy very quickly. For example, when showing
> the list of repositories in http://myserver/myteams/myprojects, the following
> "breadcrumb" will be shown:
> myserver/myteams/myprojects

Playing with this locally, I actually think this one still needs work. I
get a banner that says:

 Mercurial Repositories : calx:8000/foo/bar

..where the path is in the same black non-underlined style as the rest
of the header, but is three different links if you hover over it.

a) the host name is a bit redundant, especially as this isn't something
I can copy/paste into an hg clone command or anywhere else
b) it will apparently include parts of the URL above hgweb, ie if it was
"server/development/hgweb/foo/bar", I could click on "development",
which seems wrong
c) the fact that there are links in the path is invisible, so I actually
spent a bit wondering "ok, where's this breadcrumb thing?"

I actually think it would be better to present it as:

 Mercurial > foo > bar

with link styling.

Also, once you get into a repo, there's no longer a breadcrumb link to
get back out to the directory, which is probably a much more
oft-requested feature (and probably a lot easier to implement now that
the template engine does conditionals!). But this idea does look worth
pursuing, so let's please revisit it in November.

I've queued the first patch for default, thanks.

Mathematics is the supreme nostalgia of our time.

More information about the Mercurial-devel mailing list