Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/hgwebdir_mod.py @ 6284:c93b6c0e6e84
Allow hgwebdir collections to follow symlinks.
author | Eric Hopper <hopper@omnifarious.org> |
---|---|
date | Sat, 15 Mar 2008 12:42:34 -0700 |
parents | 2eb18c780287 |
children | c86207d41512 |
comparison
equal
deleted
inserted
replaced
6283:5a45c82fc7da | 6284:c93b6c0e6e84 |
---|---|
53 self._baseurl = cp.get('web', 'baseurl') | 53 self._baseurl = cp.get('web', 'baseurl') |
54 if cp.has_section('paths'): | 54 if cp.has_section('paths'): |
55 self.repos.extend(cleannames(cp.items('paths'))) | 55 self.repos.extend(cleannames(cp.items('paths'))) |
56 if cp.has_section('collections'): | 56 if cp.has_section('collections'): |
57 for prefix, root in cp.items('collections'): | 57 for prefix, root in cp.items('collections'): |
58 for path in util.walkrepos(root): | 58 for path in util.walkrepos(root, followsym = True): |
59 repo = os.path.normpath(path) | 59 repo = os.path.normpath(path) |
60 name = repo | 60 name = repo |
61 if name.startswith(prefix): | 61 if name.startswith(prefix): |
62 name = name[len(prefix):] | 62 name = name[len(prefix):] |
63 self.repos.append((name.lstrip(os.sep), repo)) | 63 self.repos.append((name.lstrip(os.sep), repo)) |