comparison mercurial/dirstate.py @ 16143:fceb2964fa6c stable

context: add 'dirs()' to changectx/workingctx for directory patterns this patch adds 'dirs()' to changectx/workingctx, which returns map of all directories deduced from manifest, to examine whether specified pattern is related to the context as directory or not quickly. 'workingctx.dirs()' uses 'dirstate.dirs()' rather than building another copy of it.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Thu, 23 Feb 2012 00:07:54 +0900
parents bfd3ce759682
children 9d4a2942a732
comparison
equal deleted inserted replaced
16141:f346de4dff57 16143:fceb2964fa6c
107 dirs = {} 107 dirs = {}
108 for f, s in self._map.iteritems(): 108 for f, s in self._map.iteritems():
109 if s[0] != 'r': 109 if s[0] != 'r':
110 _incdirs(dirs, f) 110 _incdirs(dirs, f)
111 return dirs 111 return dirs
112
113 def dirs(self):
114 return self._dirs
112 115
113 @propertycache 116 @propertycache
114 def _ignore(self): 117 def _ignore(self):
115 files = [self._join('.hgignore')] 118 files = [self._join('.hgignore')]
116 for name, path in self._ui.configitems("ui"): 119 for name, path in self._ui.configitems("ui"):