Mercurial > hg
changeset 27249:0e5aab543d85
revlog: clarify which revision is added to 'tested' when using cached delta
The tested delta revisions are added to the 'tested' set. These are
the same revisions we pass to builddelta(). However, in one case, we
add builddelta(rev)[3] to the set intead of adding 'rev' itself. In
that particular case, that element is the same as the function's input
revision (because self._generaldelta is true), so the effect is the
same. Still, let's just add the function's input revision to avoid
confusing future readers.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 04 Dec 2015 16:45:06 -0800 |
parents | 0d5fe81320a9 |
children | bff71fe05768 |
files | mercurial/revlog.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Fri Dec 04 17:22:26 2015 -0800 +++ b/mercurial/revlog.py Fri Dec 04 16:45:06 2015 -0800 @@ -1428,7 +1428,7 @@ # Assume what we received from the server is a good choice # build delta will reuse the cache candidatedelta = builddelta(cachedelta[0]) - tested.add(candidatedelta[3]) + tested.add(cachedelta[0]) if self._isgooddelta(candidatedelta, textlen): delta = candidatedelta if delta is None and self._generaldelta: