##// END OF EJS Templates
churn: use .hgchurn in repo root as default map file
Martin Geisler -
r8254:f108e894 default
parent child Browse files
Show More
@@ -10,7 +10,7 b''
10 10
11 11 from mercurial.i18n import _
12 12 from mercurial import patch, cmdutil, util, templater
13 import sys
13 import sys, os
14 14 import time, datetime
15 15
16 16 def maketemplater(ui, repo, tmpl):
@@ -116,12 +116,18 b' def churn(ui, repo, *pats, **opts):'
116 116
117 117 The map file format used to specify aliases is fairly simple:
118 118
119 <alias email> <actual email>'''
119 <alias email> <actual email>
120
121 By default .hgchurn in the working directory root will be used, if
122 it exists. Use the --aliases option to override this.
123 '''
120 124 def pad(s, l):
121 125 return (s + " " * l)[:l]
122 126
123 127 amap = {}
124 128 aliases = opts.get('aliases')
129 if not aliases and os.path.exists(repo.wjoin('.hgchurn')):
130 aliases = repo.wjoin('.hgchurn')
125 131 if aliases:
126 132 for l in open(aliases, "r"):
127 133 l = l.strip()
@@ -39,6 +39,10 b' user1 alias1'
39 39 user3 alias3
40 40 EOF
41 41 hg churn --aliases ../aliases
42 echo % churn with .hgchurn
43 mv ../aliases .hgchurn
44 hg churn
45 rm .hgchurn
42 46 echo % churn with column specifier
43 47 COLUMNS=40 hg churn
44 48 echo % churn by hour
@@ -15,6 +15,10 b' user1 1 ***************************'
15 15 alias3 3 **************************************************************
16 16 alias1 3 **************************************************************
17 17 user2 2 *****************************************
18 % churn with .hgchurn
19 alias3 3 **************************************************************
20 alias1 3 **************************************************************
21 user2 2 *****************************************
18 22 % churn with column specifier
19 23 user3 3 ***********************
20 24 user1 3 ***********************
General Comments 0
You need to be logged in to leave comments. Login now