Skip to content
Snippets Groups Projects
Commit c96fd53c authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

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.
parent 9d4a2ea3
No related branches found
No related tags found
2 merge requests!617Merge stable into default,!599ui: fix crash in `hg paths` when pulled-delta-reuse-policy is in use
......@@ -746,5 +746,6 @@
b'no-reuse': revlog_constants.DELTA_BASE_REUSE_NO,
b'forced': revlog_constants.DELTA_BASE_REUSE_FORCE,
}
DELTA_REUSE_POLICIES_NAME = dict(i[::-1] for i in DELTA_REUSE_POLICIES.items())
......@@ -749,6 +750,10 @@
@pathsuboption(b'pulled-delta-reuse-policy', b'delta_reuse_policy')
@pathsuboption(
b'pulled-delta-reuse-policy',
b'delta_reuse_policy',
display=DELTA_REUSE_POLICIES_NAME.get,
)
def delta_reuse_policy(ui, path, value):
if value not in DELTA_REUSE_POLICIES:
path_name = path.name
......
......@@ -180,7 +180,7 @@
$ cp -R client client-forced
$ hg -R client-forced paths --config paths.default:pulled-delta-reuse-policy=forced
default = $TESTTMP/server
default:pulled-delta-reuse-policy = 2
default:pulled-delta-reuse-policy = forced
$ hg -R client-forced pull --config paths.default:pulled-delta-reuse-policy=forced
pulling from $TESTTMP/server
requesting all changes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment