manifest: remove `.new()` from the interface
authorAugie Fackler <augie@google.com>
Wed, 05 Feb 2020 15:01:22 -0500
changeset 44262 c86256bd4eb8
parent 44261 04a3ae7aba14
child 44263 beea86e4d332
manifest: remove `.new()` from the interface Nothing used it. Differential Revision: https://phab.mercurial-scm.org/D8079
mercurial/interfaces/repository.py
mercurial/manifest.py
tests/test-check-interfaces.py
--- a/mercurial/interfaces/repository.py	Wed Jan 29 13:39:50 2020 -0800
+++ b/mercurial/interfaces/repository.py	Wed Feb 05 15:01:22 2020 -0500
@@ -1071,14 +1071,6 @@
     as part of a larger interface.
     """
 
-    def new():
-        """Obtain a new manifest instance.
-
-        Returns an object conforming to the ``imanifestrevisionwritable``
-        interface. The instance will be associated with the same
-        ``imanifestlog`` collection as this instance.
-        """
-
     def copy():
         """Obtain a copy of this manifest instance.
 
--- a/mercurial/manifest.py	Wed Jan 29 13:39:50 2020 -0800
+++ b/mercurial/manifest.py	Wed Feb 05 15:01:22 2020 -0500
@@ -1921,9 +1921,6 @@
     def _storage(self):
         return self._manifestlog.getstorage(b'')
 
-    def new(self):
-        return memmanifestctx(self._manifestlog)
-
     def copy(self):
         memmf = memmanifestctx(self._manifestlog)
         memmf._manifestdict = self.read().copy()
@@ -1970,9 +1967,6 @@
     def node(self):
         return self._node
 
-    def new(self):
-        return memmanifestctx(self._manifestlog)
-
     def copy(self):
         memmf = memmanifestctx(self._manifestlog)
         memmf._manifestdict = self.read().copy()
@@ -2037,9 +2031,6 @@
     def _storage(self):
         return self._manifestlog.getstorage(b'')
 
-    def new(self, dir=b''):
-        return memtreemanifestctx(self._manifestlog, dir=dir)
-
     def copy(self):
         memmf = memtreemanifestctx(self._manifestlog, dir=self._dir)
         memmf._treemanifest = self._treemanifest.copy()
@@ -2122,9 +2113,6 @@
     def node(self):
         return self._node
 
-    def new(self, dir=b''):
-        return memtreemanifestctx(self._manifestlog, dir=dir)
-
     def copy(self):
         memmf = memtreemanifestctx(self._manifestlog, dir=self._dir)
         memmf._treemanifest = self.read().copy()
--- a/tests/test-check-interfaces.py	Wed Jan 29 13:39:50 2020 -0800
+++ b/tests/test-check-interfaces.py	Wed Feb 05 15:01:22 2020 -0500
@@ -252,7 +252,6 @@
     checkzobject(mctx)
 
     # Conforms to imanifestrevisionwritable.
-    checkzobject(mctx.new())
     checkzobject(mctx.copy())
 
     # Conforms to imanifestdict.