Patchwork D8079: manifest: remove `.new()` from the interface

login
register
mail settings
Submitter phabricator
Date Feb. 6, 2020, 4:11 p.m.
Message ID <bb65cff73cfab6050242ee52b576d425@localhost.localdomain>
Download mbox | patch
Permalink /patch/44992/
State Not Applicable
Headers show

Comments

phabricator - Feb. 6, 2020, 4:11 p.m.
Closed by commit rHGc86256bd4eb8: manifest: remove `.new()` from the interface (authored by durin42).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8079?vs=19922&id=19950

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8079/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8079

AFFECTED FILES
  mercurial/interfaces/repository.py
  mercurial/manifest.py
  tests/test-check-interfaces.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-check-interfaces.py b/tests/test-check-interfaces.py
--- a/tests/test-check-interfaces.py
+++ b/tests/test-check-interfaces.py
@@ -252,7 +252,6 @@ 
     checkzobject(mctx)
 
     # Conforms to imanifestrevisionwritable.
-    checkzobject(mctx.new())
     checkzobject(mctx.copy())
 
     # Conforms to imanifestdict.
diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -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()
diff --git a/mercurial/interfaces/repository.py b/mercurial/interfaces/repository.py
--- a/mercurial/interfaces/repository.py
+++ b/mercurial/interfaces/repository.py
@@ -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.