Mercurial > hg
comparison mercurial/exchangev2.py @ 46626:ee91966aec0f
requirements: add constant for revlog v1 requirement
Since this series is adding a new requirement, we might as well clean up while
we're here.
Differential Revision: https://phab.mercurial-scm.org/D10105
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Wed, 03 Mar 2021 14:00:45 +0100 |
parents | 7a93b7b3dc2d |
children | a41565bef69f |
comparison
equal
deleted
inserted
replaced
46625:3941fe53670d | 46626:ee91966aec0f |
---|---|
20 error, | 20 error, |
21 mdiff, | 21 mdiff, |
22 narrowspec, | 22 narrowspec, |
23 phases, | 23 phases, |
24 pycompat, | 24 pycompat, |
25 requirements as requirementsmod, | |
25 setdiscovery, | 26 setdiscovery, |
26 ) | 27 ) |
27 from .interfaces import repository | 28 from .interfaces import repository |
28 | 29 |
29 | 30 |
181 if len(repo): | 182 if len(repo): |
182 return False | 183 return False |
183 | 184 |
184 # TODO This is super hacky. There needs to be a storage API for this. We | 185 # TODO This is super hacky. There needs to be a storage API for this. We |
185 # also need to check for compatibility with the remote. | 186 # also need to check for compatibility with the remote. |
186 if b'revlogv1' not in repo.requirements: | 187 if requirementsmod.REVLOGV1_REQUIREMENT not in repo.requirements: |
187 return False | 188 return False |
188 | 189 |
189 return True | 190 return True |
190 | 191 |
191 | 192 |