Mercurial > public > mercurial-scm > hg-stable
diff mercurial/upgrade.py @ 35354:6226668a7169
upgrade: add a 'redeltafullall' mode
We add a new mode for delta recomputation, when selected, each full text will
go through the full "addrevision" mechanism again. This is slower than
"redeltaall" but this gives the opportunity for extensions to trigger special
logic. For example, the lfs extensions can decide to promote some revision to
lfs storage during the upgrade.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 07 Dec 2017 20:27:03 +0100 |
parents | 8f3f8b8dbab7 |
children | 6c28956ba2d4 |
line wrap: on
line diff
--- a/mercurial/upgrade.py Thu Dec 07 22:37:18 2017 +0100 +++ b/mercurial/upgrade.py Thu Dec 07 20:27:03 2017 +0100 @@ -369,6 +369,19 @@ 'recomputed; this will likely drastically slow down ' 'execution time'))) + optimizations.append(improvement( + name='redeltafulladd', + type=optimisation, + description=_('every revision will be re-added as if it was new ' + 'content. It will go through the full storage ' + 'mechanism giving extensions a chance to process it ' + '(eg. lfs). This is similar to "redeltaall" but even ' + 'slower since more logic is involved.'), + upgrademessage=_('each revision will be added as new content to the ' + 'internal storage; this will likely drastically slow ' + 'down execution time, but some extensions might need ' + 'it'))) + return optimizations def determineactions(repo, deficiencies, sourcereqs, destreqs): @@ -618,6 +631,8 @@ deltareuse = revlog.revlog.DELTAREUSESAMEREVS elif 'redeltamultibase' in actions: deltareuse = revlog.revlog.DELTAREUSESAMEREVS + if 'redeltafulladd' in actions: + deltareuse = revlog.revlog.DELTAREUSEFULLADD else: deltareuse = revlog.revlog.DELTAREUSEALWAYS