manifest: remove last uses of repo.manifest
authorDurham Goode <durham@fb.com>
Thu, 10 Nov 2016 02:13:19 -0800
changeset 30385 11b8b740d54a
parent 30384 f2d146d1e8d6
child 30386 f84fc6a92817
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.
contrib/debugshell.py
hgext/convert/hg.py
mercurial/bundlerepo.py
mercurial/cmdutil.py
mercurial/hgweb/webutil.py
mercurial/repair.py
mercurial/templatekw.py
mercurial/verify.py
--- a/contrib/debugshell.py	Fri Nov 11 01:20:13 2016 -0800
+++ b/contrib/debugshell.py	Thu Nov 10 02:13:19 2016 -0800
@@ -18,7 +18,7 @@
         'mercurial': mercurial,
         'repo': repo,
         'cl': repo.changelog,
-        'mf': repo.manifest,
+        'mf': repo.manifestlog,
     }
 
     code.interact(msg, local=objects)
@@ -27,7 +27,7 @@
     import IPython
 
     cl = repo.changelog
-    mf = repo.manifest
+    mf = repo.manifestlog
     cl, mf # use variables to appease pyflakes
 
     IPython.embed()
--- a/hgext/convert/hg.py	Fri Nov 11 01:20:13 2016 -0800
+++ b/hgext/convert/hg.py	Thu Nov 10 02:13:19 2016 -0800
@@ -352,7 +352,7 @@
             p2 = node
 
         if self.filemapmode and nparents == 1:
-            man = self.repo.manifest
+            man = self.repo.manifestlog._revlog
             mnode = self.repo.changelog.read(nodemod.bin(p2))[0]
             closed = 'close' in commit.extra
             if not closed and not man.cmp(m1node, man.revision(mnode)):
--- a/mercurial/bundlerepo.py	Fri Nov 11 01:20:13 2016 -0800
+++ b/mercurial/bundlerepo.py	Thu Nov 10 02:13:19 2016 -0800
@@ -359,7 +359,7 @@
 
     @localrepo.unfilteredpropertycache
     def filestart(self):
-        self.manifest
+        self.manifestlog
         return self.filestart
 
     def url(self):
--- a/mercurial/cmdutil.py	Fri Nov 11 01:20:13 2016 -0800
+++ b/mercurial/cmdutil.py	Thu Nov 10 02:13:19 2016 -0800
@@ -559,7 +559,7 @@
             if len(dirlog):
                 r = dirlog
         elif mf:
-            r = repo.manifest
+            r = repo.manifestlog._revlog
         elif file_:
             filelog = repo.file(file_)
             if len(filelog):
@@ -1324,7 +1324,8 @@
             mnode = ctx.manifestnode()
             # i18n: column positioning for "hg log"
             self.ui.write(_("manifest:    %d:%s\n") %
-                          (self.repo.manifest.rev(mnode), hex(mnode)),
+                          (self.repo.manifestlog._revlog.rev(mnode),
+                           hex(mnode)),
                           label='ui.debug log.manifest')
         # i18n: column positioning for "hg log"
         self.ui.write(_("user:        %s\n") % ctx.user(),
--- a/mercurial/hgweb/webutil.py	Fri Nov 11 01:20:13 2016 -0800
+++ b/mercurial/hgweb/webutil.py	Thu Nov 10 02:13:19 2016 -0800
@@ -269,7 +269,7 @@
     try:
         ctx = repo[changeid]
     except error.RepoError:
-        man = repo.manifest
+        man = repo.manifestlog._revlog
         ctx = repo[man.linkrev(man.rev(man.lookup(changeid)))]
 
     return ctx
--- a/mercurial/repair.py	Fri Nov 11 01:20:13 2016 -0800
+++ b/mercurial/repair.py	Thu Nov 10 02:13:19 2016 -0800
@@ -67,7 +67,7 @@
         _, brokenset = revlog.getstrippoint(striprev)
         s.update([revlog.linkrev(r) for r in brokenset])
 
-    collectone(repo.manifest)
+    collectone(repo.manifestlog._revlog)
     for fname in files:
         collectone(repo.file(fname))
 
@@ -153,7 +153,7 @@
         tmpbundlefile = _bundle(repo, savebases, saveheads, node, 'temp',
                             compress=False)
 
-    mfst = repo.manifest
+    mfst = repo.manifestlog._revlog
 
     curtr = repo.currenttransaction()
     if curtr is not None:
--- a/mercurial/templatekw.py	Fri Nov 11 01:20:13 2016 -0800
+++ b/mercurial/templatekw.py	Thu Nov 10 02:13:19 2016 -0800
@@ -458,7 +458,8 @@
         # just avoid crash, we might want to use the 'ff...' hash in future
         return
     args = args.copy()
-    args.update({'rev': repo.manifest.rev(mnode), 'node': hex(mnode)})
+    args.update({'rev': repo.manifestlog._revlog.rev(mnode),
+                 'node': hex(mnode)})
     return templ('manifest', **args)
 
 def shownames(namespace, **args):
--- a/mercurial/verify.py	Fri Nov 11 01:20:13 2016 -0800
+++ b/mercurial/verify.py	Thu Nov 10 02:13:19 2016 -0800
@@ -51,7 +51,7 @@
         self.errors = 0
         self.warnings = 0
         self.havecl = len(repo.changelog) > 0
-        self.havemf = len(repo.manifest) > 0
+        self.havemf = len(repo.manifestlog._revlog) > 0
         self.revlogv1 = repo.changelog.version != revlog.REVLOGV0
         self.lrugetctx = util.lrucachefunc(repo.changectx)
         self.refersmf = False