Show More
@@ -432,9 +432,9 b' def trackedcmd(ui, repo, remotepath=None' | |||||
432 | return 0 |
|
432 | return 0 | |
433 |
|
433 | |||
434 | if update_working_copy: |
|
434 | if update_working_copy: | |
435 |
with repo.wlock(), repo.lock(), repo.transaction('narrow-wc') |
|
435 | with repo.wlock(), repo.lock(), repo.transaction('narrow-wc'): | |
436 | narrowspec.updateworkingcopy(repo) |
|
436 | narrowspec.updateworkingcopy(repo) | |
437 |
narrowspec.copytoworkingcopy(repo |
|
437 | narrowspec.copytoworkingcopy(repo) | |
438 | return 0 |
|
438 | return 0 | |
439 |
|
439 | |||
440 | if not widening and not narrowing: |
|
440 | if not widening and not narrowing: |
@@ -334,7 +334,7 b' def postshare(sourcerepo, destrepo, defa' | |||||
334 | destrepo.vfs.write('hgrc', util.tonativeeol(template % default)) |
|
334 | destrepo.vfs.write('hgrc', util.tonativeeol(template % default)) | |
335 | if repositorymod.NARROW_REQUIREMENT in sourcerepo.requirements: |
|
335 | if repositorymod.NARROW_REQUIREMENT in sourcerepo.requirements: | |
336 | with destrepo.wlock(): |
|
336 | with destrepo.wlock(): | |
337 |
narrowspec.copytoworkingcopy(destrepo |
|
337 | narrowspec.copytoworkingcopy(destrepo) | |
338 |
|
338 | |||
339 | def _postshareupdate(repo, update, checkout=None): |
|
339 | def _postshareupdate(repo, update, checkout=None): | |
340 | """Maybe perform a working directory update after a shared repo is created. |
|
340 | """Maybe perform a working directory update after a shared repo is created. |
@@ -1252,7 +1252,7 b' class localrepository(object):' | |||||
1252 |
|
1252 | |||
1253 | def setnarrowpats(self, newincludes, newexcludes): |
|
1253 | def setnarrowpats(self, newincludes, newexcludes): | |
1254 | narrowspec.save(self, newincludes, newexcludes) |
|
1254 | narrowspec.save(self, newincludes, newexcludes) | |
1255 |
narrowspec.copytoworkingcopy(self |
|
1255 | narrowspec.copytoworkingcopy(self) | |
1256 | self.invalidate(clearfilecache=True) |
|
1256 | self.invalidate(clearfilecache=True) | |
1257 | # So the next access won't be considered a conflict |
|
1257 | # So the next access won't be considered a conflict | |
1258 | # TODO: It seems like there should be a way of doing this that |
|
1258 | # TODO: It seems like there should be a way of doing this that |
@@ -161,15 +161,7 b' def save(repo, includepats, excludepats)' | |||||
161 | spec = format(includepats, excludepats) |
|
161 | spec = format(includepats, excludepats) | |
162 | repo.svfs.write(FILENAME, spec) |
|
162 | repo.svfs.write(FILENAME, spec) | |
163 |
|
163 | |||
164 |
def copytoworkingcopy(repo |
|
164 | def copytoworkingcopy(repo): | |
165 | if tr: |
|
|||
166 | def write(file): |
|
|||
167 | spec = repo.svfs.read(FILENAME) |
|
|||
168 | file.write(spec) |
|
|||
169 | file.close() |
|
|||
170 | tr.addfilegenerator('narrowspec', (DIRSTATE_FILENAME,), write, |
|
|||
171 | location='plain') |
|
|||
172 | else: |
|
|||
173 |
|
|
165 | spec = repo.svfs.read(FILENAME) | |
174 |
|
|
166 | repo.vfs.write(DIRSTATE_FILENAME, spec) | |
175 |
|
167 |
General Comments 0
You need to be logged in to leave comments.
Login now