delta-find: rename `delta-reuse-policy` to `pulled-delta-reuse-policy`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 23 Feb 2023 15:32:27 +0100
changeset 50207 f35cf52acabd
parent 50206 e69dc67f79a5
child 50208 3f3fca243dca
delta-find: rename `delta-reuse-policy` to `pulled-delta-reuse-policy` This make it clearer which type of delta we are talking about.
mercurial/configitems.py
mercurial/helptext/config.txt
mercurial/utils/urlutil.py
tests/test-revlog-delta-find.t
--- a/mercurial/configitems.py	Thu Feb 23 15:27:42 2023 +0100
+++ b/mercurial/configitems.py	Thu Feb 23 15:32:27 2023 +0100
@@ -1881,7 +1881,7 @@
 )
 coreconfigitem(
     b'paths',
-    b'.*:delta-reuse-policy',
+    b'.*:pulled-delta-reuse-policy',
     default=None,
     generic=True,
 )
--- a/mercurial/helptext/config.txt	Thu Feb 23 15:27:42 2023 +0100
+++ b/mercurial/helptext/config.txt	Thu Feb 23 15:32:27 2023 +0100
@@ -1924,7 +1924,7 @@
 
 .. container:: verbose
 
-  ``delta-reuse-policy``
+  ``pulled-delta-reuse-policy``
   Control the policy regarding deltas sent by the remote during pulls.
 
   This is an advanced option that non-admin users should not need to understand
--- a/mercurial/utils/urlutil.py	Thu Feb 23 15:27:42 2023 +0100
+++ b/mercurial/utils/urlutil.py	Thu Feb 23 15:32:27 2023 +0100
@@ -742,14 +742,16 @@
 }
 
 
-@pathsuboption(b'delta-reuse-policy', b'delta_reuse_policy')
+@pathsuboption(b'pulled-delta-reuse-policy', b'delta_reuse_policy')
 def delta_reuse_policy(ui, path, value):
     if value not in DELTA_REUSE_POLICIES:
         path_name = path.name
         if path_name is None:
             # this is an "anonymous" path, config comes from the global one
             path_name = b'*'
-        msg = _(b'(paths.%s:delta-reuse-policy has unknown value: "%s")\n')
+        msg = _(
+            b'(paths.%s:pulled-delta-reuse-policy has unknown value: "%s")\n'
+        )
         msg %= (path_name, value)
         ui.warn(msg)
     return DELTA_REUSE_POLICIES.get(value)
--- a/tests/test-revlog-delta-find.t	Thu Feb 23 15:27:42 2023 +0100
+++ b/tests/test-revlog-delta-find.t	Thu Feb 23 15:32:27 2023 +0100
@@ -193,7 +193,7 @@
   \s*1200 (re)
 
 
-Check the path.*:delta-reuse-policy option
+Check the path.*:pulled-delta-reuse-policy option
 ==========================================
 
 Get a repository with the bad parent picked and a clone ready to pull the merge
@@ -234,7 +234,7 @@
 default is to reuse the (bad) delta
 
   $ cp -ar local-pre-pull local-default
-  $ hg -R local-default pull --quiet --config 'paths.default:delta-reuse-policy=default'
+  $ hg -R local-default pull --quiet --config 'paths.default:pulled-delta-reuse-policy=default'
   DBG-DELTAS: CHANGELOG: * (glob)
   DBG-DELTAS: MANIFESTLOG: * (glob)
   DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob)
@@ -245,7 +245,7 @@
 We don't reuse the base, so we get a better delta
 
   $ cp -ar local-pre-pull local-no-reuse
-  $ hg -R local-no-reuse pull --quiet --config 'paths.default:delta-reuse-policy=no-reuse'
+  $ hg -R local-no-reuse pull --quiet --config 'paths.default:pulled-delta-reuse-policy=no-reuse'
   DBG-DELTAS: CHANGELOG: * (glob)
   DBG-DELTAS: MANIFESTLOG: * (glob)
   DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=1 * (glob)
@@ -256,7 +256,7 @@
 We requested to use the (bad) delta
 
   $ cp -ar local-pre-pull local-try-base
-  $ hg -R local-try-base pull --quiet --config 'paths.default:delta-reuse-policy=try-base'
+  $ hg -R local-try-base pull --quiet --config 'paths.default:pulled-delta-reuse-policy=try-base'
   DBG-DELTAS: CHANGELOG: * (glob)
   DBG-DELTAS: MANIFESTLOG: * (glob)
   DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob)
@@ -288,7 +288,7 @@
 
   $ cp -ar local-pre-pull-full local-try-base-full
   $ hg -R local-try-base-full pull --quiet \
-  > --config 'paths.default:delta-reuse-policy=try-base'
+  > --config 'paths.default:pulled-delta-reuse-policy=try-base'
   DBG-DELTAS: CHANGELOG: * (glob)
   DBG-DELTAS: CHANGELOG: * (glob)
   DBG-DELTAS: MANIFESTLOG: * (glob)
@@ -303,7 +303,7 @@
 
   $ cp -ar local-pre-pull-full local-forced-full
   $ hg -R local-forced-full pull --quiet \
-  > --config 'paths.default:delta-reuse-policy=forced'
+  > --config 'paths.default:pulled-delta-reuse-policy=forced'
   DBG-DELTAS: CHANGELOG: * (glob)
   DBG-DELTAS: CHANGELOG: * (glob)
   DBG-DELTAS: MANIFESTLOG: * (glob)
@@ -324,7 +324,7 @@
   5 changesets found
   $ cp -ar local-pre-pull-full local-forced-full-p1
   $ hg -R local-forced-full-p1 pull --quiet \
-  > --config 'paths.*:delta-reuse-policy=forced' all-p1.hg
+  > --config 'paths.*:pulled-delta-reuse-policy=forced' all-p1.hg
   DBG-DELTAS: CHANGELOG: * (glob)
   DBG-DELTAS: CHANGELOG: * (glob)
   DBG-DELTAS: MANIFESTLOG: * (glob)