comparison mercurial/upgrade.py @ 38720:d12415b8f833

upgrade: enable adding or removing sparse-revlog requirement
author Paul Morelle <paul.morelle@octobus.net>
date Thu, 21 Jun 2018 18:05:55 +0200
parents 4ad2a1ff0404
children 93777d16a25d
comparison
equal deleted inserted replaced
38719:4ad2a1ff0404 38720:d12415b8f833
59 59
60 If an upgrade were to create a repository that dropped a requirement, 60 If an upgrade were to create a repository that dropped a requirement,
61 the dropped requirement must appear in the returned set for the upgrade 61 the dropped requirement must appear in the returned set for the upgrade
62 to be allowed. 62 to be allowed.
63 """ 63 """
64 return set() 64 return {
65 localrepo.SPARSEREVLOG_REQUIREMENT,
66 }
65 67
66 def supporteddestrequirements(repo): 68 def supporteddestrequirements(repo):
67 """Obtain requirements that upgrade supports in the destination. 69 """Obtain requirements that upgrade supports in the destination.
68 70
69 If the result of the upgrade would create requirements not in this set, 71 If the result of the upgrade would create requirements not in this set,
75 'dotencode', 77 'dotencode',
76 'fncache', 78 'fncache',
77 'generaldelta', 79 'generaldelta',
78 'revlogv1', 80 'revlogv1',
79 'store', 81 'store',
82 localrepo.SPARSEREVLOG_REQUIREMENT,
80 } 83 }
81 84
82 def allowednewrequirements(repo): 85 def allowednewrequirements(repo):
83 """Obtain requirements that can be added to a repository during upgrade. 86 """Obtain requirements that can be added to a repository during upgrade.
84 87
91 """ 94 """
92 return { 95 return {
93 'dotencode', 96 'dotencode',
94 'fncache', 97 'fncache',
95 'generaldelta', 98 'generaldelta',
99 localrepo.SPARSEREVLOG_REQUIREMENT,
96 } 100 }
97 101
98 def preservedrequirements(repo): 102 def preservedrequirements(repo):
99 return set() 103 return set()
100 104