##// END OF EJS Templates
pyoxidized: adapt output of `test-phases.t`...
marmoute -
r48649:f1af5a08 stable
parent child Browse files
Show More
@@ -1,1060 +1,1060
1 $ cat > $TESTTMP/hook.sh << 'EOF'
1 $ cat > $TESTTMP/hook.sh << 'EOF'
2 > echo "test-hook-close-phase: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE"
2 > echo "test-hook-close-phase: $HG_NODE: $HG_OLDPHASE -> $HG_PHASE"
3 > EOF
3 > EOF
4
4
5 $ cat >> $HGRCPATH << EOF
5 $ cat >> $HGRCPATH << EOF
6 > [extensions]
6 > [extensions]
7 > phasereport=$TESTDIR/testlib/ext-phase-report.py
7 > phasereport=$TESTDIR/testlib/ext-phase-report.py
8 > [hooks]
8 > [hooks]
9 > txnclose-phase.test = sh $TESTTMP/hook.sh
9 > txnclose-phase.test = sh $TESTTMP/hook.sh
10 > EOF
10 > EOF
11
11
12 $ hglog() { hg log --template "{rev} {phaseidx} {desc}\n" $*; }
12 $ hglog() { hg log --template "{rev} {phaseidx} {desc}\n" $*; }
13 $ mkcommit() {
13 $ mkcommit() {
14 > echo "$1" > "$1"
14 > echo "$1" > "$1"
15 > hg add "$1"
15 > hg add "$1"
16 > message="$1"
16 > message="$1"
17 > shift
17 > shift
18 > hg ci -m "$message" $*
18 > hg ci -m "$message" $*
19 > }
19 > }
20
20
21 $ hg init initialrepo
21 $ hg init initialrepo
22 $ cd initialrepo
22 $ cd initialrepo
23
23
24 Cannot change null revision phase
24 Cannot change null revision phase
25
25
26 $ hg phase --force --secret null
26 $ hg phase --force --secret null
27 abort: cannot change null revision phase
27 abort: cannot change null revision phase
28 [255]
28 [255]
29 $ hg phase null
29 $ hg phase null
30 -1: public
30 -1: public
31
31
32 $ mkcommit A
32 $ mkcommit A
33 test-debug-phase: new rev 0: x -> 1
33 test-debug-phase: new rev 0: x -> 1
34 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> draft
34 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> draft
35
35
36 New commit are draft by default
36 New commit are draft by default
37
37
38 $ hglog
38 $ hglog
39 0 1 A
39 0 1 A
40
40
41 Following commit are draft too
41 Following commit are draft too
42
42
43 $ mkcommit B
43 $ mkcommit B
44 test-debug-phase: new rev 1: x -> 1
44 test-debug-phase: new rev 1: x -> 1
45 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> draft
45 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> draft
46
46
47 $ hglog
47 $ hglog
48 1 1 B
48 1 1 B
49 0 1 A
49 0 1 A
50
50
51 Working directory phase is secret when its parent is secret.
51 Working directory phase is secret when its parent is secret.
52
52
53 $ hg phase --force --secret .
53 $ hg phase --force --secret .
54 test-debug-phase: move rev 0: 1 -> 2
54 test-debug-phase: move rev 0: 1 -> 2
55 test-debug-phase: move rev 1: 1 -> 2
55 test-debug-phase: move rev 1: 1 -> 2
56 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: draft -> secret
56 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: draft -> secret
57 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> secret
57 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> secret
58 $ hg log -r 'wdir()' -T '{phase}\n'
58 $ hg log -r 'wdir()' -T '{phase}\n'
59 secret
59 secret
60 $ hg log -r 'wdir() and public()' -T '{phase}\n'
60 $ hg log -r 'wdir() and public()' -T '{phase}\n'
61 $ hg log -r 'wdir() and draft()' -T '{phase}\n'
61 $ hg log -r 'wdir() and draft()' -T '{phase}\n'
62 $ hg log -r 'wdir() and secret()' -T '{phase}\n'
62 $ hg log -r 'wdir() and secret()' -T '{phase}\n'
63 secret
63 secret
64
64
65 Working directory phase is draft when its parent is draft.
65 Working directory phase is draft when its parent is draft.
66
66
67 $ hg phase --draft .
67 $ hg phase --draft .
68 test-debug-phase: move rev 1: 2 -> 1
68 test-debug-phase: move rev 1: 2 -> 1
69 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: secret -> draft
69 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: secret -> draft
70 $ hg log -r 'wdir()' -T '{phase}\n'
70 $ hg log -r 'wdir()' -T '{phase}\n'
71 draft
71 draft
72 $ hg log -r 'wdir() and public()' -T '{phase}\n'
72 $ hg log -r 'wdir() and public()' -T '{phase}\n'
73 $ hg log -r 'wdir() and draft()' -T '{phase}\n'
73 $ hg log -r 'wdir() and draft()' -T '{phase}\n'
74 draft
74 draft
75 $ hg log -r 'wdir() and secret()' -T '{phase}\n'
75 $ hg log -r 'wdir() and secret()' -T '{phase}\n'
76
76
77 Working directory phase is secret when a new commit will be created as secret,
77 Working directory phase is secret when a new commit will be created as secret,
78 even if the parent is draft.
78 even if the parent is draft.
79
79
80 $ hg log -r 'wdir() and secret()' -T '{phase}\n' \
80 $ hg log -r 'wdir() and secret()' -T '{phase}\n' \
81 > --config phases.new-commit='secret'
81 > --config phases.new-commit='secret'
82 secret
82 secret
83
83
84 Working directory phase is draft when its parent is public.
84 Working directory phase is draft when its parent is public.
85
85
86 $ hg phase --public .
86 $ hg phase --public .
87 test-debug-phase: move rev 0: 1 -> 0
87 test-debug-phase: move rev 0: 1 -> 0
88 test-debug-phase: move rev 1: 1 -> 0
88 test-debug-phase: move rev 1: 1 -> 0
89 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: draft -> public
89 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: draft -> public
90 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> public
90 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> public
91 $ hg log -r 'wdir()' -T '{phase}\n'
91 $ hg log -r 'wdir()' -T '{phase}\n'
92 draft
92 draft
93 $ hg log -r 'wdir() and public()' -T '{phase}\n'
93 $ hg log -r 'wdir() and public()' -T '{phase}\n'
94 $ hg log -r 'wdir() and draft()' -T '{phase}\n'
94 $ hg log -r 'wdir() and draft()' -T '{phase}\n'
95 draft
95 draft
96 $ hg log -r 'wdir() and secret()' -T '{phase}\n'
96 $ hg log -r 'wdir() and secret()' -T '{phase}\n'
97 $ hg log -r 'wdir() and secret()' -T '{phase}\n' \
97 $ hg log -r 'wdir() and secret()' -T '{phase}\n' \
98 > --config phases.new-commit='secret'
98 > --config phases.new-commit='secret'
99 secret
99 secret
100
100
101 Draft commit are properly created over public one:
101 Draft commit are properly created over public one:
102
102
103 $ hg phase
103 $ hg phase
104 1: public
104 1: public
105 $ hglog
105 $ hglog
106 1 0 B
106 1 0 B
107 0 0 A
107 0 0 A
108
108
109 $ mkcommit C
109 $ mkcommit C
110 test-debug-phase: new rev 2: x -> 1
110 test-debug-phase: new rev 2: x -> 1
111 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> draft
111 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> draft
112 $ mkcommit D
112 $ mkcommit D
113 test-debug-phase: new rev 3: x -> 1
113 test-debug-phase: new rev 3: x -> 1
114 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> draft
114 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> draft
115
115
116 $ hglog
116 $ hglog
117 3 1 D
117 3 1 D
118 2 1 C
118 2 1 C
119 1 0 B
119 1 0 B
120 0 0 A
120 0 0 A
121
121
122 Test creating changeset as secret
122 Test creating changeset as secret
123
123
124 $ mkcommit E --config phases.new-commit='secret'
124 $ mkcommit E --config phases.new-commit='secret'
125 test-debug-phase: new rev 4: x -> 2
125 test-debug-phase: new rev 4: x -> 2
126 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: -> secret
126 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: -> secret
127 $ hglog
127 $ hglog
128 4 2 E
128 4 2 E
129 3 1 D
129 3 1 D
130 2 1 C
130 2 1 C
131 1 0 B
131 1 0 B
132 0 0 A
132 0 0 A
133
133
134 Test the secret property is inherited
134 Test the secret property is inherited
135
135
136 $ mkcommit H
136 $ mkcommit H
137 test-debug-phase: new rev 5: x -> 2
137 test-debug-phase: new rev 5: x -> 2
138 test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: -> secret
138 test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: -> secret
139 $ hglog
139 $ hglog
140 5 2 H
140 5 2 H
141 4 2 E
141 4 2 E
142 3 1 D
142 3 1 D
143 2 1 C
143 2 1 C
144 1 0 B
144 1 0 B
145 0 0 A
145 0 0 A
146
146
147 Even on merge
147 Even on merge
148
148
149 $ hg up -q 1
149 $ hg up -q 1
150 $ mkcommit "B'"
150 $ mkcommit "B'"
151 test-debug-phase: new rev 6: x -> 1
151 test-debug-phase: new rev 6: x -> 1
152 created new head
152 created new head
153 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> draft
153 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> draft
154 $ hglog
154 $ hglog
155 6 1 B'
155 6 1 B'
156 5 2 H
156 5 2 H
157 4 2 E
157 4 2 E
158 3 1 D
158 3 1 D
159 2 1 C
159 2 1 C
160 1 0 B
160 1 0 B
161 0 0 A
161 0 0 A
162 $ hg merge 4 # E
162 $ hg merge 4 # E
163 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
163 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
164 (branch merge, don't forget to commit)
164 (branch merge, don't forget to commit)
165 $ hg phase
165 $ hg phase
166 6: draft
166 6: draft
167 4: secret
167 4: secret
168 $ hg ci -m "merge B' and E"
168 $ hg ci -m "merge B' and E"
169 test-debug-phase: new rev 7: x -> 2
169 test-debug-phase: new rev 7: x -> 2
170 test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: -> secret
170 test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: -> secret
171
171
172 $ hglog
172 $ hglog
173 7 2 merge B' and E
173 7 2 merge B' and E
174 6 1 B'
174 6 1 B'
175 5 2 H
175 5 2 H
176 4 2 E
176 4 2 E
177 3 1 D
177 3 1 D
178 2 1 C
178 2 1 C
179 1 0 B
179 1 0 B
180 0 0 A
180 0 0 A
181
181
182 Test secret changeset are not pushed
182 Test secret changeset are not pushed
183
183
184 $ hg init ../push-dest
184 $ hg init ../push-dest
185 $ cat > ../push-dest/.hg/hgrc << EOF
185 $ cat > ../push-dest/.hg/hgrc << EOF
186 > [phases]
186 > [phases]
187 > publish=False
187 > publish=False
188 > EOF
188 > EOF
189 $ hg outgoing ../push-dest --template='{rev} {phase} {desc|firstline}\n'
189 $ hg outgoing ../push-dest --template='{rev} {phase} {desc|firstline}\n'
190 comparing with ../push-dest
190 comparing with ../push-dest
191 searching for changes
191 searching for changes
192 0 public A
192 0 public A
193 1 public B
193 1 public B
194 2 draft C
194 2 draft C
195 3 draft D
195 3 draft D
196 6 draft B'
196 6 draft B'
197 $ hg outgoing -r 'branch(default)' ../push-dest --template='{rev} {phase} {desc|firstline}\n'
197 $ hg outgoing -r 'branch(default)' ../push-dest --template='{rev} {phase} {desc|firstline}\n'
198 comparing with ../push-dest
198 comparing with ../push-dest
199 searching for changes
199 searching for changes
200 0 public A
200 0 public A
201 1 public B
201 1 public B
202 2 draft C
202 2 draft C
203 3 draft D
203 3 draft D
204 6 draft B'
204 6 draft B'
205
205
206 $ hg push ../push-dest -f # force because we push multiple heads
206 $ hg push ../push-dest -f # force because we push multiple heads
207 pushing to ../push-dest
207 pushing to ../push-dest
208 searching for changes
208 searching for changes
209 adding changesets
209 adding changesets
210 adding manifests
210 adding manifests
211 adding file changes
211 adding file changes
212 added 5 changesets with 5 changes to 5 files (+1 heads)
212 added 5 changesets with 5 changes to 5 files (+1 heads)
213 test-debug-phase: new rev 0: x -> 0
213 test-debug-phase: new rev 0: x -> 0
214 test-debug-phase: new rev 1: x -> 0
214 test-debug-phase: new rev 1: x -> 0
215 test-debug-phase: new rev 2: x -> 1
215 test-debug-phase: new rev 2: x -> 1
216 test-debug-phase: new rev 3: x -> 1
216 test-debug-phase: new rev 3: x -> 1
217 test-debug-phase: new rev 4: x -> 1
217 test-debug-phase: new rev 4: x -> 1
218 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public
218 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public
219 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public
219 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public
220 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> draft
220 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> draft
221 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> draft
221 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> draft
222 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> draft
222 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> draft
223 $ hglog
223 $ hglog
224 7 2 merge B' and E
224 7 2 merge B' and E
225 6 1 B'
225 6 1 B'
226 5 2 H
226 5 2 H
227 4 2 E
227 4 2 E
228 3 1 D
228 3 1 D
229 2 1 C
229 2 1 C
230 1 0 B
230 1 0 B
231 0 0 A
231 0 0 A
232 $ cd ../push-dest
232 $ cd ../push-dest
233 $ hglog
233 $ hglog
234 4 1 B'
234 4 1 B'
235 3 1 D
235 3 1 D
236 2 1 C
236 2 1 C
237 1 0 B
237 1 0 B
238 0 0 A
238 0 0 A
239
239
240 (Issue3303)
240 (Issue3303)
241 Check that remote secret changeset are ignore when checking creation of remote heads
241 Check that remote secret changeset are ignore when checking creation of remote heads
242
242
243 We add a secret head into the push destination. This secret head shadows a
243 We add a secret head into the push destination. This secret head shadows a
244 visible shared between the initial repo and the push destination.
244 visible shared between the initial repo and the push destination.
245
245
246 $ hg up -q 4 # B'
246 $ hg up -q 4 # B'
247 $ mkcommit Z --config phases.new-commit=secret
247 $ mkcommit Z --config phases.new-commit=secret
248 test-debug-phase: new rev 5: x -> 2
248 test-debug-phase: new rev 5: x -> 2
249 test-hook-close-phase: 2713879da13d6eea1ff22b442a5a87cb31a7ce6a: -> secret
249 test-hook-close-phase: 2713879da13d6eea1ff22b442a5a87cb31a7ce6a: -> secret
250 $ hg phase .
250 $ hg phase .
251 5: secret
251 5: secret
252
252
253 We now try to push a new public changeset that descend from the common public
253 We now try to push a new public changeset that descend from the common public
254 head shadowed by the remote secret head.
254 head shadowed by the remote secret head.
255
255
256 $ cd ../initialrepo
256 $ cd ../initialrepo
257 $ hg up -q 6 #B'
257 $ hg up -q 6 #B'
258 $ mkcommit I
258 $ mkcommit I
259 test-debug-phase: new rev 8: x -> 1
259 test-debug-phase: new rev 8: x -> 1
260 created new head
260 created new head
261 test-hook-close-phase: 6d6770faffce199f1fddd1cf87f6f026138cf061: -> draft
261 test-hook-close-phase: 6d6770faffce199f1fddd1cf87f6f026138cf061: -> draft
262 $ hg push ../push-dest
262 $ hg push ../push-dest
263 pushing to ../push-dest
263 pushing to ../push-dest
264 searching for changes
264 searching for changes
265 adding changesets
265 adding changesets
266 adding manifests
266 adding manifests
267 adding file changes
267 adding file changes
268 added 1 changesets with 1 changes to 1 files (+1 heads)
268 added 1 changesets with 1 changes to 1 files (+1 heads)
269 test-debug-phase: new rev 6: x -> 1
269 test-debug-phase: new rev 6: x -> 1
270 test-hook-close-phase: 6d6770faffce199f1fddd1cf87f6f026138cf061: -> draft
270 test-hook-close-phase: 6d6770faffce199f1fddd1cf87f6f026138cf061: -> draft
271
271
272 :note: The "(+1 heads)" is wrong as we do not had any visible head
272 :note: The "(+1 heads)" is wrong as we do not had any visible head
273
273
274 check that branch cache with "served" filter are properly computed and stored
274 check that branch cache with "served" filter are properly computed and stored
275
275
276 $ ls ../push-dest/.hg/cache/branch2*
276 $ ls ../push-dest/.hg/cache/branch2*
277 ../push-dest/.hg/cache/branch2-base
277 ../push-dest/.hg/cache/branch2-base
278 ../push-dest/.hg/cache/branch2-served
278 ../push-dest/.hg/cache/branch2-served
279 $ cat ../push-dest/.hg/cache/branch2-served
279 $ cat ../push-dest/.hg/cache/branch2-served
280 6d6770faffce199f1fddd1cf87f6f026138cf061 6 465891ffab3c47a3c23792f7dc84156e19a90722
280 6d6770faffce199f1fddd1cf87f6f026138cf061 6 465891ffab3c47a3c23792f7dc84156e19a90722
281 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default
281 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default
282 6d6770faffce199f1fddd1cf87f6f026138cf061 o default
282 6d6770faffce199f1fddd1cf87f6f026138cf061 o default
283 $ hg heads -R ../push-dest --template '{rev}:{node} {phase}\n' #update visible cache too
283 $ hg heads -R ../push-dest --template '{rev}:{node} {phase}\n' #update visible cache too
284 6:6d6770faffce199f1fddd1cf87f6f026138cf061 draft
284 6:6d6770faffce199f1fddd1cf87f6f026138cf061 draft
285 5:2713879da13d6eea1ff22b442a5a87cb31a7ce6a secret
285 5:2713879da13d6eea1ff22b442a5a87cb31a7ce6a secret
286 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e draft
286 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e draft
287 $ ls ../push-dest/.hg/cache/branch2*
287 $ ls ../push-dest/.hg/cache/branch2*
288 ../push-dest/.hg/cache/branch2-base
288 ../push-dest/.hg/cache/branch2-base
289 ../push-dest/.hg/cache/branch2-served
289 ../push-dest/.hg/cache/branch2-served
290 ../push-dest/.hg/cache/branch2-visible
290 ../push-dest/.hg/cache/branch2-visible
291 $ cat ../push-dest/.hg/cache/branch2-served
291 $ cat ../push-dest/.hg/cache/branch2-served
292 6d6770faffce199f1fddd1cf87f6f026138cf061 6 465891ffab3c47a3c23792f7dc84156e19a90722
292 6d6770faffce199f1fddd1cf87f6f026138cf061 6 465891ffab3c47a3c23792f7dc84156e19a90722
293 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default
293 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default
294 6d6770faffce199f1fddd1cf87f6f026138cf061 o default
294 6d6770faffce199f1fddd1cf87f6f026138cf061 o default
295 $ cat ../push-dest/.hg/cache/branch2-visible
295 $ cat ../push-dest/.hg/cache/branch2-visible
296 6d6770faffce199f1fddd1cf87f6f026138cf061 6
296 6d6770faffce199f1fddd1cf87f6f026138cf061 6
297 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default
297 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e o default
298 2713879da13d6eea1ff22b442a5a87cb31a7ce6a o default
298 2713879da13d6eea1ff22b442a5a87cb31a7ce6a o default
299 6d6770faffce199f1fddd1cf87f6f026138cf061 o default
299 6d6770faffce199f1fddd1cf87f6f026138cf061 o default
300
300
301
301
302 Restore condition prior extra insertion.
302 Restore condition prior extra insertion.
303 $ hg -q --config extensions.mq= strip .
303 $ hg -q --config extensions.mq= strip .
304 $ hg up -q 7
304 $ hg up -q 7
305 $ cd ..
305 $ cd ..
306
306
307 Test secret changeset are not pull
307 Test secret changeset are not pull
308
308
309 $ hg init pull-dest
309 $ hg init pull-dest
310 $ cd pull-dest
310 $ cd pull-dest
311 $ hg pull ../initialrepo
311 $ hg pull ../initialrepo
312 pulling from ../initialrepo
312 pulling from ../initialrepo
313 requesting all changes
313 requesting all changes
314 adding changesets
314 adding changesets
315 adding manifests
315 adding manifests
316 adding file changes
316 adding file changes
317 added 5 changesets with 5 changes to 5 files (+1 heads)
317 added 5 changesets with 5 changes to 5 files (+1 heads)
318 new changesets 4a2df7238c3b:cf9fe039dfd6
318 new changesets 4a2df7238c3b:cf9fe039dfd6
319 test-debug-phase: new rev 0: x -> 0
319 test-debug-phase: new rev 0: x -> 0
320 test-debug-phase: new rev 1: x -> 0
320 test-debug-phase: new rev 1: x -> 0
321 test-debug-phase: new rev 2: x -> 0
321 test-debug-phase: new rev 2: x -> 0
322 test-debug-phase: new rev 3: x -> 0
322 test-debug-phase: new rev 3: x -> 0
323 test-debug-phase: new rev 4: x -> 0
323 test-debug-phase: new rev 4: x -> 0
324 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public
324 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public
325 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public
325 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public
326 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public
326 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public
327 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public
327 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public
328 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public
328 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public
329 (run 'hg heads' to see heads, 'hg merge' to merge)
329 (run 'hg heads' to see heads, 'hg merge' to merge)
330 $ hglog
330 $ hglog
331 4 0 B'
331 4 0 B'
332 3 0 D
332 3 0 D
333 2 0 C
333 2 0 C
334 1 0 B
334 1 0 B
335 0 0 A
335 0 0 A
336 $ cd ..
336 $ cd ..
337
337
338 But secret can still be bundled explicitly
338 But secret can still be bundled explicitly
339
339
340 $ cd initialrepo
340 $ cd initialrepo
341 $ hg bundle --base '4^' -r 'children(4)' ../secret-bundle.hg
341 $ hg bundle --base '4^' -r 'children(4)' ../secret-bundle.hg
342 4 changesets found
342 4 changesets found
343 $ cd ..
343 $ cd ..
344
344
345 Test secret changeset are not cloned
345 Test secret changeset are not cloned
346 (during local clone)
346 (during local clone)
347
347
348 $ hg clone -qU initialrepo clone-dest
348 $ hg clone -qU initialrepo clone-dest
349 test-debug-phase: new rev 0: x -> 0
349 test-debug-phase: new rev 0: x -> 0
350 test-debug-phase: new rev 1: x -> 0
350 test-debug-phase: new rev 1: x -> 0
351 test-debug-phase: new rev 2: x -> 0
351 test-debug-phase: new rev 2: x -> 0
352 test-debug-phase: new rev 3: x -> 0
352 test-debug-phase: new rev 3: x -> 0
353 test-debug-phase: new rev 4: x -> 0
353 test-debug-phase: new rev 4: x -> 0
354 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public
354 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public
355 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public
355 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public
356 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public
356 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public
357 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public
357 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public
358 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public
358 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public
359 $ hglog -R clone-dest
359 $ hglog -R clone-dest
360 4 0 B'
360 4 0 B'
361 3 0 D
361 3 0 D
362 2 0 C
362 2 0 C
363 1 0 B
363 1 0 B
364 0 0 A
364 0 0 A
365
365
366 Test summary
366 Test summary
367
367
368 $ hg summary -R clone-dest --verbose
368 $ hg summary -R clone-dest --verbose
369 parent: -1:000000000000 (no revision checked out)
369 parent: -1:000000000000 (no revision checked out)
370 branch: default
370 branch: default
371 commit: (clean)
371 commit: (clean)
372 update: 5 new changesets (update)
372 update: 5 new changesets (update)
373 $ hg summary -R initialrepo
373 $ hg summary -R initialrepo
374 parent: 7:17a481b3bccb tip
374 parent: 7:17a481b3bccb tip
375 merge B' and E
375 merge B' and E
376 branch: default
376 branch: default
377 commit: (clean) (secret)
377 commit: (clean) (secret)
378 update: 1 new changesets, 2 branch heads (merge)
378 update: 1 new changesets, 2 branch heads (merge)
379 phases: 3 draft, 3 secret
379 phases: 3 draft, 3 secret
380 $ hg summary -R initialrepo --quiet
380 $ hg summary -R initialrepo --quiet
381 parent: 7:17a481b3bccb tip
381 parent: 7:17a481b3bccb tip
382 update: 1 new changesets, 2 branch heads (merge)
382 update: 1 new changesets, 2 branch heads (merge)
383
383
384 Test revset
384 Test revset
385
385
386 $ cd initialrepo
386 $ cd initialrepo
387 $ hglog -r 'public()'
387 $ hglog -r 'public()'
388 0 0 A
388 0 0 A
389 1 0 B
389 1 0 B
390 $ hglog -r 'draft()'
390 $ hglog -r 'draft()'
391 2 1 C
391 2 1 C
392 3 1 D
392 3 1 D
393 6 1 B'
393 6 1 B'
394 $ hglog -r 'secret()'
394 $ hglog -r 'secret()'
395 4 2 E
395 4 2 E
396 5 2 H
396 5 2 H
397 7 2 merge B' and E
397 7 2 merge B' and E
398
398
399 test that phase are displayed in log at debug level
399 test that phase are displayed in log at debug level
400
400
401 $ hg log --debug
401 $ hg log --debug
402 changeset: 7:17a481b3bccb796c0521ae97903d81c52bfee4af
402 changeset: 7:17a481b3bccb796c0521ae97903d81c52bfee4af
403 tag: tip
403 tag: tip
404 phase: secret
404 phase: secret
405 parent: 6:cf9fe039dfd67e829edf6522a45de057b5c86519
405 parent: 6:cf9fe039dfd67e829edf6522a45de057b5c86519
406 parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde
406 parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde
407 manifest: 7:5e724ffacba267b2ab726c91fc8b650710deaaa8
407 manifest: 7:5e724ffacba267b2ab726c91fc8b650710deaaa8
408 user: test
408 user: test
409 date: Thu Jan 01 00:00:00 1970 +0000
409 date: Thu Jan 01 00:00:00 1970 +0000
410 files+: C D E
410 files+: C D E
411 extra: branch=default
411 extra: branch=default
412 description:
412 description:
413 merge B' and E
413 merge B' and E
414
414
415
415
416 changeset: 6:cf9fe039dfd67e829edf6522a45de057b5c86519
416 changeset: 6:cf9fe039dfd67e829edf6522a45de057b5c86519
417 phase: draft
417 phase: draft
418 parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56
418 parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56
419 parent: -1:0000000000000000000000000000000000000000
419 parent: -1:0000000000000000000000000000000000000000
420 manifest: 6:ab8bfef2392903058bf4ebb9e7746e8d7026b27a
420 manifest: 6:ab8bfef2392903058bf4ebb9e7746e8d7026b27a
421 user: test
421 user: test
422 date: Thu Jan 01 00:00:00 1970 +0000
422 date: Thu Jan 01 00:00:00 1970 +0000
423 files+: B'
423 files+: B'
424 extra: branch=default
424 extra: branch=default
425 description:
425 description:
426 B'
426 B'
427
427
428
428
429 changeset: 5:a030c6be5127abc010fcbff1851536552e6951a8
429 changeset: 5:a030c6be5127abc010fcbff1851536552e6951a8
430 phase: secret
430 phase: secret
431 parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde
431 parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde
432 parent: -1:0000000000000000000000000000000000000000
432 parent: -1:0000000000000000000000000000000000000000
433 manifest: 5:5c710aa854874fe3d5fa7192e77bdb314cc08b5a
433 manifest: 5:5c710aa854874fe3d5fa7192e77bdb314cc08b5a
434 user: test
434 user: test
435 date: Thu Jan 01 00:00:00 1970 +0000
435 date: Thu Jan 01 00:00:00 1970 +0000
436 files+: H
436 files+: H
437 extra: branch=default
437 extra: branch=default
438 description:
438 description:
439 H
439 H
440
440
441
441
442 changeset: 4:a603bfb5a83e312131cebcd05353c217d4d21dde
442 changeset: 4:a603bfb5a83e312131cebcd05353c217d4d21dde
443 phase: secret
443 phase: secret
444 parent: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e
444 parent: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e
445 parent: -1:0000000000000000000000000000000000000000
445 parent: -1:0000000000000000000000000000000000000000
446 manifest: 4:7173fd1c27119750b959e3a0f47ed78abe75d6dc
446 manifest: 4:7173fd1c27119750b959e3a0f47ed78abe75d6dc
447 user: test
447 user: test
448 date: Thu Jan 01 00:00:00 1970 +0000
448 date: Thu Jan 01 00:00:00 1970 +0000
449 files+: E
449 files+: E
450 extra: branch=default
450 extra: branch=default
451 description:
451 description:
452 E
452 E
453
453
454
454
455 changeset: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e
455 changeset: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e
456 phase: draft
456 phase: draft
457 parent: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757
457 parent: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757
458 parent: -1:0000000000000000000000000000000000000000
458 parent: -1:0000000000000000000000000000000000000000
459 manifest: 3:6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c
459 manifest: 3:6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c
460 user: test
460 user: test
461 date: Thu Jan 01 00:00:00 1970 +0000
461 date: Thu Jan 01 00:00:00 1970 +0000
462 files+: D
462 files+: D
463 extra: branch=default
463 extra: branch=default
464 description:
464 description:
465 D
465 D
466
466
467
467
468 changeset: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757
468 changeset: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757
469 phase: draft
469 phase: draft
470 parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56
470 parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56
471 parent: -1:0000000000000000000000000000000000000000
471 parent: -1:0000000000000000000000000000000000000000
472 manifest: 2:66a5a01817fdf5239c273802b5b7618d051c89e4
472 manifest: 2:66a5a01817fdf5239c273802b5b7618d051c89e4
473 user: test
473 user: test
474 date: Thu Jan 01 00:00:00 1970 +0000
474 date: Thu Jan 01 00:00:00 1970 +0000
475 files+: C
475 files+: C
476 extra: branch=default
476 extra: branch=default
477 description:
477 description:
478 C
478 C
479
479
480
480
481 changeset: 1:27547f69f25460a52fff66ad004e58da7ad3fb56
481 changeset: 1:27547f69f25460a52fff66ad004e58da7ad3fb56
482 phase: public
482 phase: public
483 parent: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256
483 parent: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256
484 parent: -1:0000000000000000000000000000000000000000
484 parent: -1:0000000000000000000000000000000000000000
485 manifest: 1:cb5cbbc1bfbf24cc34b9e8c16914e9caa2d2a7fd
485 manifest: 1:cb5cbbc1bfbf24cc34b9e8c16914e9caa2d2a7fd
486 user: test
486 user: test
487 date: Thu Jan 01 00:00:00 1970 +0000
487 date: Thu Jan 01 00:00:00 1970 +0000
488 files+: B
488 files+: B
489 extra: branch=default
489 extra: branch=default
490 description:
490 description:
491 B
491 B
492
492
493
493
494 changeset: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256
494 changeset: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256
495 phase: public
495 phase: public
496 parent: -1:0000000000000000000000000000000000000000
496 parent: -1:0000000000000000000000000000000000000000
497 parent: -1:0000000000000000000000000000000000000000
497 parent: -1:0000000000000000000000000000000000000000
498 manifest: 0:007d8c9d88841325f5c6b06371b35b4e8a2b1a83
498 manifest: 0:007d8c9d88841325f5c6b06371b35b4e8a2b1a83
499 user: test
499 user: test
500 date: Thu Jan 01 00:00:00 1970 +0000
500 date: Thu Jan 01 00:00:00 1970 +0000
501 files+: A
501 files+: A
502 extra: branch=default
502 extra: branch=default
503 description:
503 description:
504 A
504 A
505
505
506
506
507
507
508
508
509 (Issue3707)
509 (Issue3707)
510 test invalid phase name
510 test invalid phase name
511
511
512 $ mkcommit I --config phases.new-commit='babar'
512 $ mkcommit I --config phases.new-commit='babar'
513 transaction abort!
513 transaction abort!
514 rollback completed
514 rollback completed
515 config error: phases.new-commit: not a valid phase name ('babar')
515 config error: phases.new-commit: not a valid phase name ('babar')
516 [30]
516 [30]
517 Test phase command
517 Test phase command
518 ===================
518 ===================
519
519
520 initial picture
520 initial picture
521
521
522 $ hg log -G --template "{rev} {phase} {desc}\n"
522 $ hg log -G --template "{rev} {phase} {desc}\n"
523 @ 7 secret merge B' and E
523 @ 7 secret merge B' and E
524 |\
524 |\
525 | o 6 draft B'
525 | o 6 draft B'
526 | |
526 | |
527 +---o 5 secret H
527 +---o 5 secret H
528 | |
528 | |
529 o | 4 secret E
529 o | 4 secret E
530 | |
530 | |
531 o | 3 draft D
531 o | 3 draft D
532 | |
532 | |
533 o | 2 draft C
533 o | 2 draft C
534 |/
534 |/
535 o 1 public B
535 o 1 public B
536 |
536 |
537 o 0 public A
537 o 0 public A
538
538
539
539
540 display changesets phase
540 display changesets phase
541
541
542 (mixing -r and plain rev specification)
542 (mixing -r and plain rev specification)
543
543
544 $ hg phase 1::4 -r 7
544 $ hg phase 1::4 -r 7
545 1: public
545 1: public
546 2: draft
546 2: draft
547 3: draft
547 3: draft
548 4: secret
548 4: secret
549 7: secret
549 7: secret
550
550
551
551
552 move changeset forward
552 move changeset forward
553
553
554 (with -r option)
554 (with -r option)
555
555
556 $ hg phase --public -r 2
556 $ hg phase --public -r 2
557 test-debug-phase: move rev 2: 1 -> 0
557 test-debug-phase: move rev 2: 1 -> 0
558 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: draft -> public
558 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: draft -> public
559 $ hg log -G --template "{rev} {phase} {desc}\n"
559 $ hg log -G --template "{rev} {phase} {desc}\n"
560 @ 7 secret merge B' and E
560 @ 7 secret merge B' and E
561 |\
561 |\
562 | o 6 draft B'
562 | o 6 draft B'
563 | |
563 | |
564 +---o 5 secret H
564 +---o 5 secret H
565 | |
565 | |
566 o | 4 secret E
566 o | 4 secret E
567 | |
567 | |
568 o | 3 draft D
568 o | 3 draft D
569 | |
569 | |
570 o | 2 public C
570 o | 2 public C
571 |/
571 |/
572 o 1 public B
572 o 1 public B
573 |
573 |
574 o 0 public A
574 o 0 public A
575
575
576
576
577 move changeset backward
577 move changeset backward
578
578
579 (without -r option)
579 (without -r option)
580
580
581 $ hg phase --draft --force 2
581 $ hg phase --draft --force 2
582 test-debug-phase: move rev 2: 0 -> 1
582 test-debug-phase: move rev 2: 0 -> 1
583 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: public -> draft
583 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: public -> draft
584 $ hg log -G --template "{rev} {phase} {desc}\n"
584 $ hg log -G --template "{rev} {phase} {desc}\n"
585 @ 7 secret merge B' and E
585 @ 7 secret merge B' and E
586 |\
586 |\
587 | o 6 draft B'
587 | o 6 draft B'
588 | |
588 | |
589 +---o 5 secret H
589 +---o 5 secret H
590 | |
590 | |
591 o | 4 secret E
591 o | 4 secret E
592 | |
592 | |
593 o | 3 draft D
593 o | 3 draft D
594 | |
594 | |
595 o | 2 draft C
595 o | 2 draft C
596 |/
596 |/
597 o 1 public B
597 o 1 public B
598 |
598 |
599 o 0 public A
599 o 0 public A
600
600
601
601
602 move changeset forward and backward
602 move changeset forward and backward
603
603
604 $ hg phase --draft --force 1::4
604 $ hg phase --draft --force 1::4
605 test-debug-phase: move rev 1: 0 -> 1
605 test-debug-phase: move rev 1: 0 -> 1
606 test-debug-phase: move rev 4: 2 -> 1
606 test-debug-phase: move rev 4: 2 -> 1
607 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: public -> draft
607 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: public -> draft
608 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: secret -> draft
608 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: secret -> draft
609 $ hg log -G --template "{rev} {phase} {desc}\n"
609 $ hg log -G --template "{rev} {phase} {desc}\n"
610 @ 7 secret merge B' and E
610 @ 7 secret merge B' and E
611 |\
611 |\
612 | o 6 draft B'
612 | o 6 draft B'
613 | |
613 | |
614 +---o 5 secret H
614 +---o 5 secret H
615 | |
615 | |
616 o | 4 draft E
616 o | 4 draft E
617 | |
617 | |
618 o | 3 draft D
618 o | 3 draft D
619 | |
619 | |
620 o | 2 draft C
620 o | 2 draft C
621 |/
621 |/
622 o 1 draft B
622 o 1 draft B
623 |
623 |
624 o 0 public A
624 o 0 public A
625
625
626 test partial failure
626 test partial failure
627
627
628 $ hg phase --public 7
628 $ hg phase --public 7
629 test-debug-phase: move rev 1: 1 -> 0
629 test-debug-phase: move rev 1: 1 -> 0
630 test-debug-phase: move rev 2: 1 -> 0
630 test-debug-phase: move rev 2: 1 -> 0
631 test-debug-phase: move rev 3: 1 -> 0
631 test-debug-phase: move rev 3: 1 -> 0
632 test-debug-phase: move rev 4: 1 -> 0
632 test-debug-phase: move rev 4: 1 -> 0
633 test-debug-phase: move rev 6: 1 -> 0
633 test-debug-phase: move rev 6: 1 -> 0
634 test-debug-phase: move rev 7: 2 -> 0
634 test-debug-phase: move rev 7: 2 -> 0
635 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> public
635 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: draft -> public
636 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: draft -> public
636 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: draft -> public
637 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: draft -> public
637 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: draft -> public
638 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: draft -> public
638 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: draft -> public
639 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: draft -> public
639 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: draft -> public
640 test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: secret -> public
640 test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: secret -> public
641 $ hg phase --draft '5 or 7'
641 $ hg phase --draft '5 or 7'
642 test-debug-phase: move rev 5: 2 -> 1
642 test-debug-phase: move rev 5: 2 -> 1
643 test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: secret -> draft
643 test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: secret -> draft
644 cannot move 1 changesets to a higher phase, use --force
644 cannot move 1 changesets to a higher phase, use --force
645 phase changed for 1 changesets
645 phase changed for 1 changesets
646 [1]
646 [1]
647 $ hg log -G --template "{rev} {phase} {desc}\n"
647 $ hg log -G --template "{rev} {phase} {desc}\n"
648 @ 7 public merge B' and E
648 @ 7 public merge B' and E
649 |\
649 |\
650 | o 6 public B'
650 | o 6 public B'
651 | |
651 | |
652 +---o 5 draft H
652 +---o 5 draft H
653 | |
653 | |
654 o | 4 public E
654 o | 4 public E
655 | |
655 | |
656 o | 3 public D
656 o | 3 public D
657 | |
657 | |
658 o | 2 public C
658 o | 2 public C
659 |/
659 |/
660 o 1 public B
660 o 1 public B
661 |
661 |
662 o 0 public A
662 o 0 public A
663
663
664
664
665 test complete failure
665 test complete failure
666
666
667 $ hg phase --draft 7
667 $ hg phase --draft 7
668 cannot move 1 changesets to a higher phase, use --force
668 cannot move 1 changesets to a higher phase, use --force
669 no phases changed
669 no phases changed
670 [1]
670 [1]
671
671
672 $ cd ..
672 $ cd ..
673
673
674 test hidden changeset are not cloned as public (issue3935)
674 test hidden changeset are not cloned as public (issue3935)
675
675
676 $ cd initialrepo
676 $ cd initialrepo
677
677
678 (enabling evolution)
678 (enabling evolution)
679 $ cat >> $HGRCPATH << EOF
679 $ cat >> $HGRCPATH << EOF
680 > [experimental]
680 > [experimental]
681 > evolution.createmarkers=True
681 > evolution.createmarkers=True
682 > EOF
682 > EOF
683
683
684 (making a changeset hidden; H in that case)
684 (making a changeset hidden; H in that case)
685 $ hg debugobsolete `hg id --debug -r 5`
685 $ hg debugobsolete `hg id --debug -r 5`
686 1 new obsolescence markers
686 1 new obsolescence markers
687 obsoleted 1 changesets
687 obsoleted 1 changesets
688
688
689 $ cd ..
689 $ cd ..
690 $ hg clone initialrepo clonewithobs
690 $ hg clone initialrepo clonewithobs
691 requesting all changes
691 requesting all changes
692 adding changesets
692 adding changesets
693 adding manifests
693 adding manifests
694 adding file changes
694 adding file changes
695 added 7 changesets with 6 changes to 6 files
695 added 7 changesets with 6 changes to 6 files
696 new changesets 4a2df7238c3b:17a481b3bccb
696 new changesets 4a2df7238c3b:17a481b3bccb
697 test-debug-phase: new rev 0: x -> 0
697 test-debug-phase: new rev 0: x -> 0
698 test-debug-phase: new rev 1: x -> 0
698 test-debug-phase: new rev 1: x -> 0
699 test-debug-phase: new rev 2: x -> 0
699 test-debug-phase: new rev 2: x -> 0
700 test-debug-phase: new rev 3: x -> 0
700 test-debug-phase: new rev 3: x -> 0
701 test-debug-phase: new rev 4: x -> 0
701 test-debug-phase: new rev 4: x -> 0
702 test-debug-phase: new rev 5: x -> 0
702 test-debug-phase: new rev 5: x -> 0
703 test-debug-phase: new rev 6: x -> 0
703 test-debug-phase: new rev 6: x -> 0
704 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public
704 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> public
705 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public
705 test-hook-close-phase: 27547f69f25460a52fff66ad004e58da7ad3fb56: -> public
706 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public
706 test-hook-close-phase: f838bfaca5c7226600ebcfd84f3c3c13a28d3757: -> public
707 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public
707 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: -> public
708 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: -> public
708 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: -> public
709 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public
709 test-hook-close-phase: cf9fe039dfd67e829edf6522a45de057b5c86519: -> public
710 test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: -> public
710 test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: -> public
711 updating to branch default
711 updating to branch default
712 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
712 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
713 $ cd clonewithobs
713 $ cd clonewithobs
714 $ hg log -G --template "{rev} {phase} {desc}\n"
714 $ hg log -G --template "{rev} {phase} {desc}\n"
715 @ 6 public merge B' and E
715 @ 6 public merge B' and E
716 |\
716 |\
717 | o 5 public B'
717 | o 5 public B'
718 | |
718 | |
719 o | 4 public E
719 o | 4 public E
720 | |
720 | |
721 o | 3 public D
721 o | 3 public D
722 | |
722 | |
723 o | 2 public C
723 o | 2 public C
724 |/
724 |/
725 o 1 public B
725 o 1 public B
726 |
726 |
727 o 0 public A
727 o 0 public A
728
728
729
729
730 test verify repo containing hidden changesets, which should not abort just
730 test verify repo containing hidden changesets, which should not abort just
731 because repo.cancopy() is False
731 because repo.cancopy() is False
732
732
733 $ cd ../initialrepo
733 $ cd ../initialrepo
734 $ hg verify
734 $ hg verify
735 checking changesets
735 checking changesets
736 checking manifests
736 checking manifests
737 crosschecking files in changesets and manifests
737 crosschecking files in changesets and manifests
738 checking files
738 checking files
739 checked 8 changesets with 7 changes to 7 files
739 checked 8 changesets with 7 changes to 7 files
740
740
741 $ cd ..
741 $ cd ..
742
742
743 check whether HG_PENDING makes pending changes only in related
743 check whether HG_PENDING makes pending changes only in related
744 repositories visible to an external hook.
744 repositories visible to an external hook.
745
745
746 (emulate a transaction running concurrently by copied
746 (emulate a transaction running concurrently by copied
747 .hg/phaseroots.pending in subsequent test)
747 .hg/phaseroots.pending in subsequent test)
748
748
749 $ cat > $TESTTMP/savepending.sh <<EOF
749 $ cat > $TESTTMP/savepending.sh <<EOF
750 > cp .hg/store/phaseroots.pending .hg/store/phaseroots.pending.saved
750 > cp .hg/store/phaseroots.pending .hg/store/phaseroots.pending.saved
751 > exit 1 # to avoid changing phase for subsequent tests
751 > exit 1 # to avoid changing phase for subsequent tests
752 > EOF
752 > EOF
753 $ cd push-dest
753 $ cd push-dest
754 $ hg phase 6
754 $ hg phase 6
755 6: draft
755 6: draft
756 $ hg --config hooks.pretxnclose="sh $TESTTMP/savepending.sh" phase -f -s 6
756 $ hg --config hooks.pretxnclose="sh $TESTTMP/savepending.sh" phase -f -s 6
757 transaction abort!
757 transaction abort!
758 rollback completed
758 rollback completed
759 abort: pretxnclose hook exited with status 1
759 abort: pretxnclose hook exited with status 1
760 [40]
760 [40]
761 $ cp .hg/store/phaseroots.pending.saved .hg/store/phaseroots.pending
761 $ cp .hg/store/phaseroots.pending.saved .hg/store/phaseroots.pending
762
762
763 (check (in)visibility of phaseroot while transaction running in repo)
763 (check (in)visibility of phaseroot while transaction running in repo)
764
764
765 $ cat > $TESTTMP/checkpending.sh <<EOF
765 $ cat > $TESTTMP/checkpending.sh <<EOF
766 > echo '@initialrepo'
766 > echo '@initialrepo'
767 > hg -R "$TESTTMP/initialrepo" phase 7
767 > hg -R "$TESTTMP/initialrepo" phase 7
768 > echo '@push-dest'
768 > echo '@push-dest'
769 > hg -R "$TESTTMP/push-dest" phase 6
769 > hg -R "$TESTTMP/push-dest" phase 6
770 > exit 1 # to avoid changing phase for subsequent tests
770 > exit 1 # to avoid changing phase for subsequent tests
771 > EOF
771 > EOF
772 $ cd ../initialrepo
772 $ cd ../initialrepo
773 $ hg phase 7
773 $ hg phase 7
774 7: public
774 7: public
775 $ hg --config hooks.pretxnclose="sh $TESTTMP/checkpending.sh" phase -f -s 7
775 $ hg --config hooks.pretxnclose="sh $TESTTMP/checkpending.sh" phase -f -s 7
776 @initialrepo
776 @initialrepo
777 7: secret
777 7: secret
778 @push-dest
778 @push-dest
779 6: draft
779 6: draft
780 transaction abort!
780 transaction abort!
781 rollback completed
781 rollback completed
782 abort: pretxnclose hook exited with status 1
782 abort: pretxnclose hook exited with status 1
783 [40]
783 [40]
784
784
785 Check that pretxnclose-phase hook can control phase movement
785 Check that pretxnclose-phase hook can control phase movement
786
786
787 $ hg phase --force b3325c91a4d9 --secret
787 $ hg phase --force b3325c91a4d9 --secret
788 test-debug-phase: move rev 3: 0 -> 2
788 test-debug-phase: move rev 3: 0 -> 2
789 test-debug-phase: move rev 4: 0 -> 2
789 test-debug-phase: move rev 4: 0 -> 2
790 test-debug-phase: move rev 5: 1 -> 2
790 test-debug-phase: move rev 5: 1 -> 2
791 test-debug-phase: move rev 7: 0 -> 2
791 test-debug-phase: move rev 7: 0 -> 2
792 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: public -> secret
792 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: public -> secret
793 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: public -> secret
793 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: public -> secret
794 test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: draft -> secret
794 test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: draft -> secret
795 test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: public -> secret
795 test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: public -> secret
796 $ hg log -G -T phases
796 $ hg log -G -T phases
797 @ changeset: 7:17a481b3bccb
797 @ changeset: 7:17a481b3bccb
798 |\ tag: tip
798 |\ tag: tip
799 | | phase: secret
799 | | phase: secret
800 | | parent: 6:cf9fe039dfd6
800 | | parent: 6:cf9fe039dfd6
801 | | parent: 4:a603bfb5a83e
801 | | parent: 4:a603bfb5a83e
802 | | user: test
802 | | user: test
803 | | date: Thu Jan 01 00:00:00 1970 +0000
803 | | date: Thu Jan 01 00:00:00 1970 +0000
804 | | summary: merge B' and E
804 | | summary: merge B' and E
805 | |
805 | |
806 | o changeset: 6:cf9fe039dfd6
806 | o changeset: 6:cf9fe039dfd6
807 | | phase: public
807 | | phase: public
808 | | parent: 1:27547f69f254
808 | | parent: 1:27547f69f254
809 | | user: test
809 | | user: test
810 | | date: Thu Jan 01 00:00:00 1970 +0000
810 | | date: Thu Jan 01 00:00:00 1970 +0000
811 | | summary: B'
811 | | summary: B'
812 | |
812 | |
813 o | changeset: 4:a603bfb5a83e
813 o | changeset: 4:a603bfb5a83e
814 | | phase: secret
814 | | phase: secret
815 | | user: test
815 | | user: test
816 | | date: Thu Jan 01 00:00:00 1970 +0000
816 | | date: Thu Jan 01 00:00:00 1970 +0000
817 | | summary: E
817 | | summary: E
818 | |
818 | |
819 o | changeset: 3:b3325c91a4d9
819 o | changeset: 3:b3325c91a4d9
820 | | phase: secret
820 | | phase: secret
821 | | user: test
821 | | user: test
822 | | date: Thu Jan 01 00:00:00 1970 +0000
822 | | date: Thu Jan 01 00:00:00 1970 +0000
823 | | summary: D
823 | | summary: D
824 | |
824 | |
825 o | changeset: 2:f838bfaca5c7
825 o | changeset: 2:f838bfaca5c7
826 |/ phase: public
826 |/ phase: public
827 | user: test
827 | user: test
828 | date: Thu Jan 01 00:00:00 1970 +0000
828 | date: Thu Jan 01 00:00:00 1970 +0000
829 | summary: C
829 | summary: C
830 |
830 |
831 o changeset: 1:27547f69f254
831 o changeset: 1:27547f69f254
832 | phase: public
832 | phase: public
833 | user: test
833 | user: test
834 | date: Thu Jan 01 00:00:00 1970 +0000
834 | date: Thu Jan 01 00:00:00 1970 +0000
835 | summary: B
835 | summary: B
836 |
836 |
837 o changeset: 0:4a2df7238c3b
837 o changeset: 0:4a2df7238c3b
838 phase: public
838 phase: public
839 user: test
839 user: test
840 date: Thu Jan 01 00:00:00 1970 +0000
840 date: Thu Jan 01 00:00:00 1970 +0000
841 summary: A
841 summary: A
842
842
843
843
844 Install a hook that prevent b3325c91a4d9 to become public
844 Install a hook that prevent b3325c91a4d9 to become public
845
845
846 $ cat >> .hg/hgrc << EOF
846 $ cat >> .hg/hgrc << EOF
847 > [hooks]
847 > [hooks]
848 > pretxnclose-phase.nopublish_D = sh -c "(echo \$HG_NODE| grep -v b3325c91a4d9>/dev/null) || [ 'public' != \$HG_PHASE ]"
848 > pretxnclose-phase.nopublish_D = sh -c "(echo \$HG_NODE| grep -v b3325c91a4d9>/dev/null) || [ 'public' != \$HG_PHASE ]"
849 > EOF
849 > EOF
850
850
851 Try various actions. only the draft move should succeed
851 Try various actions. only the draft move should succeed
852
852
853 $ hg phase --public b3325c91a4d9
853 $ hg phase --public b3325c91a4d9
854 transaction abort!
854 transaction abort!
855 rollback completed
855 rollback completed
856 abort: pretxnclose-phase.nopublish_D hook exited with status 1
856 abort: pretxnclose-phase.nopublish_D hook exited with status 1
857 [40]
857 [40]
858 $ hg phase --public a603bfb5a83e
858 $ hg phase --public a603bfb5a83e
859 transaction abort!
859 transaction abort!
860 rollback completed
860 rollback completed
861 abort: pretxnclose-phase.nopublish_D hook exited with status 1
861 abort: pretxnclose-phase.nopublish_D hook exited with status 1
862 [40]
862 [40]
863 $ hg phase --draft 17a481b3bccb
863 $ hg phase --draft 17a481b3bccb
864 test-debug-phase: move rev 3: 2 -> 1
864 test-debug-phase: move rev 3: 2 -> 1
865 test-debug-phase: move rev 4: 2 -> 1
865 test-debug-phase: move rev 4: 2 -> 1
866 test-debug-phase: move rev 7: 2 -> 1
866 test-debug-phase: move rev 7: 2 -> 1
867 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: secret -> draft
867 test-hook-close-phase: b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e: secret -> draft
868 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: secret -> draft
868 test-hook-close-phase: a603bfb5a83e312131cebcd05353c217d4d21dde: secret -> draft
869 test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: secret -> draft
869 test-hook-close-phase: 17a481b3bccb796c0521ae97903d81c52bfee4af: secret -> draft
870 $ hg phase --public 17a481b3bccb
870 $ hg phase --public 17a481b3bccb
871 transaction abort!
871 transaction abort!
872 rollback completed
872 rollback completed
873 abort: pretxnclose-phase.nopublish_D hook exited with status 1
873 abort: pretxnclose-phase.nopublish_D hook exited with status 1
874 [40]
874 [40]
875
875
876 $ cd ..
876 $ cd ..
877
877
878 Test for the "internal" phase
878 Test for the "internal" phase
879 =============================
879 =============================
880
880
881 Check we deny its usage on older repository
881 Check we deny its usage on older repository
882
882
883 $ hg init no-internal-phase --config format.internal-phase=no
883 $ hg init no-internal-phase --config format.internal-phase=no
884 $ cd no-internal-phase
884 $ cd no-internal-phase
885 $ cat .hg/requires
885 $ cat .hg/requires
886 dotencode
886 dotencode
887 exp-dirstate-v2 (dirstate-v2 !)
887 exp-dirstate-v2 (dirstate-v2 !)
888 fncache
888 fncache
889 generaldelta
889 generaldelta
890 persistent-nodemap (rust !)
890 persistent-nodemap (rust !)
891 revlog-compression-zstd (zstd !)
891 revlog-compression-zstd (zstd !)
892 revlogv1
892 revlogv1
893 sparserevlog
893 sparserevlog
894 store
894 store
895 $ echo X > X
895 $ echo X > X
896 $ hg add X
896 $ hg add X
897 $ hg status
897 $ hg status
898 A X
898 A X
899 $ hg --config "phases.new-commit=internal" commit -m "my test internal commit" 2>&1 | grep ProgrammingError
899 $ hg --config "phases.new-commit=internal" commit -m "my test internal commit" 2>&1 | grep ProgrammingError
900 ** ProgrammingError: this repository does not support the internal phase
900 ** ProgrammingError: this repository does not support the internal phase
901 raise error.ProgrammingError(msg)
901 raise error.ProgrammingError(msg) (no-pyoxidizer !)
902 *ProgrammingError: this repository does not support the internal phase (glob)
902 *ProgrammingError: this repository does not support the internal phase (glob)
903 $ hg --config "phases.new-commit=archived" commit -m "my test archived commit" 2>&1 | grep ProgrammingError
903 $ hg --config "phases.new-commit=archived" commit -m "my test archived commit" 2>&1 | grep ProgrammingError
904 ** ProgrammingError: this repository does not support the archived phase
904 ** ProgrammingError: this repository does not support the archived phase
905 raise error.ProgrammingError(msg)
905 raise error.ProgrammingError(msg) (no-pyoxidizer !)
906 *ProgrammingError: this repository does not support the archived phase (glob)
906 *ProgrammingError: this repository does not support the archived phase (glob)
907
907
908 $ cd ..
908 $ cd ..
909
909
910 Check it works fine with repository that supports it.
910 Check it works fine with repository that supports it.
911
911
912 $ hg init internal-phase --config format.internal-phase=yes
912 $ hg init internal-phase --config format.internal-phase=yes
913 $ cd internal-phase
913 $ cd internal-phase
914 $ cat .hg/requires
914 $ cat .hg/requires
915 dotencode
915 dotencode
916 exp-dirstate-v2 (dirstate-v2 !)
916 exp-dirstate-v2 (dirstate-v2 !)
917 fncache
917 fncache
918 generaldelta
918 generaldelta
919 internal-phase
919 internal-phase
920 persistent-nodemap (rust !)
920 persistent-nodemap (rust !)
921 revlog-compression-zstd (zstd !)
921 revlog-compression-zstd (zstd !)
922 revlogv1
922 revlogv1
923 sparserevlog
923 sparserevlog
924 store
924 store
925 $ mkcommit A
925 $ mkcommit A
926 test-debug-phase: new rev 0: x -> 1
926 test-debug-phase: new rev 0: x -> 1
927 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> draft
927 test-hook-close-phase: 4a2df7238c3b48766b5e22fafbb8a2f506ec8256: -> draft
928
928
929 Commit an internal changesets
929 Commit an internal changesets
930
930
931 $ echo B > B
931 $ echo B > B
932 $ hg add B
932 $ hg add B
933 $ hg status
933 $ hg status
934 A B
934 A B
935 $ hg --config "phases.new-commit=internal" commit -m "my test internal commit"
935 $ hg --config "phases.new-commit=internal" commit -m "my test internal commit"
936 test-debug-phase: new rev 1: x -> 96
936 test-debug-phase: new rev 1: x -> 96
937 test-hook-close-phase: c01c42dffc7f81223397e99652a0703f83e1c5ea: -> internal
937 test-hook-close-phase: c01c42dffc7f81223397e99652a0703f83e1c5ea: -> internal
938
938
939 The changeset is a working parent descendant.
939 The changeset is a working parent descendant.
940 Per the usual visibility rules, it is made visible.
940 Per the usual visibility rules, it is made visible.
941
941
942 $ hg log -G -l 3
942 $ hg log -G -l 3
943 @ changeset: 1:c01c42dffc7f
943 @ changeset: 1:c01c42dffc7f
944 | tag: tip
944 | tag: tip
945 | user: test
945 | user: test
946 | date: Thu Jan 01 00:00:00 1970 +0000
946 | date: Thu Jan 01 00:00:00 1970 +0000
947 | summary: my test internal commit
947 | summary: my test internal commit
948 |
948 |
949 o changeset: 0:4a2df7238c3b
949 o changeset: 0:4a2df7238c3b
950 user: test
950 user: test
951 date: Thu Jan 01 00:00:00 1970 +0000
951 date: Thu Jan 01 00:00:00 1970 +0000
952 summary: A
952 summary: A
953
953
954
954
955 Commit is hidden as expected
955 Commit is hidden as expected
956
956
957 $ hg up 0
957 $ hg up 0
958 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
958 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
959 $ hg log -G
959 $ hg log -G
960 @ changeset: 0:4a2df7238c3b
960 @ changeset: 0:4a2df7238c3b
961 tag: tip
961 tag: tip
962 user: test
962 user: test
963 date: Thu Jan 01 00:00:00 1970 +0000
963 date: Thu Jan 01 00:00:00 1970 +0000
964 summary: A
964 summary: A
965
965
966
966
967 Test for archived phase
967 Test for archived phase
968 -----------------------
968 -----------------------
969
969
970 Commit an archived changesets
970 Commit an archived changesets
971
971
972 $ echo B > B
972 $ echo B > B
973 $ hg add B
973 $ hg add B
974 $ hg status
974 $ hg status
975 A B
975 A B
976 $ hg --config "phases.new-commit=archived" commit -m "my test archived commit"
976 $ hg --config "phases.new-commit=archived" commit -m "my test archived commit"
977 test-debug-phase: new rev 2: x -> 32
977 test-debug-phase: new rev 2: x -> 32
978 test-hook-close-phase: 8df5997c3361518f733d1ae67cd3adb9b0eaf125: -> archived
978 test-hook-close-phase: 8df5997c3361518f733d1ae67cd3adb9b0eaf125: -> archived
979
979
980 The changeset is a working parent descendant.
980 The changeset is a working parent descendant.
981 Per the usual visibility rules, it is made visible.
981 Per the usual visibility rules, it is made visible.
982
982
983 $ hg log -G -l 3
983 $ hg log -G -l 3
984 @ changeset: 2:8df5997c3361
984 @ changeset: 2:8df5997c3361
985 | tag: tip
985 | tag: tip
986 | parent: 0:4a2df7238c3b
986 | parent: 0:4a2df7238c3b
987 | user: test
987 | user: test
988 | date: Thu Jan 01 00:00:00 1970 +0000
988 | date: Thu Jan 01 00:00:00 1970 +0000
989 | summary: my test archived commit
989 | summary: my test archived commit
990 |
990 |
991 o changeset: 0:4a2df7238c3b
991 o changeset: 0:4a2df7238c3b
992 user: test
992 user: test
993 date: Thu Jan 01 00:00:00 1970 +0000
993 date: Thu Jan 01 00:00:00 1970 +0000
994 summary: A
994 summary: A
995
995
996
996
997 Commit is hidden as expected
997 Commit is hidden as expected
998
998
999 $ hg up 0
999 $ hg up 0
1000 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1000 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1001 $ hg log -G
1001 $ hg log -G
1002 @ changeset: 0:4a2df7238c3b
1002 @ changeset: 0:4a2df7238c3b
1003 tag: tip
1003 tag: tip
1004 user: test
1004 user: test
1005 date: Thu Jan 01 00:00:00 1970 +0000
1005 date: Thu Jan 01 00:00:00 1970 +0000
1006 summary: A
1006 summary: A
1007
1007
1008 $ cd ..
1008 $ cd ..
1009
1009
1010 Recommitting an exact match of a public commit shouldn't change it to
1010 Recommitting an exact match of a public commit shouldn't change it to
1011 draft:
1011 draft:
1012
1012
1013 $ cd initialrepo
1013 $ cd initialrepo
1014 $ hg phase -r 2
1014 $ hg phase -r 2
1015 2: public
1015 2: public
1016 $ hg up -C 1
1016 $ hg up -C 1
1017 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
1017 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
1018 $ mkcommit C
1018 $ mkcommit C
1019 warning: commit already existed in the repository!
1019 warning: commit already existed in the repository!
1020 $ hg phase -r 2
1020 $ hg phase -r 2
1021 2: public
1021 2: public
1022
1022
1023 Same, but for secret:
1023 Same, but for secret:
1024
1024
1025 $ hg up 7
1025 $ hg up 7
1026 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1026 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1027 $ mkcommit F -s
1027 $ mkcommit F -s
1028 test-debug-phase: new rev 8: x -> 2
1028 test-debug-phase: new rev 8: x -> 2
1029 test-hook-close-phase: de414268ec5ce2330c590b942fbb5ff0b0ca1a0a: -> secret
1029 test-hook-close-phase: de414268ec5ce2330c590b942fbb5ff0b0ca1a0a: -> secret
1030 $ hg up 7
1030 $ hg up 7
1031 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1031 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1032 $ hg phase
1032 $ hg phase
1033 7: draft
1033 7: draft
1034 $ mkcommit F
1034 $ mkcommit F
1035 test-debug-phase: new rev 8: x -> 2
1035 test-debug-phase: new rev 8: x -> 2
1036 warning: commit already existed in the repository!
1036 warning: commit already existed in the repository!
1037 test-hook-close-phase: de414268ec5ce2330c590b942fbb5ff0b0ca1a0a: -> secret
1037 test-hook-close-phase: de414268ec5ce2330c590b942fbb5ff0b0ca1a0a: -> secret
1038 $ hg phase -r tip
1038 $ hg phase -r tip
1039 8: secret
1039 8: secret
1040
1040
1041 But what about obsoleted changesets?
1041 But what about obsoleted changesets?
1042
1042
1043 $ hg up 4
1043 $ hg up 4
1044 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1044 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1045 $ mkcommit H
1045 $ mkcommit H
1046 test-debug-phase: new rev 5: x -> 2
1046 test-debug-phase: new rev 5: x -> 2
1047 warning: commit already existed in the repository!
1047 warning: commit already existed in the repository!
1048 test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: -> secret
1048 test-hook-close-phase: a030c6be5127abc010fcbff1851536552e6951a8: -> secret
1049 $ hg phase -r 5
1049 $ hg phase -r 5
1050 5: secret
1050 5: secret
1051 $ hg par
1051 $ hg par
1052 changeset: 5:a030c6be5127
1052 changeset: 5:a030c6be5127
1053 user: test
1053 user: test
1054 date: Thu Jan 01 00:00:00 1970 +0000
1054 date: Thu Jan 01 00:00:00 1970 +0000
1055 obsolete: pruned
1055 obsolete: pruned
1056 summary: H
1056 summary: H
1057
1057
1058 $ hg up tip
1058 $ hg up tip
1059 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1059 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1060 $ cd ..
1060 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now