Mercurial > hg
comparison tests/simplestorerepo.py @ 39876:a269fa55467e
filelog: stop proxying deltaparent() (API)
deltaparent() obtains the revision number of the base revision a
delta in storage is stored against. It is highly revlog-centric and
may not apply to other storage backends. As a result, it doesn't
belong on the generic file storage interface.
This method/proxy is no longer used in core. The last consumer was
probably changegroup code and went away with the transition to
emitrevisions().
Differential Revision: https://phab.mercurial-scm.org/D4751
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 24 Sep 2018 13:35:50 -0700 |
parents | d909c44d29e1 |
children | f8eb71f9e3bd |
comparison
equal
deleted
inserted
replaced
39875:d909c44d29e1 | 39876:a269fa55467e |
---|---|
231 def _flags(self, rev): | 231 def _flags(self, rev): |
232 validaterev(rev) | 232 validaterev(rev) |
233 | 233 |
234 return self._indexbyrev[rev][b'flags'] | 234 return self._indexbyrev[rev][b'flags'] |
235 | 235 |
236 def deltaparent(self, rev): | |
237 validaterev(rev) | |
238 | |
239 p1node = self.parents(self.node(rev))[0] | |
240 return self.rev(p1node) | |
241 | |
242 def _candelta(self, baserev, rev): | 236 def _candelta(self, baserev, rev): |
243 validaterev(baserev) | 237 validaterev(baserev) |
244 validaterev(rev) | 238 validaterev(rev) |
245 | 239 |
246 if ((self._flags(baserev) & revlog.REVIDX_RAWTEXT_CHANGING_FLAGS) | 240 if ((self._flags(baserev) & revlog.REVIDX_RAWTEXT_CHANGING_FLAGS) |