##// END OF EJS Templates
largefiles: remove overly complex handling of ignored and unknown files
Mads Kiilerich -
r18145:93206823 default
parent child Browse files
Show More
@@ -188,17 +188,11 b' def reposetup(ui, repo):'
188 match._files = [f for f in match._files
188 match._files = [f for f in match._files
189 if sfindirstate(f)]
189 if sfindirstate(f)]
190 # Don't waste time getting the ignored and unknown
190 # Don't waste time getting the ignored and unknown
191 # files again; we already have them
191 # files from lfdirstate
192 s = lfdirstate.status(match, [], False,
192 s = lfdirstate.status(match, [], False,
193 listclean, False)
193 listclean, False)
194 (unsure, modified, added, removed, missing, unknown,
194 (unsure, modified, added, removed, missing, _unknown,
195 ignored, clean) = s
195 _ignored, clean) = s
196 # Replace the list of ignored and unknown files with
197 # the previously calculated lists, and strip out the
198 # largefiles
199 lfiles = set(lfdirstate._map)
200 ignored = set(result[5]).difference(lfiles)
201 unknown = set(result[4]).difference(lfiles)
202 if parentworking:
196 if parentworking:
203 for lfile in unsure:
197 for lfile in unsure:
204 standin = lfutil.standin(lfile)
198 standin = lfutil.standin(lfile)
@@ -229,6 +223,7 b' def reposetup(ui, repo):'
229 # Replace the original ignore function
223 # Replace the original ignore function
230 lfdirstate._ignore = origignore
224 lfdirstate._ignore = origignore
231
225
226 # Standins no longer found in lfdirstate has been removed
232 for standin in ctx1.manifest():
227 for standin in ctx1.manifest():
233 if not lfutil.isstandin(standin):
228 if not lfutil.isstandin(standin):
234 continue
229 continue
@@ -243,20 +238,17 b' def reposetup(ui, repo):'
243
238
244 # Largefiles are not really removed when they're
239 # Largefiles are not really removed when they're
245 # still in the normal dirstate. Likewise, normal
240 # still in the normal dirstate. Likewise, normal
246 # files are not really removed if it's still in
241 # files are not really removed if they are still in
247 # lfdirstate. This happens in merges where files
242 # lfdirstate. This happens in merges where files
248 # change type.
243 # change type.
249 removed = [f for f in removed if f not in self.dirstate]
244 removed = [f for f in removed if f not in self.dirstate]
250 result[2] = [f for f in result[2] if f not in lfdirstate]
245 result[2] = [f for f in result[2] if f not in lfdirstate]
251
246
247 lfiles = set(lfdirstate._map)
252 # Unknown files
248 # Unknown files
253 unknown = set(unknown).difference(ignored)
249 result[4] = set(result[4]).difference(lfiles)
254 result[4] = [f for f in unknown
250 # Ignored files
255 if (self.dirstate[f] == '?' and
251 result[5] = set(result[5]).difference(lfiles)
256 not lfutil.isstandin(f))]
257 # Ignored files were calculated earlier by the dirstate,
258 # and we already stripped out the largefiles from the list
259 result[5] = ignored
260 # combine normal files and largefiles
252 # combine normal files and largefiles
261 normals = [[fn for fn in filelist
253 normals = [[fn for fn in filelist
262 if not lfutil.isstandin(fn)]
254 if not lfutil.isstandin(fn)]
General Comments 0
You need to be logged in to leave comments. Login now