##// END OF EJS Templates
largefiles: simplify lfdirstate ignore handling - it is only for tracking .hglf
Mads Kiilerich -
r18148:bf6252d1 default
parent child Browse files
Show More
@@ -135,6 +135,8 b' class largefilesdirstate(dirstate.dirsta'
135 return super(largefilesdirstate, self).forget(unixpath(f))
135 return super(largefilesdirstate, self).forget(unixpath(f))
136 def normallookup(self, f):
136 def normallookup(self, f):
137 return super(largefilesdirstate, self).normallookup(unixpath(f))
137 return super(largefilesdirstate, self).normallookup(unixpath(f))
138 def _ignore(self):
139 return False
138
140
139 def openlfdirstate(ui, repo, create=True):
141 def openlfdirstate(ui, repo, create=True):
140 '''
142 '''
@@ -157,14 +157,6 b' def reposetup(ui, repo):'
157 newfiles.append(f)
157 newfiles.append(f)
158 return newfiles
158 return newfiles
159
159
160 # Create a function that we can use to override what is
161 # normally the ignore matcher. We've already checked
162 # for ignored files on the first dirstate walk, and
163 # unnecessarily re-checking here causes a huge performance
164 # hit because lfdirstate only knows about largefiles
165 def _ignoreoverride(self):
166 return False
167
168 m = copy.copy(match)
160 m = copy.copy(match)
169 m._files = tostandins(m._files)
161 m._files = tostandins(m._files)
170
162
@@ -172,14 +164,6 b' def reposetup(ui, repo):'
172 ignored, clean, unknown, listsubrepos)
164 ignored, clean, unknown, listsubrepos)
173 if working:
165 if working:
174 try:
166 try:
175 # Any non-largefiles that were explicitly listed must be
176 # taken out or lfdirstate.status will report an error.
177 # The status of these files was already computed using
178 # super's status.
179 # Override lfdirstate's ignore matcher to not do
180 # anything
181 origignore = lfdirstate._ignore
182 lfdirstate._ignore = _ignoreoverride
183
167
184 def sfindirstate(f):
168 def sfindirstate(f):
185 sf = lfutil.standin(f)
169 sf = lfutil.standin(f)
@@ -220,8 +204,7 b' def reposetup(ui, repo):'
220 else:
204 else:
221 added.append(lfile)
205 added.append(lfile)
222 finally:
206 finally:
223 # Replace the original ignore function
207 pass
224 lfdirstate._ignore = origignore
225
208
226 # Standins no longer found in lfdirstate has been removed
209 # Standins no longer found in lfdirstate has been removed
227 for standin in ctx1.manifest():
210 for standin in ctx1.manifest():
General Comments 0
You need to be logged in to leave comments. Login now