diff --git a/mercurial/filelog.py b/mercurial/filelog.py --- a/mercurial/filelog.py +++ b/mercurial/filelog.py @@ -53,10 +53,6 @@ def linkrev(self, rev): return self._revlog.linkrev(rev) - # Unused. - def flags(self, rev): - return self._revlog.flags(rev) - def commonancestorsheads(self, node1, node2): return self._revlog.commonancestorsheads(node1, node2) diff --git a/mercurial/repository.py b/mercurial/repository.py --- a/mercurial/repository.py +++ b/mercurial/repository.py @@ -502,9 +502,6 @@ def linkrev(rev): """Obtain the changeset revision number a revision is linked to.""" - def flags(rev): - """Obtain flags used to affect storage of a revision.""" - def iscensored(rev): """Return whether a revision's content has been censored.""" diff --git a/mercurial/testing/storage.py b/mercurial/testing/storage.py --- a/mercurial/testing/storage.py +++ b/mercurial/testing/storage.py @@ -96,15 +96,6 @@ with self.assertRaises(IndexError): f.linkrev(i) - self.assertEqual(f.flags(nullrev), 0) - - for i in range(-5, 5): - if i == nullrev: - continue - - with self.assertRaises(IndexError): - f.flags(i) - self.assertFalse(f.iscensored(nullrev)) for i in range(-5, 5): @@ -193,11 +184,6 @@ with self.assertRaises(IndexError): f.linkrev(1) - self.assertEqual(f.flags(0), 0) - - with self.assertRaises(IndexError): - f.flags(1) - self.assertFalse(f.iscensored(0)) with self.assertRaises(IndexError): @@ -290,13 +276,6 @@ with self.assertRaises(IndexError): f.linkrev(3) - self.assertEqual(f.flags(0), 0) - self.assertEqual(f.flags(1), 0) - self.assertEqual(f.flags(2), 0) - - with self.assertRaises(IndexError): - f.flags(3) - self.assertFalse(f.iscensored(0)) self.assertFalse(f.iscensored(1)) self.assertFalse(f.iscensored(2)) @@ -941,7 +920,6 @@ f.addrevision(stored1, tr, 1, node0, nullid, flags=revlog.REVIDX_ISCENSORED) - self.assertEqual(f.flags(1), revlog.REVIDX_ISCENSORED) self.assertTrue(f.iscensored(1)) self.assertEqual(f.revision(1), stored1) diff --git a/tests/simplestorerepo.py b/tests/simplestorerepo.py --- a/tests/simplestorerepo.py +++ b/tests/simplestorerepo.py @@ -228,7 +228,7 @@ return self._indexbyrev[rev][b'linkrev'] - def flags(self, rev): + def _flags(self, rev): validaterev(rev) return self._indexbyrev[rev][b'flags'] @@ -243,8 +243,8 @@ validaterev(baserev) validaterev(rev) - if ((self.flags(baserev) & revlog.REVIDX_RAWTEXT_CHANGING_FLAGS) - or (self.flags(rev) & revlog.REVIDX_RAWTEXT_CHANGING_FLAGS)): + if ((self._flags(baserev) & revlog.REVIDX_RAWTEXT_CHANGING_FLAGS) + or (self._flags(rev) & revlog.REVIDX_RAWTEXT_CHANGING_FLAGS)): return False return True @@ -307,7 +307,7 @@ return b'' rev = self.rev(node) - flags = self.flags(rev) + flags = self._flags(rev) path = b'/'.join([self._storepath, hex(node)]) rawtext = self._svfs.read(path) @@ -381,7 +381,7 @@ def iscensored(self, rev): validaterev(rev) - return self.flags(rev) & revlog.REVIDX_ISCENSORED + return self._flags(rev) & revlog.REVIDX_ISCENSORED def commonancestorsheads(self, a, b): validatenode(a)