changeset 50790:8d574691d915 stable

censor: show that censored revision prevent repository upgrade This is not great.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 13 Oct 2023 22:40:10 +0200
parents 74c004a515bc
children 2dec23658969
files tests/test-censor.t
diffstat 1 files changed, 79 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-censor.t	Thu Oct 12 17:41:06 2023 +0100
+++ b/tests/test-censor.t	Fri Oct 13 22:40:10 2023 +0200
@@ -530,3 +530,82 @@
    *50003 (re)
 
 #endif
+
+Testing repository upgrade with censors revision
+================================================
+
+  $ cd ../rclone
+
+With the "abort" policy
+=======================
+
+  $ hg verify --config censor.policy=ignore
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  checking dirstate
+  checked 14 changesets with 15 changes to 2 files
+  $ hg debugupgraderepo --run --quiet \
+  > --optimize re-delta-parent \
+  > --config censor.policy=abort
+  upgrade will perform the following actions:
+  
+  requirements
+     preserved: * (glob)
+  
+  optimisations: re-delta-parent
+  
+  processed revlogs:
+    - all-filelogs
+    - changelog
+    - manifest
+  
+  transaction abort!
+  rollback completed
+  abort: file censored target:613bc869fceb
+  [255]
+  $ hg verify  --config censor.policy=ignore
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  checking dirstate
+  checked 14 changesets with 15 changes to 2 files
+
+With the "ignore" policy
+========================
+
+  $ hg verify --config censor.policy=ignore
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  checking dirstate
+  checked 14 changesets with 15 changes to 2 files
+  $ hg debugupgraderepo --run --quiet \
+  > --optimize re-delta-parent \
+  > --config censor.policy=ignore
+  upgrade will perform the following actions:
+  
+  requirements
+     preserved: * (glob)
+  
+  optimisations: re-delta-parent
+  
+  processed revlogs:
+    - all-filelogs
+    - changelog
+    - manifest
+  
+  transaction abort!
+  rollback completed
+  abort: file censored target:613bc869fceb
+  [255]
+  $ hg verify --config censor.policy=ignore
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+  checking dirstate
+  checked 14 changesets with 15 changes to 2 files