Mercurial > hg
diff hgext/churn.py @ 11264:30c620e48d1c
churn: support spaces in aliases (issue2222)
author | Alexander Solovyov <piranha@piranha.org.ua> |
---|---|
date | Wed, 02 Jun 2010 14:28:45 +0200 |
parents | 13a1b2fb7ef2 |
children | ffd85ab578be |
line wrap: on
line diff
--- a/hgext/churn.py Tue Jun 01 10:55:11 2010 -0500 +++ b/hgext/churn.py Wed Jun 02 14:28:45 2010 +0200 @@ -115,7 +115,7 @@ It is possible to map alternate email addresses to a main address by providing a file using the following format:: - <alias email> <actual email> + <alias email> = <actual email> Such a file may be specified with the --aliases option, otherwise a .hgchurn file will be looked for in the working directory root. @@ -129,9 +129,8 @@ aliases = repo.wjoin('.hgchurn') if aliases: for l in open(aliases, "r"): - l = l.strip() - alias, actual = l.split() - amap[alias] = actual + alias, actual = l.split('=' in l and '=' or None, 1) + amap[alias.strip()] = actual.strip() rate = countrate(ui, repo, amap, *pats, **opts).items() if not rate: