Show More
@@ -15,6 +15,9 b' from . import util as interfaceutil' | |||||
15 | # we should move this to just "narrow" or similar. |
|
15 | # we should move this to just "narrow" or similar. | |
16 | NARROW_REQUIREMENT = b'narrowhg-experimental' |
|
16 | NARROW_REQUIREMENT = b'narrowhg-experimental' | |
17 |
|
17 | |||
|
18 | # Enables sparse working directory usage | |||
|
19 | SPARSE_REQUIREMENT = b'exp-sparse' | |||
|
20 | ||||
18 | # Local repository feature string. |
|
21 | # Local repository feature string. | |
19 |
|
22 | |||
20 | # Revlogs are being used for file storage. |
|
23 | # Revlogs are being used for file storage. |
@@ -816,7 +816,7 b' def ensurerequirementscompatible(ui, req' | |||||
816 |
|
816 | |||
817 | ``error.RepoError`` should be raised on failure. |
|
817 | ``error.RepoError`` should be raised on failure. | |
818 | """ |
|
818 | """ | |
819 |
if |
|
819 | if repository.SPARSE_REQUIREMENT in requirements and not sparse.enabled: | |
820 | raise error.RepoError( |
|
820 | raise error.RepoError( | |
821 | _( |
|
821 | _( | |
822 | b'repository is using sparse feature but ' |
|
822 | b'repository is using sparse feature but ' | |
@@ -1067,7 +1067,7 b' class localrepository(object):' | |||||
1067 | b'shared', |
|
1067 | b'shared', | |
1068 | b'relshared', |
|
1068 | b'relshared', | |
1069 | b'dotencode', |
|
1069 | b'dotencode', | |
1070 | b'exp-sparse', |
|
1070 | repository.SPARSE_REQUIREMENT, | |
1071 | b'internal-phase', |
|
1071 | b'internal-phase', | |
1072 | } |
|
1072 | } | |
1073 |
|
1073 |
@@ -24,8 +24,10 b' from . import (' | |||||
24 | scmutil, |
|
24 | scmutil, | |
25 | util, |
|
25 | util, | |
26 | ) |
|
26 | ) | |
|
27 | from .interfaces import repository | |||
27 | from .utils import hashutil |
|
28 | from .utils import hashutil | |
28 |
|
29 | |||
|
30 | ||||
29 | # Whether sparse features are enabled. This variable is intended to be |
|
31 | # Whether sparse features are enabled. This variable is intended to be | |
30 | # temporary to facilitate porting sparse to core. It should eventually be |
|
32 | # temporary to facilitate porting sparse to core. It should eventually be | |
31 | # a per-repo option, possibly a repo requirement. |
|
33 | # a per-repo option, possibly a repo requirement. | |
@@ -606,11 +608,11 b' def _updateconfigandrefreshwdir(' | |||||
606 | # updated. But this requires massive rework to matcher() and its |
|
608 | # updated. But this requires massive rework to matcher() and its | |
607 | # consumers. |
|
609 | # consumers. | |
608 |
|
610 | |||
609 |
if |
|
611 | if repository.SPARSE_REQUIREMENT in oldrequires and removing: | |
610 |
repo.requirements.discard( |
|
612 | repo.requirements.discard(repository.SPARSE_REQUIREMENT) | |
611 | scmutil.writereporequirements(repo) |
|
613 | scmutil.writereporequirements(repo) | |
612 |
elif |
|
614 | elif repository.SPARSE_REQUIREMENT not in oldrequires: | |
613 |
repo.requirements.add( |
|
615 | repo.requirements.add(repository.SPARSE_REQUIREMENT) | |
614 | scmutil.writereporequirements(repo) |
|
616 | scmutil.writereporequirements(repo) | |
615 |
|
617 | |||
616 | try: |
|
618 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now