diff tests/test-censor.t @ 51270:ceeb8fa23cc8

censor: accept multiple revision in a single call This is useful when dealing with corruption, as all the corrupted revision can be dealt with in one go.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Dec 2023 22:56:08 +0100
parents db121ddd171e
children 508fd40dc86a
line wrap: on
line diff
--- a/tests/test-censor.t	Fri Dec 01 22:46:46 2023 +0100
+++ b/tests/test-censor.t	Fri Dec 01 22:56:08 2023 +0100
@@ -80,7 +80,7 @@
   $ hg --config extensions.censor= --cwd foo/bar/baz censor -r $C2 -t "remove password" ../../../target
   checking for the censored content in 2 heads
   checking for the censored content in the working directory
-  censoring 1 file revision
+  censoring 1 file revisions
   $ hg cat -r $H1 target | head -n 10
   Tainted file is now sanitized
   $ hg cat -r $H2 target | head -n 10
@@ -101,7 +101,7 @@
   $ hg --config extensions.censor= --cwd foo/bar/baz censor -r $C1 path:target
   checking for the censored content in 2 heads
   checking for the censored content in the working directory
-  censoring 1 file revision
+  censoring 1 file revisions
   $ hg cat -r $H1 target | head -n 10
   Tainted file is now sanitized
   $ hg cat -r $H2 target | head -n 10
@@ -243,7 +243,7 @@
   $ hg --config extensions.censor= censor -r $C3 target
   checking for the censored content in 2 heads
   checking for the censored content in the working directory
-  censoring 1 file revision
+  censoring 1 file revisions
   $ hg update -r $H2
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg merge -r $C3
@@ -294,7 +294,7 @@
   $ hg --config extensions.censor= censor -r $C4 target
   checking for the censored content in 2 heads
   checking for the censored content in the working directory
-  censoring 1 file revision
+  censoring 1 file revisions
   $ hg cat -r $C4 target | head -n 10
   $ hg cat -r "$H2^^" target | head -n 10
   Tainted file now super sanitized
@@ -329,7 +329,7 @@
   $ hg --config extensions.censor= censor -r $C5 target
   checking for the censored content in 2 heads
   checking for the censored content in the working directory
-  censoring 1 file revision
+  censoring 1 file revisions
 
 The important part is for the censor operation to not crash and the repository
 to not be corrupted.  Right now this involve keeping the revlog split.
@@ -410,7 +410,7 @@
   $ hg --config extensions.censor= censor -r $REV target
   checking for the censored content in 3 heads
   checking for the censored content in the working directory
-  censoring 1 file revision
+  censoring 1 file revisions
   $ hg cat -r $REV target | head -n 10
   $ hg cat -r $CLEANREV target | head -n 10
   Re-sanitized; nothing to see here
@@ -513,7 +513,7 @@
   $ hg --config extensions.censor= censor -r 0 target
   checking for the censored content in 3 heads
   checking for the censored content in the working directory
-  censoring 1 file revision
+  censoring 1 file revisions
   $ hg bundle -r 0 --base null ../rinit/initbundle
   1 changesets found
   $ cd ../rinit
@@ -530,7 +530,17 @@
 
   $ hg --config extensions.censor= censor -r 0  --no-check-heads target
   checking for the censored content in the working directory
-  censoring 1 file revision
+  censoring 1 file revisions
+
+Can censor multiple revision in one go.
+
+  $ cd ../r
+  $ hg --config extensions.censor= censor -r 0+1  target
+  checking for the censored content in 3 heads
+  checking for the censored content in the working directory
+  censoring 2 file revisions
+
+
 
 #if revlogv2
 
@@ -572,7 +582,7 @@
   $ hg --config extensions.censor= censor -r $B1 target
   checking for the censored content in 1 heads
   checking for the censored content in the working directory
-  censoring 1 file revision
+  censoring 1 file revisions
   $ hg cat -r $B1 target | wc -l
    *0 (re)