[PATCH RESEND] hgweb: add a "URL breadcrumb" to the index and repository pages

Matt Mackall mpm at selenic.com
Fri Dec 21 15:18:40 CST 2012


On Fri, 2012-12-21 at 01:38 +0100, Angel Ezquerra wrote:
> On Fri, Dec 21, 2012 at 12:48 AM, Matt Mackall <mpm at selenic.com> wrote:
> > On Thu, 2012-12-20 at 22:50 +0100, Angel Ezquerra wrote:
> >> # HG changeset patch
> >> # User Angel Ezquerra <angel.ezquerra at gmail.com>
> >> # Date 1354130486 -3600
> >> # Node ID f89c9a7e95ffd5a06e104f39ea568a85d7d50fcd
> >> # Parent  47026c725b27b7fdd25eaada7f079235ba2e6694
> >> hgweb: add a "URL breadcrumb" to the index and repository pages
> >
> > Again, a plea to expose a public server that reviewers can look at
> > rather than downloading and applying your patch, figuring out how to
> > configuring a one-off multi-repo hgweb config, and then testing.
> > Otherwise, only a very motivated reviewer will ever get around to
> > looking at it.
> 
> I wish I could do so but I don't have access to any public server were
> I could place my demo web server.
> 
> If anybody wants to give this a test I suggest using the following
> web.conf file:
> 
> ˜˜˜
> [web]
> style = monoblue
> collapse = true
> 
> [paths]
> 
> test/hg = PATH_TO_THE_HG_REPO
> test/hg2 = PATH_TO_THE_HG_REPO
> test/test2/hg = PATH_TO_THE_HG_REPO
> test/test2/test3/hg2 = PATH_TO_THE_HG_REPO
> ˜˜˜
> 
> And starting the server with:
> 
> hg serve --web-conf web.conf
> 
> 
> >> The purpose of this change is to make it much easier to navigate up the
> >> repository tree when the hg web server is used to serve more than one
> >> repository.
> >>
> >> A "URL breadcrumb" is a path where each of the path items can be clicked to go
> >> to the corresponding path page.
> >>
> >> 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:
> >>
> >> > myteams > myprojects
> >
> > Earlier, I wrote:
> >
> >         I actually think it would be better to present it as:
> >
> >         Mercurial > foo > bar
> >
> >         with link styling.
> >
> >         http://mercurial.markmail.org/thread/eolhlwpsbumup4r3
> >
> > What I get:
> >
> > Mercurial Repositories : > foo > bar
> >
> > without link styling (ie it all looks like inert non-clickable text).
> > The first '>' is a link (??) but I don't know why I'd ever think to
> > click on a separator. Also there's an emoticon in there for some reason.
> 
> It took me a while to understand what you meant by emoticon! Now I see
> what you mean. It does indeed look a bit weird once you notice.
> 
> > So, to be more precise, I want:
> >
> > Mercurial > foo > bar
> > ^^^^^^^^^   ^^^   ^^^  these should look like links (ie blue)
> > ^^^^^^^^^              this should be the root link
> >           ^     ^      these separators should be inert (ie black)
> 
> Would it be acceptable to show this instead?:
> 
> > Mercurial > foo > bar
> 
> That would be much easier to do since there would not be any special
> case (i.e. the first or last item which would have no '>').

There is no special case in my proposal. There is always

 '<a href={root}>Mercurial</a>'

followed by zero of more

 ' > <a href={path}>{part}</a>'. 

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list