Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/utils/urlutil.py @ 50402:c96fd53c0e2d stable
path: display proper user facing value for pulled-delta-reuse-policy
The integer was not what the user expect nor what could be provided as a config
value.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 15 Jun 2023 09:51:29 +0200 |
parents | 9d4a2ea3dcb9 |
children | e9c676ad18f1 |
comparison
equal
deleted
inserted
replaced
50401:9d4a2ea3dcb9 | 50402:c96fd53c0e2d |
---|---|
744 b'default': None, | 744 b'default': None, |
745 b'try-base': revlog_constants.DELTA_BASE_REUSE_TRY, | 745 b'try-base': revlog_constants.DELTA_BASE_REUSE_TRY, |
746 b'no-reuse': revlog_constants.DELTA_BASE_REUSE_NO, | 746 b'no-reuse': revlog_constants.DELTA_BASE_REUSE_NO, |
747 b'forced': revlog_constants.DELTA_BASE_REUSE_FORCE, | 747 b'forced': revlog_constants.DELTA_BASE_REUSE_FORCE, |
748 } | 748 } |
749 | 749 DELTA_REUSE_POLICIES_NAME = dict(i[::-1] for i in DELTA_REUSE_POLICIES.items()) |
750 | 750 |
751 @pathsuboption(b'pulled-delta-reuse-policy', b'delta_reuse_policy') | 751 |
752 @pathsuboption( | |
753 b'pulled-delta-reuse-policy', | |
754 b'delta_reuse_policy', | |
755 display=DELTA_REUSE_POLICIES_NAME.get, | |
756 ) | |
752 def delta_reuse_policy(ui, path, value): | 757 def delta_reuse_policy(ui, path, value): |
753 if value not in DELTA_REUSE_POLICIES: | 758 if value not in DELTA_REUSE_POLICIES: |
754 path_name = path.name | 759 path_name = path.name |
755 if path_name is None: | 760 if path_name is None: |
756 # this is an "anonymous" path, config comes from the global one | 761 # this is an "anonymous" path, config comes from the global one |