comparison 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
comparison
equal deleted inserted replaced
2002:4aab906517c6 2003:62647394e368
120 for parent in self.parentui.walkconfig(seen): 120 for parent in self.parentui.walkconfig(seen):
121 yield parent 121 yield parent
122 122
123 def extensions(self): 123 def extensions(self):
124 return self.configitems("extensions") 124 return self.configitems("extensions")
125
126 def hgignorefiles(self):
127 result = []
128 cfgitems = self.configitems("ui")
129 for key, value in cfgitems:
130 if key == 'ignore' or key.startswith('ignore.'):
131 path = os.path.expanduser(value)
132 result.append(path)
133 return result
125 134
126 def diffopts(self): 135 def diffopts(self):
127 if self.diffcache: 136 if self.diffcache:
128 return self.diffcache 137 return self.diffcache
129 ret = { 'showfunc' : True, 'ignorews' : False} 138 ret = { 'showfunc' : True, 'ignorews' : False}