Mercurial > hg-stable
changeset 39122:dbb3e9e44fce
revlog: do not search for delta for empty content
We won't find any useful base to store an empty text. So we should not even try
to.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 27 Jul 2018 14:37:31 +0200 |
parents | 152ae0f84f9a |
children | 64ddad2f26bb |
files | mercurial/revlog.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Tue Aug 14 13:44:13 2018 -0700 +++ b/mercurial/revlog.py Fri Jul 27 14:37:31 2018 +0200 @@ -738,6 +738,9 @@ Returns the first acceptable candidate revision, as ordered by _getcandidaterevs """ + if not revinfo.textlen: + return None # empty file do not need delta + cachedelta = revinfo.cachedelta p1 = revinfo.p1 p2 = revinfo.p2