annotate tests/test-censor.t @ 25305:884ef09cf658 stable

convert: properly pass null ids through .hgtags (issue4678) Mercurial uses tags of null to mark deletions, but convert was silently discarding these because it had no mapping for them. Thus, it was resurrecting deleted tags.
author Matt Mackall <mpm@selenic.com>
date Wed, 27 May 2015 14:28:29 -0500
parents 8de8cd34f2e3
children 5e18f6e39006
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24347
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
1 $ cat >> $HGRCPATH <<EOF
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
2 > [extensions]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
3 > censor=
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
4 > EOF
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
5 $ cp $HGRCPATH $HGRCPATH.orig
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
6
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
7 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
8
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
9 $ hg init r
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
10 $ cd r
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
11 $ 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
12 $ 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
13 $ hg add target bystander
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
14 $ hg ci -m init
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
15
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
16 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
17
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
18 $ cd ..
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
19 $ hg clone r rpull
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
20 updating to branch default
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
21 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
22 $ cd r
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
23
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
24 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
25 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
26
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
27 $ echo 'Tainted file' > target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
28 $ echo 'Passwords: hunter2' >> target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
29 $ 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
30 $ 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
31
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
32 $ echo 'hunter3' >> target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
33 $ 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
34 $ 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
35 $ 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
36
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
37 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
38 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
39
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
40 $ 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
41 $ 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
42 $ 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
43
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
44 $ hg update -r $C2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
45 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
46 $ 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
47 $ 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
48 created new head
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
49 $ 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
50
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
51 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
52
24348
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
53 $ hg cat -r $H1 target
24347
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
54 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
55 $ hg cat -r $H2 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
56 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
57 $ hg cat -r $C2 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
58 Tainted file
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
59 Passwords: hunter2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
60 hunter3
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
61 $ hg cat -r $C1 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
62 Tainted file
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
63 Passwords: hunter2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
64 $ hg cat -r 0 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
65 Initially untainted file
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
66
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
67 Try to censor revision with too large of a tombstone message
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
68
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
69 $ hg censor -r $C1 -t 'blah blah blah blah blah blah blah blah bla' target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
70 abort: censor tombstone must be no longer than censored data
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
71 [255]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
72
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
73 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
74
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
75 $ hg censor -r $C2 -t "remove password" target
24348
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
76 $ hg cat -r $H1 target
24347
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
77 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
78 $ hg cat -r $H2 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
79 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
80 $ hg cat -r $C2 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
81 abort: censored node: 1e0247a9a4b7
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
82 (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
83 [255]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
84 $ hg cat -r $C1 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
85 Tainted file
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
86 Passwords: hunter2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
87 $ hg cat -r 0 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
88 Initially untainted file
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
89
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
90 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
91
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
92 $ hg censor -r $C1 target
24348
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
93 $ hg cat -r $H1 target
24347
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
94 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
95 $ hg cat -r $H2 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
96 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
97 $ hg cat -r $C2 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
98 abort: censored node: 1e0247a9a4b7
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
99 (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
100 [255]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
101 $ hg cat -r $C1 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
102 abort: censored node: 613bc869fceb
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
103 (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
104 [255]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
105 $ hg cat -r 0 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
106 Initially untainted file
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
107
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
108 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
109
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
110 $ hg revert -r $C2 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
111 abort: censored node: 1e0247a9a4b7
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)
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
113 [255]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
114 $ hg revert -r $C1 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
115 abort: censored node: 613bc869fceb
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
116 (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
117 [255]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
118 $ 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
119 reverting bystander
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
120 reverting target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
121 abort: censored node: 613bc869fceb
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
122 (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
123 [255]
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 -X target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
125 $ cat target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
126 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
127 $ 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
128 reverting target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
129 $ cat target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
130 Initially untainted file
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
131 $ 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
132 reverting bystander
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
133 reverting target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
134 $ cat target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
135 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
136
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
137 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
138
24348
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
139 $ hg cat -r $H1 bystander
24347
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
140 Normal file v2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
141 $ hg cat -r $C2 bystander
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
142 Normal file v2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
143 $ hg cat -r $C1 bystander
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
144 Normal file here
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
145 $ hg cat -r 0 bystander
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
146 Normal file here
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
147
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
148 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
149
24348
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
150 $ 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
151 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
152 $ cat target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
153 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
154 $ hg update -r $H2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
155 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
156 $ cat target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
157 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
158
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
159 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
160
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
161 $ cp $HGRCPATH.orig $HGRCPATH
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
162 $ cat >> $HGRCPATH <<EOF
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
163 > [censor]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
164 > policy = abort
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
165 > EOF
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 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
168
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
169 $ hg verify
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
170 checking changesets
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
171 checking manifests
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
172 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
173 checking files
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
174 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
175 target@2: censored file data
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
176 2 files, 5 changesets, 7 total revisions
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
177 2 integrity errors encountered!
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
178 (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
179 [1]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
180
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
181 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
182
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
183 $ hg update -r $C2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
184 abort: censored node: 1e0247a9a4b7
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
185 (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
186 [255]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
187 $ hg update -r $C1
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
188 abort: censored node: 613bc869fceb
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
189 (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
190 [255]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
191 $ hg update -r 0
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
192 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
193 $ hg update -r $H2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
194 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
195
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
196 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
197
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
198 $ cp $HGRCPATH.orig $HGRCPATH
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
199 $ cat >> $HGRCPATH <<EOF
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
200 > [censor]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
201 > policy = ignore
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
202 > EOF
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 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
205
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
206 $ hg verify
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
207 checking changesets
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
208 checking manifests
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
209 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
210 checking files
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
211 2 files, 5 changesets, 7 total revisions
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
212
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
213 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
214
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
215 $ hg update -r $C2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
216 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
217 $ cat target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
218 $ hg update -r $C1
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
219 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
220 $ cat target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
221 $ hg update -r 0
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
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
223 $ cat target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
224 Initially untainted file
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
225 $ hg update -r $H2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
226 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
227 $ cat target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
228 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
229
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
230 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
231 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
232
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
233 $ hg update -r $H1
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
234 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
235 $ C3=$H1
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
236 $ 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
237 $ 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
238 $ 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
239 $ 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
240 $ hg update -r $H2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
241 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
242 $ hg merge -r $C3
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
243 merging target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
244 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
245 (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
246
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
247 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
248
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
249 $ 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
250 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
251 $ 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
252 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
253 (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
254 [255]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
255 $ echo 'twiddling thumbs' > bystander
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
256 $ 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
257 $ 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
258 $ 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
259 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
260 (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
261 [255]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
262
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
263 Cannot censor working directory
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
264
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
265 $ 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
266 $ 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
267 $ 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
268 $ hg update -r "$H2^"
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
269 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
270 $ hg censor -r . target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
271 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
272 (clean/delete/update first)
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
273 [255]
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
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
277 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
278
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
279 $ C4=$H2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
280 $ hg rm target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
281 $ 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
282 $ 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
283 $ hg censor -r $C4 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
284 $ hg cat -r $C4 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
285 $ hg cat -r "$H2^^" target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
286 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
287 $ echo 'fresh start' > target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
288 $ hg add target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
289 $ 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
290 $ 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
291 $ hg cat -r $H2 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
292 fresh start
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
293 $ hg cat -r "$H2^" target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
294 target: no such file in rev 452ec1762369
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
295 [1]
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
296 $ hg cat -r $C4 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
297 $ hg cat -r "$H2^^^" target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
298 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
299
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
300 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
301
24361
8de8cd34f2e3 tests: replace uses of 'seq' with portable 'seq.py'
Matt Harbison <matt_harbison@yahoo.com>
parents: 24348
diff changeset
302 $ 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
303 > do
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
304 > 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
305 > done
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
306 $ 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
307 $ 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
308 $ C5=$H2
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
309 $ 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
310 $ 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
311 $ 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
312 $ hg censor -r $C5 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
313 $ hg cat -r $C5 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
314 $ hg cat -r $H2 target
1bcfecbbf569 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com>
parents:
diff changeset
315 fresh start
24348
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
316
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
317 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
318
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
319 $ cd ..
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
320 $ 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
321 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
322 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
323 $ cd rclone
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
324 $ hg cat -r $H1 target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
325 advanced head H1
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
326 $ hg cat -r $H2~5 target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
327 Tainted file now super sanitized
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
328 $ hg cat -r $C2 target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
329 $ hg cat -r $C1 target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
330 $ hg cat -r 0 target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
331 Initially untainted file
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
332 $ hg verify
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
333 checking changesets
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
334 checking manifests
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
335 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
336 checking files
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
337 2 files, 12 changesets, 13 total revisions
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
338
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
339 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
340
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
341 $ cd ../rpull
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
342 $ hg cat -r tip target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
343 Initially untainted file
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
344 $ hg verify
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
345 checking changesets
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
346 checking manifests
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
347 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
348 checking files
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
349 2 files, 1 changesets, 2 total revisions
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
350 $ hg pull -r $H1 -r $H2
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
351 pulling from $TESTTMP/r (glob)
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
352 searching for changes
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
353 adding changesets
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
354 adding manifests
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
355 adding file changes
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
356 added 11 changesets with 11 changes to 2 files (+1 heads)
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
357 (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
358 $ hg update 4
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
359 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
360 $ cat target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
361 Tainted file now super sanitized
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
362 $ hg cat -r $H1 target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
363 advanced head H1
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
364 $ hg cat -r $H2~5 target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
365 Tainted file now super sanitized
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
366 $ hg cat -r $C2 target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
367 $ hg cat -r $C1 target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
368 $ hg cat -r 0 target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
369 Initially untainted file
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
370 $ hg verify
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
371 checking changesets
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
372 checking manifests
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
373 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
374 checking files
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
375 2 files, 12 changesets, 13 total revisions
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
376
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
377 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
378
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
379 $ 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
380 $ 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
381 created new head
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
382 $ 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
383 $ REV=$H3
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
384 $ 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
385 $ 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
386 $ 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
387 $ CLEANREV=$H2
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
388 $ hg cat -r $REV target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
389 Passwords: hunter2hunter2
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
390 $ hg censor -r $REV target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
391 $ hg cat -r $REV target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
392 $ hg cat -r $CLEANREV target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
393 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
394 $ hg push -f -r $H2
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
395 pushing to $TESTTMP/r (glob)
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
396 searching for changes
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
397 adding changesets
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
398 adding manifests
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
399 adding file changes
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
400 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
401
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
402 $ cd ../r
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
403 $ hg cat -r $REV target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
404 $ hg cat -r $CLEANREV target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
405 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
406 $ hg update $CLEANREV
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
407 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
408 $ cat target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
409 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
410
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
411 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
412
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
413 $ 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
414 13 changesets found
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
415 $ cd ../rclone
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
416 $ hg unbundle ../pwbundle
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
417 adding changesets
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
418 adding manifests
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
419 adding file changes
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
420 added 2 changesets with 2 changes to 2 files (+1 heads)
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
421 (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
422 $ hg cat -r $REV target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
423 $ hg cat -r $CLEANREV target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
424 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
425 $ hg update $CLEANREV
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
426 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
427 $ cat target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
428 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
429 $ hg verify
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
430 checking changesets
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
431 checking manifests
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
432 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
433 checking files
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
434 2 files, 14 changesets, 15 total revisions
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
435
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
436 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
437
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
438 $ hg init ../rimport
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
439 $ 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
440 12 changesets found
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
441 $ cd ../rimport
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
442 $ 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
443 pulling from ../r
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
444 adding changesets
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
445 adding manifests
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
446 adding file changes
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
447 added 8 changesets with 10 changes to 2 files (+1 heads)
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
448 (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
449 $ hg unbundle splitbundle
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
450 adding changesets
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
451 adding manifests
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
452 adding file changes
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
453 added 6 changesets with 5 changes to 2 files (+1 heads)
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
454 (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
455 $ hg update $H2
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
456 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
457 $ cat target
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
458 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
459 $ hg verify
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
460 checking changesets
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
461 checking manifests
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
462 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
463 checking files
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
464 2 files, 14 changesets, 15 total revisions
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
465 $ cd ../r
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
466
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
467 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
468
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
469 $ hg init ../rinit
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
470 $ 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
471 $ 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
472 1 changesets found
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
473 $ cd ../rinit
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
474 $ hg unbundle initbundle
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
475 adding changesets
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
476 adding manifests
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
477 adding file changes
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
478 added 1 changesets with 2 changes to 2 files
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
479 (run 'hg update' to get a working copy)
b7f936f47f2b censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com>
parents: 24347
diff changeset
480 $ hg cat -r 0 target