comparison mercurial/repair.py @ 30375:11b8b740d54a

manifest: remove last uses of repo.manifest Now that all the functionality has been moved to manifestlog/manifestrevlog/etc, we can finally change all the uses of repo.manifest to use the new versions. A future diff will then delete repo.manifest. One additional change in this commit is to change repo.manifestlog to be a @storecache property instead of @property. This is required by some uses of repo.manifest require that it be settable (contrib/perf.py and the static http server). We can't do this in a prior change because we can't use @storecache on this until repo.manifest is no longer used anywhere.
author Durham Goode <durham@fb.com>
date Thu, 10 Nov 2016 02:13:19 -0800
parents fccc3eea2ddb
children 2e4862646f02
comparison
equal deleted inserted replaced
30374:f2d146d1e8d6 30375:11b8b740d54a
65 s = set() 65 s = set()
66 def collectone(revlog): 66 def collectone(revlog):
67 _, brokenset = revlog.getstrippoint(striprev) 67 _, brokenset = revlog.getstrippoint(striprev)
68 s.update([revlog.linkrev(r) for r in brokenset]) 68 s.update([revlog.linkrev(r) for r in brokenset])
69 69
70 collectone(repo.manifest) 70 collectone(repo.manifestlog._revlog)
71 for fname in files: 71 for fname in files:
72 collectone(repo.file(fname)) 72 collectone(repo.file(fname))
73 73
74 return s 74 return s
75 75
151 if saveheads: 151 if saveheads:
152 # do not compress temporary bundle if we remove it from disk later 152 # do not compress temporary bundle if we remove it from disk later
153 tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp', 153 tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp',
154 compress=False) 154 compress=False)
155 155
156 mfst = repo.manifest 156 mfst = repo.manifestlog._revlog
157 157
158 curtr = repo.currenttransaction() 158 curtr = repo.currenttransaction()
159 if curtr is not None: 159 if curtr is not None:
160 del curtr # avoid carrying reference to transaction for nothing 160 del curtr # avoid carrying reference to transaction for nothing
161 msg = _('programming error: cannot strip from inside a transaction') 161 msg = _('programming error: cannot strip from inside a transaction')