Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 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 |
comparison
equal
deleted
inserted
replaced
39121:152ae0f84f9a | 39122:dbb3e9e44fce |
---|---|
736 depending on whether it is inlined or not | 736 depending on whether it is inlined or not |
737 | 737 |
738 Returns the first acceptable candidate revision, as ordered by | 738 Returns the first acceptable candidate revision, as ordered by |
739 _getcandidaterevs | 739 _getcandidaterevs |
740 """ | 740 """ |
741 if not revinfo.textlen: | |
742 return None # empty file do not need delta | |
743 | |
741 cachedelta = revinfo.cachedelta | 744 cachedelta = revinfo.cachedelta |
742 p1 = revinfo.p1 | 745 p1 = revinfo.p1 |
743 p2 = revinfo.p2 | 746 p2 = revinfo.p2 |
744 revlog = self.revlog | 747 revlog = self.revlog |
745 | 748 |