Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.py @ 2003:62647394e368
Implementation of per-user .hgignore.
Reference: http://www.selenic.com/mercurial/bts/issue166
If the [ui] section of .hgrc contains keys like "ignore" or
"ignore.something", the values corresponding to these keys are
treated as per-user hgignore files. These hgignore files apply to all
repositories used by that user.
author | mcmillen@cs.cmu.edu |
---|---|
date | Fri, 24 Mar 2006 20:18:02 +0100 |
parents | 0541768fa558 |
children | 65634e1038dd |
line wrap: on
line diff
--- a/mercurial/ui.py Fri Mar 24 19:51:05 2006 +0100 +++ b/mercurial/ui.py Fri Mar 24 20:18:02 2006 +0100 @@ -123,6 +123,15 @@ def extensions(self): return self.configitems("extensions") + def hgignorefiles(self): + result = [] + cfgitems = self.configitems("ui") + for key, value in cfgitems: + if key == 'ignore' or key.startswith('ignore.'): + path = os.path.expanduser(value) + result.append(path) + return result + def diffopts(self): if self.diffcache: return self.diffcache