Show More
@@ -190,12 +190,14 b' def savewcbackup(repo, backupname):' | |||||
190 | def restorewcbackup(repo, backupname): |
|
190 | def restorewcbackup(repo, backupname): | |
191 | if repository.NARROW_REQUIREMENT not in repo.requirements: |
|
191 | if repository.NARROW_REQUIREMENT not in repo.requirements: | |
192 | return |
|
192 | return | |
|
193 | # It may not exist in old repos | |||
|
194 | if repo.vfs.exists(backupname): | |||
193 | util.rename(repo.vfs.join(backupname), repo.vfs.join(DIRSTATE_FILENAME)) |
|
195 | util.rename(repo.vfs.join(backupname), repo.vfs.join(DIRSTATE_FILENAME)) | |
194 |
|
196 | |||
195 | def clearwcbackup(repo, backupname): |
|
197 | def clearwcbackup(repo, backupname): | |
196 | if repository.NARROW_REQUIREMENT not in repo.requirements: |
|
198 | if repository.NARROW_REQUIREMENT not in repo.requirements: | |
197 | return |
|
199 | return | |
198 | repo.vfs.unlink(backupname) |
|
200 | repo.vfs.tryunlink(backupname) | |
199 |
|
201 | |||
200 | def restrictpatterns(req_includes, req_excludes, repo_includes, repo_excludes): |
|
202 | def restrictpatterns(req_includes, req_excludes, repo_includes, repo_excludes): | |
201 | r""" Restricts the patterns according to repo settings, |
|
203 | r""" Restricts the patterns according to repo settings, |
@@ -166,7 +166,7 b' Dirstate should be left alone when upgra' | |||||
166 | R d7/f |
|
166 | R d7/f | |
167 | Make it look like a repo from before narrow+share was supported |
|
167 | Make it look like a repo from before narrow+share was supported | |
168 | $ rm .hg/narrowspec.dirstate |
|
168 | $ rm .hg/narrowspec.dirstate | |
169 | $ hg st |
|
169 | $ hg ci -Am test | |
170 | abort: working copy's narrowspec is stale |
|
170 | abort: working copy's narrowspec is stale | |
171 | (run 'hg tracked --update-working-copy') |
|
171 | (run 'hg tracked --update-working-copy') | |
172 | [255] |
|
172 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now