mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
churn: support spaces in aliases (issue2222)
This commit is contained in:
parent
cdb00115fd
commit
06239f590d
@ -115,7 +115,7 @@ def churn(ui, repo, *pats, **opts):
|
||||
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 @@ def churn(ui, repo, *pats, **opts):
|
||||
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:
|
||||
|
@ -59,6 +59,12 @@ hg --config extensions.color= churn --config color.mode=ansi \
|
||||
echo % changeset number churn
|
||||
hg churn -c
|
||||
|
||||
echo 'with space = no-space' >> ../aliases
|
||||
echo a >> a
|
||||
hg commit -m a -u 'with space' -d 15:00
|
||||
echo % churn with space in alias
|
||||
hg churn --aliases ../aliases -r tip
|
||||
|
||||
cd ..
|
||||
|
||||
# issue 833: ZeroDivisionError
|
||||
|
@ -40,5 +40,7 @@ user2 +2/-0 [0;32m+++++++++++++++++++++++++++[0m
|
||||
user1 4 ***************************************************************
|
||||
user3 3 ***********************************************
|
||||
user2 2 ********************************
|
||||
% churn with space in alias
|
||||
no-space 1 ************************************************************
|
||||
adding foo
|
||||
test 0
|
||||
|
Loading…
Reference in New Issue
Block a user