Mercurial > hg
comparison contrib/churn.py @ 5915:d0576d065993
Prefer i in d over d.has_key(i)
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Sun, 20 Jan 2008 14:39:25 +0100 |
parents | 083b6e3142a2 |
children | 75d9fe70c654 |
comparison
equal
deleted
inserted
replaced
5914:8e7796a990c5 | 5915:d0576d065993 |
---|---|
112 continue | 112 continue |
113 | 113 |
114 who, lines = __gather(ui, repo, node1, node2) | 114 who, lines = __gather(ui, repo, node1, node2) |
115 | 115 |
116 # remap the owner if possible | 116 # remap the owner if possible |
117 if amap.has_key(who): | 117 if who in amap: |
118 ui.note("using '%s' alias for '%s'\n" % (amap[who], who)) | 118 ui.note("using '%s' alias for '%s'\n" % (amap[who], who)) |
119 who = amap[who] | 119 who = amap[who] |
120 | 120 |
121 if not stats.has_key(who): | 121 if not who in stats: |
122 stats[who] = 0 | 122 stats[who] = 0 |
123 stats[who] += lines | 123 stats[who] += lines |
124 | 124 |
125 ui.note("rev %d: %d lines by %s\n" % (rev, lines, who)) | 125 ui.note("rev %d: %d lines by %s\n" % (rev, lines, who)) |
126 | 126 |