comparison mercurial/hgweb/hgwebdir_mod.py @ 11677:8f8a7976f4bc stable

hgwebdir: allow pure relative globs in paths This allows the (to me, in some setups) obvious configuration: [paths] / = * or / = ** Relative paths used to work with [collections] even though it isn't documented. Perhaps it should be documented?
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 21 Jul 2010 22:22:28 +0200
parents 48163c39e1f1
children 9617803b1acb
comparison
equal deleted inserted replaced
11676:e4357c214bf1 11677:8f8a7976f4bc
30 try: 30 try:
31 recurse = {'*': False, '**': True}[roottail] 31 recurse = {'*': False, '**': True}[roottail]
32 except KeyError: 32 except KeyError:
33 repos.append((prefix, root)) 33 repos.append((prefix, root))
34 continue 34 continue
35 roothead = os.path.normpath(roothead) 35 roothead = os.path.normpath(os.path.abspath(roothead))
36 for path in util.walkrepos(roothead, followsym=True, recurse=recurse): 36 for path in util.walkrepos(roothead, followsym=True, recurse=recurse):
37 path = os.path.normpath(path) 37 path = os.path.normpath(path)
38 name = util.pconvert(path[len(roothead):]).strip('/') 38 name = util.pconvert(path[len(roothead):]).strip('/')
39 if prefix: 39 if prefix:
40 name = prefix + '/' + name 40 name = prefix + '/' + name