D4751: filelog: stop proxying deltaparent() (API)
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Wed Sep 26 17:12:43 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa269fa55467e: filelog: stop proxying deltaparent() (API) (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4751?vs=11406&id=11427
REVISION DETAIL
https://phab.mercurial-scm.org/D4751
AFFECTED FILES
mercurial/filelog.py
mercurial/repository.py
mercurial/testing/storage.py
tests/simplestorerepo.py
CHANGE DETAILS
diff --git a/tests/simplestorerepo.py b/tests/simplestorerepo.py
--- a/tests/simplestorerepo.py
+++ b/tests/simplestorerepo.py
@@ -233,12 +233,6 @@
return self._indexbyrev[rev][b'flags']
- def deltaparent(self, rev):
- validaterev(rev)
-
- p1node = self.parents(self.node(rev))[0]
- return self.rev(p1node)
-
def _candelta(self, baserev, rev):
validaterev(baserev)
validaterev(rev)
diff --git a/mercurial/testing/storage.py b/mercurial/testing/storage.py
--- a/mercurial/testing/storage.py
+++ b/mercurial/testing/storage.py
@@ -122,15 +122,6 @@
with self.assertRaises(error.LookupError):
f.children(b'\x01' * 20)
- self.assertEqual(f.deltaparent(nullrev), nullrev)
-
- for i in range(-5, 5):
- if i == nullrev:
- continue
-
- with self.assertRaises(IndexError):
- f.deltaparent(i)
-
def testsinglerevision(self):
f = self._makefilefn()
with self._maketransactionfn() as tr:
@@ -200,8 +191,6 @@
self.assertEqual(f.children(node), [])
- self.assertEqual(f.deltaparent(0), nullrev)
-
def testmultiplerevisions(self):
fulltext0 = b'x' * 1024
fulltext1 = fulltext0 + b'y'
@@ -313,10 +302,6 @@
self.assertEqual(f.children(node1), [node2])
self.assertEqual(f.children(node2), [])
- self.assertEqual(f.deltaparent(0), nullrev)
- self.assertEqual(f.deltaparent(1), 0)
- self.assertEqual(f.deltaparent(2), 1)
-
def testmultipleheads(self):
f = self._makefilefn()
diff --git a/mercurial/repository.py b/mercurial/repository.py
--- a/mercurial/repository.py
+++ b/mercurial/repository.py
@@ -533,9 +533,6 @@
Returns a list of nodes.
"""
- def deltaparent(rev):
- """"Return the revision that is a suitable parent to delta against."""
-
class ifiledata(interfaceutil.Interface):
"""Storage interface for data storage of a specific file.
diff --git a/mercurial/filelog.py b/mercurial/filelog.py
--- a/mercurial/filelog.py
+++ b/mercurial/filelog.py
@@ -67,9 +67,6 @@
def children(self, node):
return self._revlog.children(node)
- def deltaparent(self, rev):
- return self._revlog.deltaparent(rev)
-
def iscensored(self, rev):
return self._revlog.iscensored(rev)
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list