I have about 100 Mercurial repositories served by hgweb
. The repositories are stored in a folder hierarchy, but hgweb
displays the structure in a "flat" manner. This doesn't scale. Is there a way to display the repositories in a tree-like hierarchy instead?

- 10,152
- 14
- 47
- 53
3 Answers
I like to organize my repos by type, this is what my hgweb config looks like:
[web]
baseurl =
[paths]
/apps = /var/hg/apps/*
/config = /var/hg/config/*
/design = /var/hg/design/*
/music = /var/hg/music/*
/projects = /var/hg/projects/*
/scripts = /var/hg/scripts/*
You can also use ** to make it display directories recursively.
[paths]
/ = /var/hg/**
Check out the docs for other details/options: http://www.selenic.com/mercurial/hgrc.5.html#web.
You might also be interested in RhodeCode which is a more feature-rich web interface for mercurial.

- 52,505
- 13
- 109
- 108
-
Latest beta of RHodeCode have repos group so it's perfect for managing larger amount of repositories – marcinkuzminski Oct 01 '11 at 19:24
-
I thought * makes it display recursive directories and ** makes it display subrepositories? – JustinP8 Aug 23 '12 at 13:26
I'm not sure if this was an option at the time of the question, but there's now an option that enables descending into directories.
[web]
descend = True
You then have two options for how to configure your paths. If you specify a path with a single asterisk, it will descend into subdirectories until it finds repositories.
[paths]
/ = /var/hg/*
If you specify a path with two asterisks, it will also descend into repositories to see if there are nested repositories or subrepositories.
[paths]
/ = /var/hg/**
You can find more details on the Mercurial wiki at PublishingRepositories.
(It sounds as if you may also be looking to have the hierarchy displayed in a tree-like fashion. This solution only impacts which repositories will be detected. It will not change how they are displayed. I'm not aware of any built-in way to accomplish a hierarchical display.)

- 21
- 1
I had the same problem, and I solved by enabling the collapse
option:
[web]
collapse = yes

- 5,452
- 2
- 27
- 39