Mercurial > public > mercurial-scm > hg-stable
diff hgext/churn.py @ 8254:f108e89400d8
churn: use .hgchurn in repo root as default map file
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Wed, 29 Apr 2009 20:03:54 +0200 |
parents | eee2319c5895 |
children | d9f4c182aeca |
line wrap: on
line diff
--- a/hgext/churn.py Sun Apr 26 01:49:12 2009 +0200 +++ b/hgext/churn.py Wed Apr 29 20:03:54 2009 +0200 @@ -10,7 +10,7 @@ from mercurial.i18n import _ from mercurial import patch, cmdutil, util, templater -import sys +import sys, os import time, datetime def maketemplater(ui, repo, tmpl): @@ -116,12 +116,18 @@ The map file format used to specify aliases is fairly simple: - <alias email> <actual email>''' + <alias email> <actual email> + + By default .hgchurn in the working directory root will be used, if + it exists. Use the --aliases option to override this. + ''' def pad(s, l): return (s + " " * l)[:l] amap = {} aliases = opts.get('aliases') + if not aliases and os.path.exists(repo.wjoin('.hgchurn')): + aliases = repo.wjoin('.hgchurn') if aliases: for l in open(aliases, "r"): l = l.strip()