Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make hgweb display repositories in a hierarchy?

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?

like image 880
Lóránt Pintér Avatar asked May 05 '11 07:05

Lóránt Pintér


People also ask

Is there a way to organize repositories on GitHub?

However it is there, together with all the other repositories. The issue is that all of these repositories are on the same level. There is no order, no differentiation between them. They just sort of exist on the user profile. The user is not to blame. GitHub does not provide any easy mechanism to organize your repositories.

How can I visualize the hierarchy of concepts?

Pre-designed templates to quickly visualize the hierarchy of concepts. Advanced styling and color options to represent reporting structures and levels of management. Simple to use drag and drop tools and Plus Create to quickly map out ideas, organize information, and visualize the structure of them.

Why are some entries removed from the repository page?

* Some entries in the page have been removed for brevity in illustrating the point. All remaining entries are as seen on the repositories page of this user. ** The user has been picked at random and my intention is not to criticize, but to offer it as an example.

How to create a hierarchy chart?

How to Create a Hierarchy Chart? Identify the most important or significant part of the subject or system. For example, in an organizational chart this would refer to the highest ranking position in the company.


2 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.

like image 109
zeekay Avatar answered Oct 12 '22 14:10

zeekay


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.)

like image 2
David Nagle Avatar answered Oct 12 '22 13:10

David Nagle