Mercurial > hg-stable
changeset 27179:b481bf14992d
addrevision: handle code path not producing delta
We would like to be able to exit the delta generation block without a valid
delta (for a more flexible control flow). So we make sure we do not expand the
"delta" content unless we actually have a delta.
We can do it one level lower because 'delta' is initialised at None anyway. Not
adding a level to the assignment prevent a line length issue.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 01 Dec 2015 16:22:49 -0800 |
parents | 5ebc4a192550 |
children | 8e7db961535a |
files | mercurial/revlog.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Tue Dec 01 15:29:11 2015 -0800 +++ b/mercurial/revlog.py Tue Dec 01 16:22:49 2015 -0800 @@ -1459,6 +1459,7 @@ delta = builddelta(prev) else: delta = builddelta(prev) + if delta is not None: dist, l, data, base, chainbase, chainlen, compresseddeltalen = delta if not self._isgooddelta(delta, textlen):