Mercurial > hg
annotate tests/test-censor.t @ 48383:4237be881bb6
status: adapt the "keyword" extensions to gather stats at lookup time
See main core code for details.
We don't factor the code in a common function yet, because we will have to adapt
a bit more things in the keyword case at the end of the series.
Differential Revision: https://phab.mercurial-scm.org/D11787
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 18 Nov 2021 22:49:05 +0100 |
parents | 95ea181d9bdd |
children | 3f86ee422095 |
rev | line source |
---|---|
37406
8c37c3220ebc
tests: skip test-censor.t when using simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
1 #require no-reposimplestore |
47457
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
2 #testcases revlogv1 revlogv2 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
3 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
4 #if revlogv2 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
5 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
6 $ cat >> $HGRCPATH <<EOF |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
7 > [experimental] |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
8 > revlogv2=enable-unstable-format-and-corrupt-my-data |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
9 > EOF |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
10 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
11 #endif |
37406
8c37c3220ebc
tests: skip test-censor.t when using simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35393
diff
changeset
|
12 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
13 $ cat >> $HGRCPATH <<EOF |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
14 > [extensions] |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
15 > censor= |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
16 > EOF |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
17 $ cp $HGRCPATH $HGRCPATH.orig |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
18 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
19 Create repo with unimpeachable content |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
20 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
21 $ hg init r |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
22 $ cd r |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
23 $ echo 'Initially untainted file' > target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
24 $ echo 'Normal file here' > bystander |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
25 $ hg add target bystander |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
26 $ hg ci -m init |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
27 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
28 Clone repo so we can test pull later |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
29 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
30 $ cd .. |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
31 $ hg clone r rpull |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
32 updating to branch default |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
33 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
34 $ cd r |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
35 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
36 Introduce content which will ultimately require censorship. Name the first |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
37 censored node C1, second C2, and so on |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
38 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
39 $ echo 'Tainted file' > target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
40 $ echo 'Passwords: hunter2' >> target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
41 $ hg ci -m taint target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
42 $ C1=`hg id --debug -i` |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
43 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
44 $ echo 'hunter3' >> target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
45 $ echo 'Normal file v2' > bystander |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
46 $ hg ci -m moretaint target bystander |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
47 $ C2=`hg id --debug -i` |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
48 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
49 Add a new sanitized versions to correct our mistake. Name the first head H1, |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
50 the second head H2, and so on |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
51 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
52 $ echo 'Tainted file is now sanitized' > target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
53 $ hg ci -m sanitized target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
54 $ H1=`hg id --debug -i` |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
55 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
56 $ hg update -r $C2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
57 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
58 $ echo 'Tainted file now super sanitized' > target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
59 $ hg ci -m 'super sanitized' target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
60 created new head |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
61 $ H2=`hg id --debug -i` |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
62 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
63 Verify target contents before censorship at each revision |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
64 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
65 $ hg cat -r $H1 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
66 Tainted file is now sanitized |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
67 $ hg cat -r $H2 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
68 Tainted file now super sanitized |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
69 $ hg cat -r $C2 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
70 Tainted file |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
71 Passwords: hunter2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
72 hunter3 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
73 $ hg cat -r $C1 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
74 Tainted file |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
75 Passwords: hunter2 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
76 $ hg cat -r 0 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
77 Initially untainted file |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
78 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
79 Censor revision with 2 offenses |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
80 |
25806
5e18f6e39006
censor: make various path forms available like other Mercurial commands
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24361
diff
changeset
|
81 (this also tests file pattern matching: path relative to cwd case) |
5e18f6e39006
censor: make various path forms available like other Mercurial commands
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24361
diff
changeset
|
82 |
5e18f6e39006
censor: make various path forms available like other Mercurial commands
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24361
diff
changeset
|
83 $ mkdir -p foo/bar/baz |
5e18f6e39006
censor: make various path forms available like other Mercurial commands
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24361
diff
changeset
|
84 $ hg --cwd foo/bar/baz censor -r $C2 -t "remove password" ../../../target |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
85 $ hg cat -r $H1 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
86 Tainted file is now sanitized |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
87 $ hg cat -r $H2 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
88 Tainted file now super sanitized |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
89 $ hg cat -r $C2 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
90 abort: censored node: 1e0247a9a4b7 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
91 (set censor.policy to ignore errors) |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
92 $ hg cat -r $C1 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
93 Tainted file |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
94 Passwords: hunter2 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
95 $ hg cat -r 0 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
96 Initially untainted file |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
97 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
98 Censor revision with 1 offense |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
99 |
25806
5e18f6e39006
censor: make various path forms available like other Mercurial commands
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24361
diff
changeset
|
100 (this also tests file pattern matching: with 'path:' scheme) |
5e18f6e39006
censor: make various path forms available like other Mercurial commands
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24361
diff
changeset
|
101 |
5e18f6e39006
censor: make various path forms available like other Mercurial commands
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
24361
diff
changeset
|
102 $ hg --cwd foo/bar/baz censor -r $C1 path:target |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
103 $ hg cat -r $H1 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
104 Tainted file is now sanitized |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
105 $ hg cat -r $H2 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
106 Tainted file now super sanitized |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
107 $ hg cat -r $C2 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
108 abort: censored node: 1e0247a9a4b7 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
109 (set censor.policy to ignore errors) |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
110 $ hg cat -r $C1 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
111 abort: censored node: 613bc869fceb |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
112 (set censor.policy to ignore errors) |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
113 $ hg cat -r 0 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
114 Initially untainted file |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
115 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
116 Can only checkout target at uncensored revisions, -X is workaround for --all |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
117 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
118 $ hg revert -r $C2 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
119 abort: censored node: 1e0247a9a4b7 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
120 (set censor.policy to ignore errors) |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
121 $ hg revert -r $C1 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
122 abort: censored node: 613bc869fceb |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
123 (set censor.policy to ignore errors) |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
124 $ hg revert -r $C1 --all |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
125 reverting bystander |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
126 reverting target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
127 abort: censored node: 613bc869fceb |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
128 (set censor.policy to ignore errors) |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
129 [255] |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
130 $ hg revert -r $C1 --all -X target |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
131 $ cat target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
132 Tainted file now super sanitized |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
133 $ hg revert -r 0 --all |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
134 reverting target |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
135 $ cat target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
136 Initially untainted file |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
137 $ hg revert -r $H2 --all |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
138 reverting bystander |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
139 reverting target |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
140 $ cat target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
141 Tainted file now super sanitized |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
142 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
143 Uncensored file can be viewed at any revision |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
144 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
145 $ hg cat -r $H1 bystander | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
146 Normal file v2 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
147 $ hg cat -r $C2 bystander | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
148 Normal file v2 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
149 $ hg cat -r $C1 bystander | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
150 Normal file here |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
151 $ hg cat -r 0 bystander | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
152 Normal file here |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
153 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
154 Can update to children of censored revision |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
155 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
156 $ hg update -r $H1 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
157 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
158 $ cat target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
159 Tainted file is now sanitized |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
160 $ hg update -r $H2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
161 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
162 $ cat target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
163 Tainted file now super sanitized |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
164 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
165 Set censor policy to abort in trusted $HGRC so hg verify fails |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
166 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
167 $ cp $HGRCPATH.orig $HGRCPATH |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
168 $ cat >> $HGRCPATH <<EOF |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
169 > [censor] |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
170 > policy = abort |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
171 > EOF |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
172 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
173 Repo fails verification due to censorship |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
174 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
175 $ hg verify |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
176 checking changesets |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
177 checking manifests |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
178 crosschecking files in changesets and manifests |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
179 checking files |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
180 target@1: censored file data |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
181 target@2: censored file data |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
39480
diff
changeset
|
182 checked 5 changesets with 7 changes to 2 files |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
183 2 integrity errors encountered! |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
184 (first damaged changeset appears to be 1) |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
185 [1] |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
186 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
187 Cannot update to revision with censored data |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
188 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
189 $ hg update -r $C2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
190 abort: censored node: 1e0247a9a4b7 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
191 (set censor.policy to ignore errors) |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
192 [255] |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
193 $ hg update -r $C1 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
194 abort: censored node: 613bc869fceb |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
195 (set censor.policy to ignore errors) |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
196 [255] |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
197 $ hg update -r 0 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
198 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
199 $ hg update -r $H2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
200 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
201 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
202 Set censor policy to ignore in trusted $HGRC so hg verify passes |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
203 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
204 $ cp $HGRCPATH.orig $HGRCPATH |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
205 $ cat >> $HGRCPATH <<EOF |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
206 > [censor] |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
207 > policy = ignore |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
208 > EOF |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
209 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
210 Repo passes verification with warnings with explicit config |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
211 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
212 $ hg verify |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
213 checking changesets |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
214 checking manifests |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
215 crosschecking files in changesets and manifests |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
216 checking files |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
39480
diff
changeset
|
217 checked 5 changesets with 7 changes to 2 files |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
218 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
219 May update to revision with censored data with explicit config |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
220 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
221 $ hg update -r $C2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
222 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
223 $ cat target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
224 $ hg update -r $C1 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
225 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
226 $ cat target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
227 $ hg update -r 0 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
228 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
229 $ cat target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
230 Initially untainted file |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
231 $ hg update -r $H2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
232 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
233 $ cat target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
234 Tainted file now super sanitized |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
235 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
236 Can merge in revision with censored data. Test requires one branch of history |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
237 with the file censored, but we can't censor at a head, so advance H1. |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
238 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
239 $ hg update -r $H1 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
240 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
241 $ C3=$H1 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
242 $ echo 'advanced head H1' > target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
243 $ hg ci -m 'advance head H1' target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
244 $ H1=`hg id --debug -i` |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
245 $ hg censor -r $C3 target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
246 $ hg update -r $H2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
247 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
248 $ hg merge -r $C3 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
249 merging target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
250 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
251 (branch merge, don't forget to commit) |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
252 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
253 Revisions present in repository heads may not be censored |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
254 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
255 $ hg update -C -r $H2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
256 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
257 $ hg censor -r $H2 target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
258 abort: cannot censor file in heads (78a8fc215e79) |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
259 (clean/delete and commit first) |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
260 [255] |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
261 $ echo 'twiddling thumbs' > bystander |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
262 $ hg ci -m 'bystander commit' |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
263 $ H2=`hg id --debug -i` |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
264 $ hg censor -r "$H2^" target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
265 abort: cannot censor file in heads (efbe78065929) |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
266 (clean/delete and commit first) |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
267 [255] |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
268 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
269 Cannot censor working directory |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
270 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
271 $ echo 'seriously no passwords' > target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
272 $ hg ci -m 'extend second head arbitrarily' target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
273 $ H2=`hg id --debug -i` |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
274 $ hg update -r "$H2^" |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
275 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
276 $ hg censor -r . target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
277 abort: cannot censor working directory |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
278 (clean/delete/update first) |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
279 [255] |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
280 $ hg update -r $H2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
281 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
282 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
283 Can re-add file after being deleted + censored |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
284 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
285 $ C4=$H2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
286 $ hg rm target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
287 $ hg ci -m 'delete target so it may be censored' |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
288 $ H2=`hg id --debug -i` |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
289 $ hg censor -r $C4 target |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
290 $ hg cat -r $C4 target | head -n 10 |
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
291 $ hg cat -r "$H2^^" target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
292 Tainted file now super sanitized |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
293 $ echo 'fresh start' > target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
294 $ hg add target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
295 $ hg ci -m reincarnated target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
296 $ H2=`hg id --debug -i` |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
297 $ hg cat -r $H2 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
298 fresh start |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
299 $ hg cat -r "$H2^" target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
300 target: no such file in rev 452ec1762369 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
301 $ hg cat -r $C4 target | head -n 10 |
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
302 $ hg cat -r "$H2^^^" target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
303 Tainted file now super sanitized |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
304 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
305 Can censor after revlog has expanded to no longer permit inline storage |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
306 |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39489
diff
changeset
|
307 $ for x in `"$PYTHON" $TESTDIR/seq.py 0 50000` |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
308 > do |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
309 > echo "Password: hunter$x" >> target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
310 > done |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
311 $ hg ci -m 'add 100k passwords' |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
312 $ H2=`hg id --debug -i` |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
313 $ C5=$H2 |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
314 $ hg revert -r "$H2^" target |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
315 $ hg ci -m 'cleaned 100k passwords' |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
316 $ H2=`hg id --debug -i` |
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
317 $ hg censor -r $C5 target |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
318 $ hg cat -r $C5 target | head -n 10 |
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
319 $ hg cat -r $H2 target | head -n 10 |
24347
1bcfecbbf569
censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff
changeset
|
320 fresh start |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
321 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
322 Repo with censored nodes can be cloned and cloned nodes are censored |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
323 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
324 $ cd .. |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
325 $ hg clone r rclone |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
326 updating to branch default |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
327 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
328 $ cd rclone |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
329 $ hg cat -r $H1 target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
330 advanced head H1 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
331 $ hg cat -r $H2~5 target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
332 Tainted file now super sanitized |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
333 $ hg cat -r $C2 target | head -n 10 |
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
334 $ hg cat -r $C1 target | head -n 10 |
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
335 $ hg cat -r 0 target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
336 Initially untainted file |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
337 $ hg verify |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
338 checking changesets |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
339 checking manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
340 crosschecking files in changesets and manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
341 checking files |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
39480
diff
changeset
|
342 checked 12 changesets with 13 changes to 2 files |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
343 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
344 Repo cloned before tainted content introduced can pull censored nodes |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
345 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
346 $ cd ../rpull |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
347 $ hg cat -r tip target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
348 Initially untainted file |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
349 $ hg verify |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
350 checking changesets |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
351 checking manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
352 crosschecking files in changesets and manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
353 checking files |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
39480
diff
changeset
|
354 checked 1 changesets with 2 changes to 2 files |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
355 $ hg pull -r $H1 -r $H2 |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34661
diff
changeset
|
356 pulling from $TESTTMP/r |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
357 searching for changes |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
358 adding changesets |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
359 adding manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
360 adding file changes |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
361 added 11 changesets with 11 changes to 2 files (+1 heads) |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32940
diff
changeset
|
362 new changesets 186fb27560c3:683e4645fded |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
363 (run 'hg heads' to see heads, 'hg merge' to merge) |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
364 $ hg update 4 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
365 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
366 $ cat target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
367 Tainted file now super sanitized |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
368 $ hg cat -r $H1 target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
369 advanced head H1 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
370 $ hg cat -r $H2~5 target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
371 Tainted file now super sanitized |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
372 $ hg cat -r $C2 target | head -n 10 |
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
373 $ hg cat -r $C1 target | head -n 10 |
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
374 $ hg cat -r 0 target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
375 Initially untainted file |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
376 $ hg verify |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
377 checking changesets |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
378 checking manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
379 crosschecking files in changesets and manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
380 checking files |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
39480
diff
changeset
|
381 checked 12 changesets with 13 changes to 2 files |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
382 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
383 Censored nodes can be pushed if they censor previously unexchanged nodes |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
384 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
385 $ echo 'Passwords: hunter2hunter2' > target |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
386 $ hg ci -m 're-add password from clone' target |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
387 created new head |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
388 $ H3=`hg id --debug -i` |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
389 $ REV=$H3 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
390 $ echo 'Re-sanitized; nothing to see here' > target |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
391 $ hg ci -m 're-sanitized' target |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
392 $ H2=`hg id --debug -i` |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
393 $ CLEANREV=$H2 |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
394 $ hg cat -r $REV target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
395 Passwords: hunter2hunter2 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
396 $ hg censor -r $REV target |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
397 $ hg cat -r $REV target | head -n 10 |
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
398 $ hg cat -r $CLEANREV target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
399 Re-sanitized; nothing to see here |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
400 $ hg push -f -r $H2 |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34661
diff
changeset
|
401 pushing to $TESTTMP/r |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
402 searching for changes |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
403 adding changesets |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
404 adding manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
405 adding file changes |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
406 added 2 changesets with 2 changes to 1 files (+1 heads) |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
407 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
408 $ cd ../r |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
409 $ hg cat -r $REV target | head -n 10 |
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
410 $ hg cat -r $CLEANREV target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
411 Re-sanitized; nothing to see here |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
412 $ hg update $CLEANREV |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
413 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
414 $ cat target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
415 Re-sanitized; nothing to see here |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
416 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
417 Censored nodes can be bundled up and unbundled in another repo |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
418 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
419 $ hg bundle --base 0 ../pwbundle |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
420 13 changesets found |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
421 $ cd ../rclone |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
422 $ hg unbundle ../pwbundle |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
423 adding changesets |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
424 adding manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
425 adding file changes |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
426 added 2 changesets with 2 changes to 2 files (+1 heads) |
39480
89630d0b3e23
phase: report number of non-public changeset alongside the new range
Boris Feld <boris.feld@octobus.net>
parents:
37406
diff
changeset
|
427 new changesets 075be80ac777:dcbaf17bf3a1 (2 drafts) |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
428 (run 'hg heads .' to see heads, 'hg merge' to merge) |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
429 $ hg cat -r $REV target | head -n 10 |
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
430 $ hg cat -r $CLEANREV target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
431 Re-sanitized; nothing to see here |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
432 $ hg update $CLEANREV |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
433 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
434 $ cat target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
435 Re-sanitized; nothing to see here |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
436 $ hg verify |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
437 checking changesets |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
438 checking manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
439 crosschecking files in changesets and manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
440 checking files |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
39480
diff
changeset
|
441 checked 14 changesets with 15 changes to 2 files |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
442 |
43433
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
443 Grepping only warns, doesn't error out |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
444 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
445 $ cd ../rpull |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
446 $ hg grep 'Normal file' |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
447 bystander:Normal file v2 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
448 $ hg grep nothing |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
449 target:Re-sanitized; nothing to see here |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
450 $ hg grep --diff 'Normal file' |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
451 cannot search in censored file: target:7 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
452 cannot search in censored file: target:10 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
453 cannot search in censored file: target:12 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
454 bystander:6:-:Normal file v2 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
455 cannot search in censored file: target:1 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
456 cannot search in censored file: target:2 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
457 cannot search in censored file: target:3 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
458 bystander:2:-:Normal file here |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
459 bystander:2:+:Normal file v2 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
460 bystander:0:+:Normal file here |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
461 $ hg grep --diff nothing |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
462 cannot search in censored file: target:7 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
463 cannot search in censored file: target:10 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
464 cannot search in censored file: target:12 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
465 target:13:+:Re-sanitized; nothing to see here |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
466 cannot search in censored file: target:1 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
467 cannot search in censored file: target:2 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
468 cannot search in censored file: target:3 |
13b8097dccbf
grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
39707
diff
changeset
|
469 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
470 Censored nodes can be imported on top of censored nodes, consecutively |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
471 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
472 $ hg init ../rimport |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
473 $ hg bundle --base 1 ../rimport/splitbundle |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
474 12 changesets found |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
475 $ cd ../rimport |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
476 $ hg pull -r $H1 -r $H2 ../r |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
477 pulling from ../r |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
478 adding changesets |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
479 adding manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
480 adding file changes |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
481 added 8 changesets with 10 changes to 2 files (+1 heads) |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
32940
diff
changeset
|
482 new changesets e97f55b2665a:dcbaf17bf3a1 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
483 (run 'hg heads' to see heads, 'hg merge' to merge) |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
484 $ hg unbundle splitbundle |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
485 adding changesets |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
486 adding manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
487 adding file changes |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
488 added 6 changesets with 5 changes to 2 files (+1 heads) |
39480
89630d0b3e23
phase: report number of non-public changeset alongside the new range
Boris Feld <boris.feld@octobus.net>
parents:
37406
diff
changeset
|
489 new changesets efbe78065929:683e4645fded (6 drafts) |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
490 (run 'hg heads .' to see heads, 'hg merge' to merge) |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
491 $ hg update $H2 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
492 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
493 $ cat target | head -n 10 |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
494 Re-sanitized; nothing to see here |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
495 $ hg verify |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
496 checking changesets |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
497 checking manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
498 crosschecking files in changesets and manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
499 checking files |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
39480
diff
changeset
|
500 checked 14 changesets with 15 changes to 2 files |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
501 $ cd ../r |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
502 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
503 Can import bundle where first revision of a file is censored |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
504 |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
505 $ hg init ../rinit |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
506 $ hg censor -r 0 target |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
507 $ hg bundle -r 0 --base null ../rinit/initbundle |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
508 1 changesets found |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
509 $ cd ../rinit |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
510 $ hg unbundle initbundle |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
511 adding changesets |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
512 adding manifests |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
513 adding file changes |
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
514 added 1 changesets with 2 changes to 2 files |
39480
89630d0b3e23
phase: report number of non-public changeset alongside the new range
Boris Feld <boris.feld@octobus.net>
parents:
37406
diff
changeset
|
515 new changesets e97f55b2665a (1 drafts) |
24348
b7f936f47f2b
censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents:
24347
diff
changeset
|
516 (run 'hg update' to get a working copy) |
47390
65b86f516ba2
censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43433
diff
changeset
|
517 $ hg cat -r 0 target | head -n 10 |
47457
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
518 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
519 #if revlogv2 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
520 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
521 Testing feature that does not work in revlog v1 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
522 =============================================== |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
523 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
524 Censoring a revision that is used as delta base |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
525 ----------------------------------------------- |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
526 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
527 $ cd .. |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
528 $ hg init censor-with-delta |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
529 $ cd censor-with-delta |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
530 $ echo root > target |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
531 $ hg add target |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
532 $ hg commit -m root |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
533 $ B0=`hg id --debug -i` |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
534 $ for x in `"$PYTHON" $TESTDIR/seq.py 0 50000` |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
535 > do |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
536 > echo "Password: hunter$x" >> target |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
537 > done |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
538 $ hg ci -m 'write a long file' |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
539 $ B1=`hg id --debug -i` |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
540 $ echo 'small change (should create a delta)' >> target |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
541 $ hg ci -m 'create a delta over the password' |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
542 (should show that the last revision is a delta, not a snapshot) |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
543 $ B2=`hg id --debug -i` |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
544 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
545 Make sure the last revision is a delta against the revision we will censor |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
546 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
547 $ hg debugdeltachain target -T '{rev} {chainid} {chainlen} {prevrev}\n' |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
548 0 1 1 -1 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
549 1 2 1 -1 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
550 2 2 2 1 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
551 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
552 Censor the file |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
553 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
554 $ hg cat -r $B1 target | wc -l |
48324
95ea181d9bdd
tests: fix test-censor by improving regexp (issue6585)
Thomas Klausner <wiz@gatalith.at>
parents:
47457
diff
changeset
|
555 *50002 (re) |
47457
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
556 $ hg censor -r $B1 target |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
557 $ hg cat -r $B1 target | wc -l |
48324
95ea181d9bdd
tests: fix test-censor by improving regexp (issue6585)
Thomas Klausner <wiz@gatalith.at>
parents:
47457
diff
changeset
|
558 *0 (re) |
47457
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
559 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
560 Check the children is fine |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
561 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
562 $ hg cat -r $B2 target | wc -l |
48324
95ea181d9bdd
tests: fix test-censor by improving regexp (issue6585)
Thomas Klausner <wiz@gatalith.at>
parents:
47457
diff
changeset
|
563 *50003 (re) |
47457
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
564 |
f8330a3fc39f
censor: implement censoring for revlogv2
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47392
diff
changeset
|
565 #endif |