##// END OF EJS Templates
churn: support spaces in aliases (issue2222)
Alexander Solovyov -
r11264:30c620e4 default
parent child Browse files
Show More
@@ -115,7 +115,7 b' def churn(ui, repo, *pats, **opts):'
115 115 It is possible to map alternate email addresses to a main address
116 116 by providing a file using the following format::
117 117
118 <alias email> <actual email>
118 <alias email> = <actual email>
119 119
120 120 Such a file may be specified with the --aliases option, otherwise
121 121 a .hgchurn file will be looked for in the working directory root.
@@ -129,9 +129,8 b' def churn(ui, repo, *pats, **opts):'
129 129 aliases = repo.wjoin('.hgchurn')
130 130 if aliases:
131 131 for l in open(aliases, "r"):
132 l = l.strip()
133 alias, actual = l.split()
134 amap[alias] = actual
132 alias, actual = l.split('=' in l and '=' or None, 1)
133 amap[alias.strip()] = actual.strip()
135 134
136 135 rate = countrate(ui, repo, amap, *pats, **opts).items()
137 136 if not rate:
@@ -59,6 +59,12 b' hg --config extensions.color= churn --co'
59 59 echo % changeset number churn
60 60 hg churn -c
61 61
62 echo 'with space = no-space' >> ../aliases
63 echo a >> a
64 hg commit -m a -u 'with space' -d 15:00
65 echo % churn with space in alias
66 hg churn --aliases ../aliases -r tip
67
62 68 cd ..
63 69
64 70 # issue 833: ZeroDivisionError
@@ -40,5 +40,7 b' user2 +2/-0 \x1b[0;32m+++++++++++'
40 40 user1 4 ***************************************************************
41 41 user3 3 ***********************************************
42 42 user2 2 ********************************
43 % churn with space in alias
44 no-space 1 ************************************************************
43 45 adding foo
44 46 test 0
General Comments 0
You need to be logged in to leave comments. Login now