Mercurial > wikked
changeset 8:793234411100
Fixed Mercurial files incorrectly included as pages.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 19 Dec 2012 20:30:49 -0800 |
parents | 256e563c49b7 |
children | 4146960f2d2d |
files | wikked/fs.py wikked/scm.py |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/wikked/fs.py Wed Dec 19 20:29:54 2012 -0800 +++ b/wikked/fs.py Wed Dec 19 20:30:49 2012 -0800 @@ -29,8 +29,12 @@ dirnames[:] = [d for d in dirnames if os.path.join(dirpath, d) not in self.excluded] for filename in filenames: path = os.path.join(dirpath, filename) + if path in self.excluded: + continue rel_path = os.path.relpath(path, self.root) rel_path_split = os.path.splitext(rel_path) + if rel_path_split[1] == '': + continue url = re.sub(r'[^A-Za-z0-9_\.\-\(\)/]+', '-', rel_path_split[0].lower()) yield { 'url': url,
--- a/wikked/scm.py Wed Dec 19 20:29:54 2012 -0800 +++ b/wikked/scm.py Wed Dec 19 20:30:49 2012 -0800 @@ -70,7 +70,8 @@ self._run('commit', ignore_path, '-m', 'Created .hgignore.') def getSpecialDirs(self): - return [ os.path.join(self.root, '.hg') ] + specials = [ '.hg', '.hgignore', '.hgtags' ] + return [ os.path.join(self.root, d) for d in specials ] def getHistory(self, path): st_out = self._run('status', path)