Show More
@@ -160,6 +160,16 b' def pullbundle2extraprepare(orig, pullop' | |||||
160 | extensions.wrapfunction(exchange,'_pullbundle2extraprepare', |
|
160 | extensions.wrapfunction(exchange,'_pullbundle2extraprepare', | |
161 | pullbundle2extraprepare) |
|
161 | pullbundle2extraprepare) | |
162 |
|
162 | |||
|
163 | # This is an extension point for filesystems that need to do something other | |||
|
164 | # than just blindly unlink the files. It's not clear what arguments would be | |||
|
165 | # useful, so we're passing in a fair number of them, some of them redundant. | |||
|
166 | def _narrowcleanupwdir(repo, oldincludes, oldexcludes, newincludes, newexcludes, | |||
|
167 | oldmatch, newmatch): | |||
|
168 | for f in repo.dirstate: | |||
|
169 | if not newmatch(f): | |||
|
170 | repo.dirstate.drop(f) | |||
|
171 | repo.wvfs.unlinkpath(f) | |||
|
172 | ||||
163 | def _narrow(ui, repo, remote, commoninc, oldincludes, oldexcludes, |
|
173 | def _narrow(ui, repo, remote, commoninc, oldincludes, oldexcludes, | |
164 | newincludes, newexcludes, force): |
|
174 | newincludes, newexcludes, force): | |
165 | oldmatch = narrowspec.match(repo.root, oldincludes, oldexcludes) |
|
175 | oldmatch = narrowspec.match(repo.root, oldincludes, oldexcludes) | |
@@ -235,10 +245,8 b' def _narrow(ui, repo, remote, commoninc,' | |||||
235 | util.unlinkpath(repo.svfs.join(f)) |
|
245 | util.unlinkpath(repo.svfs.join(f)) | |
236 | repo.store.markremoved(f) |
|
246 | repo.store.markremoved(f) | |
237 |
|
247 | |||
238 | for f in repo.dirstate: |
|
248 | _narrowcleanupwdir(repo, oldincludes, oldexcludes, newincludes, | |
239 |
|
|
249 | newexcludes, oldmatch, newmatch) | |
240 | repo.dirstate.drop(f) |
|
|||
241 | repo.wvfs.unlinkpath(f) |
|
|||
242 | repo.setnarrowpats(newincludes, newexcludes) |
|
250 | repo.setnarrowpats(newincludes, newexcludes) | |
243 |
|
251 | |||
244 | repo.destroyed() |
|
252 | repo.destroyed() |
General Comments 0
You need to be logged in to leave comments.
Login now