Mercurial > hg
comparison hgext/churn.py @ 12068:2e7647d25458 stable
churn: do not crash on empty lines in alias file
author | Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de> |
---|---|
date | Sun, 29 Aug 2010 10:54:22 +0200 |
parents | 40c06bbf58be |
children | 7c3c44413bc1 |
comparison
equal
deleted
inserted
replaced
12067:a4fbbe0fbc38 | 12068:2e7647d25458 |
---|---|
127 aliases = opts.get('aliases') | 127 aliases = opts.get('aliases') |
128 if not aliases and os.path.exists(repo.wjoin('.hgchurn')): | 128 if not aliases and os.path.exists(repo.wjoin('.hgchurn')): |
129 aliases = repo.wjoin('.hgchurn') | 129 aliases = repo.wjoin('.hgchurn') |
130 if aliases: | 130 if aliases: |
131 for l in open(aliases, "r"): | 131 for l in open(aliases, "r"): |
132 if not l.strip(): | |
133 continue | |
132 alias, actual = l.split('=' in l and '=' or None, 1) | 134 alias, actual = l.split('=' in l and '=' or None, 1) |
133 amap[alias.strip()] = actual.strip() | 135 amap[alias.strip()] = actual.strip() |
134 | 136 |
135 rate = countrate(ui, repo, amap, *pats, **opts).items() | 137 rate = countrate(ui, repo, amap, *pats, **opts).items() |
136 if not rate: | 138 if not rate: |