Show More
@@ -181,7 +181,7 b' def save(repo, includepats, excludepats)' | |||||
181 |
|
181 | |||
182 |
|
182 | |||
183 | def copytoworkingcopy(repo): |
|
183 | def copytoworkingcopy(repo): | |
184 | spec = repo.svfs.read(FILENAME) |
|
184 | spec = format(*repo.narrowpats) | |
185 | repo.vfs.write(DIRSTATE_FILENAME, spec) |
|
185 | repo.vfs.write(DIRSTATE_FILENAME, spec) | |
186 |
|
186 | |||
187 |
|
187 | |||
@@ -296,8 +296,9 b' def checkworkingcopynarrowspec(repo):' | |||||
296 | # Avoid infinite recursion when updating the working copy |
|
296 | # Avoid infinite recursion when updating the working copy | |
297 | if getattr(repo, '_updatingnarrowspec', False): |
|
297 | if getattr(repo, '_updatingnarrowspec', False): | |
298 | return |
|
298 | return | |
299 | storespec = repo.svfs.tryread(FILENAME) |
|
299 | storespec = repo.narrowpats | |
300 | wcspec = repo.vfs.tryread(DIRSTATE_FILENAME) |
|
300 | wcspec = repo.vfs.tryread(DIRSTATE_FILENAME) | |
|
301 | wcspec = parseconfig(repo.ui, wcspec) | |||
301 | if wcspec != storespec: |
|
302 | if wcspec != storespec: | |
302 | raise error.StateError( |
|
303 | raise error.StateError( | |
303 | _(b"working copy's narrowspec is stale"), |
|
304 | _(b"working copy's narrowspec is stale"), | |
@@ -312,11 +313,10 b' def updateworkingcopy(repo, assumeclean=' | |||||
312 | be deleted. It is then up to the caller to make sure they are clean. |
|
313 | be deleted. It is then up to the caller to make sure they are clean. | |
313 | """ |
|
314 | """ | |
314 | oldspec = repo.vfs.tryread(DIRSTATE_FILENAME) |
|
315 | oldspec = repo.vfs.tryread(DIRSTATE_FILENAME) | |
315 | newspec = repo.svfs.tryread(FILENAME) |
|
316 | newincludes, newexcludes = repo.narrowpats | |
316 | repo._updatingnarrowspec = True |
|
317 | repo._updatingnarrowspec = True | |
317 |
|
318 | |||
318 | oldincludes, oldexcludes = parseconfig(repo.ui, oldspec) |
|
319 | oldincludes, oldexcludes = parseconfig(repo.ui, oldspec) | |
319 | newincludes, newexcludes = parseconfig(repo.ui, newspec) |
|
|||
320 | oldmatch = match(repo.root, include=oldincludes, exclude=oldexcludes) |
|
320 | oldmatch = match(repo.root, include=oldincludes, exclude=oldexcludes) | |
321 | newmatch = match(repo.root, include=newincludes, exclude=newexcludes) |
|
321 | newmatch = match(repo.root, include=newincludes, exclude=newexcludes) | |
322 | addedmatch = matchmod.differencematcher(newmatch, oldmatch) |
|
322 | addedmatch = matchmod.differencematcher(newmatch, oldmatch) |
General Comments 0
You need to be logged in to leave comments.
Login now