Show More
@@ -262,6 +262,9 b' def _writeaddedfiles(repo, pctx, files):' | |||||
262 | mctx=repo['.'], overwrite=False) |
|
262 | mctx=repo['.'], overwrite=False) | |
263 |
|
263 | |||
264 | def checkworkingcopynarrowspec(repo): |
|
264 | def checkworkingcopynarrowspec(repo): | |
|
265 | # Avoid infinite recursion when updating the working copy | |||
|
266 | if getattr(repo, '_updatingnarrowspec', False): | |||
|
267 | return | |||
265 | storespec = repo.svfs.tryread(FILENAME) |
|
268 | storespec = repo.svfs.tryread(FILENAME) | |
266 | wcspec = repo.vfs.tryread(DIRSTATE_FILENAME) |
|
269 | wcspec = repo.vfs.tryread(DIRSTATE_FILENAME) | |
267 | if wcspec != storespec: |
|
270 | if wcspec != storespec: | |
@@ -276,6 +279,7 b' def updateworkingcopy(repo, assumeclean=' | |||||
276 | """ |
|
279 | """ | |
277 | oldspec = repo.vfs.tryread(DIRSTATE_FILENAME) |
|
280 | oldspec = repo.vfs.tryread(DIRSTATE_FILENAME) | |
278 | newspec = repo.svfs.tryread(FILENAME) |
|
281 | newspec = repo.svfs.tryread(FILENAME) | |
|
282 | repo._updatingnarrowspec = True | |||
279 |
|
283 | |||
280 | oldincludes, oldexcludes = parseconfig(repo.ui, oldspec) |
|
284 | oldincludes, oldexcludes = parseconfig(repo.ui, oldspec) | |
281 | newincludes, newexcludes = parseconfig(repo.ui, newspec) |
|
285 | newincludes, newexcludes = parseconfig(repo.ui, newspec) | |
@@ -305,10 +309,9 b' def updateworkingcopy(repo, assumeclean=' | |||||
305 | for f in clean + trackeddirty: |
|
309 | for f in clean + trackeddirty: | |
306 | ds.drop(f) |
|
310 | ds.drop(f) | |
307 |
|
311 | |||
308 | repo.narrowpats = newincludes, newexcludes |
|
|||
309 | repo._narrowmatch = newmatch |
|
|||
310 | pctx = repo['.'] |
|
312 | pctx = repo['.'] | |
311 | newfiles = [f for f in pctx.manifest().walk(addedmatch) if f not in ds] |
|
313 | newfiles = [f for f in pctx.manifest().walk(addedmatch) if f not in ds] | |
312 | for f in newfiles: |
|
314 | for f in newfiles: | |
313 | ds.normallookup(f) |
|
315 | ds.normallookup(f) | |
314 | _writeaddedfiles(repo, pctx, newfiles) |
|
316 | _writeaddedfiles(repo, pctx, newfiles) | |
|
317 | repo._updatingnarrowspec = False |
General Comments 0
You need to be logged in to leave comments.
Login now