Mercurial web interface readable folder names

125 Views Asked by At

I've set up mercurial server and default mercurial web interface. I've set collapse option to true so I can see folder hierarchy when viewing repositories in web interface. I know that I can set name, description, contact etc. for each repository and all that stuff will be shown in web interface. Is it possible to do the same for the folders?

1

There are 1 best solutions below

0
On BEST ANSWER

Found answer in mercurial sources.

Here you can see than contact and description fields are always empty for directories:

# add '/' to the name to make it obvious that
# the entry is a directory, not a regular repository
row = {'contact': "",
       'contact_sort': "",
       'name': name + '/',
       'name_sort': name,
       'url': url,
       'description': "",
       'description_sort': "",
       'lastchange': d,
       'lastchange_sort': d[1]-d[0],
       'archives': [],
       'isdirectory': True}

seendirs.add(name)
yield row

When you try to cheat and create empty .hg folder by yourself, mercurial will treat that folder as a mercurial repository and when you try to open this folder in web interface, you'll see repository overview instead of directory listing.

So, I can't do what I want without modifying sources.