hgwebdir.cgi and subdirectories

Alberto Rodríguez alberto.c.rodriguez at gmail.com
Tue Aug 24 22:56:53 UTC 2010


I am interested in this feature also.

Searching around I found this thread from this same mail-list, titled *"**How
to create a repository layout like
Mozilla's?*<http://markmail.org/thread/3hyswf3ocg4etsh6>
*":*
*http://markmail.org/thread/3hyswf3ocg4etsh6*<http://markmail.org/thread/3hyswf3ocg4etsh6>

To summarize it: there is no way to do this currently with hgwebdir.

The closest thing you can get is to set "*descend=0*" in the *hgrc *file, to
only show the repositories in the root, and then use some custom template to
show the directories.

*descend
*"hgwebdir indexes will not descend into subdirectories. Only repositories
directly in the current path will be shown (other repositories are still
available from the index corresponding to their containing path)." *Source:
**http://www.selenic.com/mercurial/hgrc.5.html*<http://www.selenic.com/mercurial/hgrc.5.html>

I tried to find a way to list the directories but could not do it. If
someone knows how to accomplish this, please give us a hand.

Anyways, I'm looking forward to this applicacion which is aiming to become a
replacement for hgwebdir, it's called hg-app, here is a demo site:
http://hg.python-works.com/

It's very cool and is evolving very fast but I don't know if it manages
subdirectories this way. I will try it, maybe it works out of the box.

Alberto César Rodríguez Tejeda


On Tue, Aug 24, 2010 at 2:23 PM, Matt Schulte <matts at commtech-fastcom.com>wrote:

>  Hopefully there is an easy answer to this one that I must be overlooking.
>
> What I have are repositories that exist in subdirectories of my main hg
> directory like this:
>
> hg/windows/repo1
> hg/windows/repo2
> hg/windows/repo3
> hg/linux/repoa
> hg/linux/repob
> hg/linux/repoc
> hg/libraries/repox
> hg/libraries/repoy
> hg/libraries/repoz
>
> When I go to the webserver page I see every repo with its path like this:
>
> http://hgserver/hg
>
> windows/repo1
> windows/repo2
> windows/repo3
> linux/repoa
> linux/repob
> linux/repoc
> libraries/repox
> libraries/repoy
> libraries/repoz
>
> What I want to have is only the directory name and then have the repos
> listed after clicking the subdirectory link.
>
> http://hgserver/hg
>
> windows
> linux
> libraries
>
> http://hgserver/hg/windows
>
> repo1
> repo2
> repo3
>
> Currently my hgweb.config file just says:
>
> [paths]
> / = /pathonmyserver/hg/*
>
> --
> Matt Schulte
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20100824/fc0af6c5/attachment.html>


More information about the Mercurial mailing list