Show More
@@ -1,468 +1,477 b'' | |||||
1 | $ hglog() { hg log --template "{rev} {phaseidx} {desc}\n" $*; } |
|
1 | $ hglog() { hg log --template "{rev} {phaseidx} {desc}\n" $*; } | |
2 | $ mkcommit() { |
|
2 | $ mkcommit() { | |
3 | > echo "$1" > "$1" |
|
3 | > echo "$1" > "$1" | |
4 | > hg add "$1" |
|
4 | > hg add "$1" | |
5 | > message="$1" |
|
5 | > message="$1" | |
6 | > shift |
|
6 | > shift | |
7 | > hg ci -m "$message" $* |
|
7 | > hg ci -m "$message" $* | |
8 | > } |
|
8 | > } | |
9 |
|
9 | |||
10 | $ hg init initialrepo |
|
10 | $ hg init initialrepo | |
11 | $ cd initialrepo |
|
11 | $ cd initialrepo | |
|
12 | ||||
|
13 | Cannot change null revision phase | |||
|
14 | ||||
|
15 | $ hg phase --force --secret null | |||
|
16 | abort: unknown revision '-1'! | |||
|
17 | [255] | |||
|
18 | $ hg phase null | |||
|
19 | -1: public | |||
|
20 | ||||
12 | $ mkcommit A |
|
21 | $ mkcommit A | |
13 |
|
22 | |||
14 | New commit are draft by default |
|
23 | New commit are draft by default | |
15 |
|
24 | |||
16 | $ hglog |
|
25 | $ hglog | |
17 | 0 1 A |
|
26 | 0 1 A | |
18 |
|
27 | |||
19 | Following commit are draft too |
|
28 | Following commit are draft too | |
20 |
|
29 | |||
21 | $ mkcommit B |
|
30 | $ mkcommit B | |
22 |
|
31 | |||
23 | $ hglog |
|
32 | $ hglog | |
24 | 1 1 B |
|
33 | 1 1 B | |
25 | 0 1 A |
|
34 | 0 1 A | |
26 |
|
35 | |||
27 | Draft commit are properly created over public one: |
|
36 | Draft commit are properly created over public one: | |
28 |
|
37 | |||
29 | $ hg phase --public . |
|
38 | $ hg phase --public . | |
30 | $ hglog |
|
39 | $ hglog | |
31 | 1 0 B |
|
40 | 1 0 B | |
32 | 0 0 A |
|
41 | 0 0 A | |
33 |
|
42 | |||
34 | $ mkcommit C |
|
43 | $ mkcommit C | |
35 | $ mkcommit D |
|
44 | $ mkcommit D | |
36 |
|
45 | |||
37 | $ hglog |
|
46 | $ hglog | |
38 | 3 1 D |
|
47 | 3 1 D | |
39 | 2 1 C |
|
48 | 2 1 C | |
40 | 1 0 B |
|
49 | 1 0 B | |
41 | 0 0 A |
|
50 | 0 0 A | |
42 |
|
51 | |||
43 | Test creating changeset as secret |
|
52 | Test creating changeset as secret | |
44 |
|
53 | |||
45 | $ mkcommit E --config phases.new-commit='secret' |
|
54 | $ mkcommit E --config phases.new-commit='secret' | |
46 | $ hglog |
|
55 | $ hglog | |
47 | 4 2 E |
|
56 | 4 2 E | |
48 | 3 1 D |
|
57 | 3 1 D | |
49 | 2 1 C |
|
58 | 2 1 C | |
50 | 1 0 B |
|
59 | 1 0 B | |
51 | 0 0 A |
|
60 | 0 0 A | |
52 |
|
61 | |||
53 | Test the secret property is inherited |
|
62 | Test the secret property is inherited | |
54 |
|
63 | |||
55 | $ mkcommit H |
|
64 | $ mkcommit H | |
56 | $ hglog |
|
65 | $ hglog | |
57 | 5 2 H |
|
66 | 5 2 H | |
58 | 4 2 E |
|
67 | 4 2 E | |
59 | 3 1 D |
|
68 | 3 1 D | |
60 | 2 1 C |
|
69 | 2 1 C | |
61 | 1 0 B |
|
70 | 1 0 B | |
62 | 0 0 A |
|
71 | 0 0 A | |
63 |
|
72 | |||
64 | Even on merge |
|
73 | Even on merge | |
65 |
|
74 | |||
66 | $ hg up -q 1 |
|
75 | $ hg up -q 1 | |
67 | $ mkcommit "B'" |
|
76 | $ mkcommit "B'" | |
68 | created new head |
|
77 | created new head | |
69 | $ hglog |
|
78 | $ hglog | |
70 | 6 1 B' |
|
79 | 6 1 B' | |
71 | 5 2 H |
|
80 | 5 2 H | |
72 | 4 2 E |
|
81 | 4 2 E | |
73 | 3 1 D |
|
82 | 3 1 D | |
74 | 2 1 C |
|
83 | 2 1 C | |
75 | 1 0 B |
|
84 | 1 0 B | |
76 | 0 0 A |
|
85 | 0 0 A | |
77 | $ hg merge 4 # E |
|
86 | $ hg merge 4 # E | |
78 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
87 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
79 | (branch merge, don't forget to commit) |
|
88 | (branch merge, don't forget to commit) | |
80 | $ hg ci -m "merge B' and E" |
|
89 | $ hg ci -m "merge B' and E" | |
81 | $ hglog |
|
90 | $ hglog | |
82 | 7 2 merge B' and E |
|
91 | 7 2 merge B' and E | |
83 | 6 1 B' |
|
92 | 6 1 B' | |
84 | 5 2 H |
|
93 | 5 2 H | |
85 | 4 2 E |
|
94 | 4 2 E | |
86 | 3 1 D |
|
95 | 3 1 D | |
87 | 2 1 C |
|
96 | 2 1 C | |
88 | 1 0 B |
|
97 | 1 0 B | |
89 | 0 0 A |
|
98 | 0 0 A | |
90 |
|
99 | |||
91 | Test secret changeset are not pushed |
|
100 | Test secret changeset are not pushed | |
92 |
|
101 | |||
93 | $ hg init ../push-dest |
|
102 | $ hg init ../push-dest | |
94 | $ cat > ../push-dest/.hg/hgrc << EOF |
|
103 | $ cat > ../push-dest/.hg/hgrc << EOF | |
95 | > [phases] |
|
104 | > [phases] | |
96 | > publish=False |
|
105 | > publish=False | |
97 | > EOF |
|
106 | > EOF | |
98 | $ hg outgoing ../push-dest --template='{rev} {phase} {desc|firstline}\n' |
|
107 | $ hg outgoing ../push-dest --template='{rev} {phase} {desc|firstline}\n' | |
99 | comparing with ../push-dest |
|
108 | comparing with ../push-dest | |
100 | searching for changes |
|
109 | searching for changes | |
101 | 0 public A |
|
110 | 0 public A | |
102 | 1 public B |
|
111 | 1 public B | |
103 | 2 draft C |
|
112 | 2 draft C | |
104 | 3 draft D |
|
113 | 3 draft D | |
105 | 6 draft B' |
|
114 | 6 draft B' | |
106 | $ hg outgoing -r default ../push-dest --template='{rev} {phase} {desc|firstline}\n' |
|
115 | $ hg outgoing -r default ../push-dest --template='{rev} {phase} {desc|firstline}\n' | |
107 | comparing with ../push-dest |
|
116 | comparing with ../push-dest | |
108 | searching for changes |
|
117 | searching for changes | |
109 | 0 public A |
|
118 | 0 public A | |
110 | 1 public B |
|
119 | 1 public B | |
111 | 2 draft C |
|
120 | 2 draft C | |
112 | 3 draft D |
|
121 | 3 draft D | |
113 | 6 draft B' |
|
122 | 6 draft B' | |
114 |
|
123 | |||
115 | $ hg push ../push-dest -f # force because we push multiple heads |
|
124 | $ hg push ../push-dest -f # force because we push multiple heads | |
116 | pushing to ../push-dest |
|
125 | pushing to ../push-dest | |
117 | searching for changes |
|
126 | searching for changes | |
118 | adding changesets |
|
127 | adding changesets | |
119 | adding manifests |
|
128 | adding manifests | |
120 | adding file changes |
|
129 | adding file changes | |
121 | added 5 changesets with 5 changes to 5 files (+1 heads) |
|
130 | added 5 changesets with 5 changes to 5 files (+1 heads) | |
122 | $ hglog |
|
131 | $ hglog | |
123 | 7 2 merge B' and E |
|
132 | 7 2 merge B' and E | |
124 | 6 1 B' |
|
133 | 6 1 B' | |
125 | 5 2 H |
|
134 | 5 2 H | |
126 | 4 2 E |
|
135 | 4 2 E | |
127 | 3 1 D |
|
136 | 3 1 D | |
128 | 2 1 C |
|
137 | 2 1 C | |
129 | 1 0 B |
|
138 | 1 0 B | |
130 | 0 0 A |
|
139 | 0 0 A | |
131 | $ cd ../push-dest |
|
140 | $ cd ../push-dest | |
132 | $ hglog |
|
141 | $ hglog | |
133 | 4 1 B' |
|
142 | 4 1 B' | |
134 | 3 1 D |
|
143 | 3 1 D | |
135 | 2 1 C |
|
144 | 2 1 C | |
136 | 1 0 B |
|
145 | 1 0 B | |
137 | 0 0 A |
|
146 | 0 0 A | |
138 |
|
147 | |||
139 | (Issue3303) |
|
148 | (Issue3303) | |
140 | Check that remote secret changeset are ignore when checking creation of remote heads |
|
149 | Check that remote secret changeset are ignore when checking creation of remote heads | |
141 |
|
150 | |||
142 | We add a secret head into the push destination. This secreat head shadow a |
|
151 | We add a secret head into the push destination. This secreat head shadow a | |
143 | visible shared between the initial repo and the push destination. |
|
152 | visible shared between the initial repo and the push destination. | |
144 |
|
153 | |||
145 | $ hg up -q 4 # B' |
|
154 | $ hg up -q 4 # B' | |
146 | $ mkcommit Z --config phases.new-commit=secret |
|
155 | $ mkcommit Z --config phases.new-commit=secret | |
147 | $ hg phase . |
|
156 | $ hg phase . | |
148 | 5: secret |
|
157 | 5: secret | |
149 |
|
158 | |||
150 | # We now try to push a new public changeset that descend from the common public |
|
159 | # We now try to push a new public changeset that descend from the common public | |
151 | # head shadowed by the remote secret head. |
|
160 | # head shadowed by the remote secret head. | |
152 |
|
161 | |||
153 | $ cd ../initialrepo |
|
162 | $ cd ../initialrepo | |
154 | $ hg up -q 6 #B' |
|
163 | $ hg up -q 6 #B' | |
155 | $ mkcommit I |
|
164 | $ mkcommit I | |
156 | created new head |
|
165 | created new head | |
157 | $ hg push ../push-dest |
|
166 | $ hg push ../push-dest | |
158 | pushing to ../push-dest |
|
167 | pushing to ../push-dest | |
159 | searching for changes |
|
168 | searching for changes | |
160 | adding changesets |
|
169 | adding changesets | |
161 | adding manifests |
|
170 | adding manifests | |
162 | adding file changes |
|
171 | adding file changes | |
163 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
172 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
164 |
|
173 | |||
165 | :note: The "(+1 heads)" is wrong as we do not had any visible head |
|
174 | :note: The "(+1 heads)" is wrong as we do not had any visible head | |
166 |
|
175 | |||
167 |
|
176 | |||
168 | Restore condition prior extra insertion. |
|
177 | Restore condition prior extra insertion. | |
169 | $ hg -q --config extensions.mq= strip . |
|
178 | $ hg -q --config extensions.mq= strip . | |
170 | $ hg up -q 7 |
|
179 | $ hg up -q 7 | |
171 | $ cd .. |
|
180 | $ cd .. | |
172 |
|
181 | |||
173 | Test secret changeset are not pull |
|
182 | Test secret changeset are not pull | |
174 |
|
183 | |||
175 | $ hg init pull-dest |
|
184 | $ hg init pull-dest | |
176 | $ cd pull-dest |
|
185 | $ cd pull-dest | |
177 | $ hg pull ../initialrepo |
|
186 | $ hg pull ../initialrepo | |
178 | pulling from ../initialrepo |
|
187 | pulling from ../initialrepo | |
179 | requesting all changes |
|
188 | requesting all changes | |
180 | adding changesets |
|
189 | adding changesets | |
181 | adding manifests |
|
190 | adding manifests | |
182 | adding file changes |
|
191 | adding file changes | |
183 | added 5 changesets with 5 changes to 5 files (+1 heads) |
|
192 | added 5 changesets with 5 changes to 5 files (+1 heads) | |
184 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
193 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
185 | $ hglog |
|
194 | $ hglog | |
186 | 4 0 B' |
|
195 | 4 0 B' | |
187 | 3 0 D |
|
196 | 3 0 D | |
188 | 2 0 C |
|
197 | 2 0 C | |
189 | 1 0 B |
|
198 | 1 0 B | |
190 | 0 0 A |
|
199 | 0 0 A | |
191 | $ cd .. |
|
200 | $ cd .. | |
192 |
|
201 | |||
193 | But secret can still be bundled explicitly |
|
202 | But secret can still be bundled explicitly | |
194 |
|
203 | |||
195 | $ cd initialrepo |
|
204 | $ cd initialrepo | |
196 | $ hg bundle --base '4^' -r 'children(4)' ../secret-bundle.hg |
|
205 | $ hg bundle --base '4^' -r 'children(4)' ../secret-bundle.hg | |
197 | 4 changesets found |
|
206 | 4 changesets found | |
198 | $ cd .. |
|
207 | $ cd .. | |
199 |
|
208 | |||
200 | Test secret changeset are not cloned |
|
209 | Test secret changeset are not cloned | |
201 | (during local clone) |
|
210 | (during local clone) | |
202 |
|
211 | |||
203 | $ hg clone -qU initialrepo clone-dest |
|
212 | $ hg clone -qU initialrepo clone-dest | |
204 | $ hglog -R clone-dest |
|
213 | $ hglog -R clone-dest | |
205 | 4 0 B' |
|
214 | 4 0 B' | |
206 | 3 0 D |
|
215 | 3 0 D | |
207 | 2 0 C |
|
216 | 2 0 C | |
208 | 1 0 B |
|
217 | 1 0 B | |
209 | 0 0 A |
|
218 | 0 0 A | |
210 |
|
219 | |||
211 | Test revset |
|
220 | Test revset | |
212 |
|
221 | |||
213 | $ cd initialrepo |
|
222 | $ cd initialrepo | |
214 | $ hglog -r 'public()' |
|
223 | $ hglog -r 'public()' | |
215 | 0 0 A |
|
224 | 0 0 A | |
216 | 1 0 B |
|
225 | 1 0 B | |
217 | $ hglog -r 'draft()' |
|
226 | $ hglog -r 'draft()' | |
218 | 2 1 C |
|
227 | 2 1 C | |
219 | 3 1 D |
|
228 | 3 1 D | |
220 | 6 1 B' |
|
229 | 6 1 B' | |
221 | $ hglog -r 'secret()' |
|
230 | $ hglog -r 'secret()' | |
222 | 4 2 E |
|
231 | 4 2 E | |
223 | 5 2 H |
|
232 | 5 2 H | |
224 | 7 2 merge B' and E |
|
233 | 7 2 merge B' and E | |
225 |
|
234 | |||
226 | test that phase are displayed in log at debug level |
|
235 | test that phase are displayed in log at debug level | |
227 |
|
236 | |||
228 | $ hg log --debug |
|
237 | $ hg log --debug | |
229 | changeset: 7:17a481b3bccb796c0521ae97903d81c52bfee4af |
|
238 | changeset: 7:17a481b3bccb796c0521ae97903d81c52bfee4af | |
230 | tag: tip |
|
239 | tag: tip | |
231 | phase: secret |
|
240 | phase: secret | |
232 | parent: 6:cf9fe039dfd67e829edf6522a45de057b5c86519 |
|
241 | parent: 6:cf9fe039dfd67e829edf6522a45de057b5c86519 | |
233 | parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde |
|
242 | parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde | |
234 | manifest: 7:5e724ffacba267b2ab726c91fc8b650710deaaa8 |
|
243 | manifest: 7:5e724ffacba267b2ab726c91fc8b650710deaaa8 | |
235 | user: test |
|
244 | user: test | |
236 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
245 | date: Thu Jan 01 00:00:00 1970 +0000 | |
237 | files+: C D E |
|
246 | files+: C D E | |
238 | extra: branch=default |
|
247 | extra: branch=default | |
239 | description: |
|
248 | description: | |
240 | merge B' and E |
|
249 | merge B' and E | |
241 |
|
250 | |||
242 |
|
251 | |||
243 | changeset: 6:cf9fe039dfd67e829edf6522a45de057b5c86519 |
|
252 | changeset: 6:cf9fe039dfd67e829edf6522a45de057b5c86519 | |
244 | phase: draft |
|
253 | phase: draft | |
245 | parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 |
|
254 | parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 | |
246 | parent: -1:0000000000000000000000000000000000000000 |
|
255 | parent: -1:0000000000000000000000000000000000000000 | |
247 | manifest: 6:ab8bfef2392903058bf4ebb9e7746e8d7026b27a |
|
256 | manifest: 6:ab8bfef2392903058bf4ebb9e7746e8d7026b27a | |
248 | user: test |
|
257 | user: test | |
249 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
258 | date: Thu Jan 01 00:00:00 1970 +0000 | |
250 | files+: B' |
|
259 | files+: B' | |
251 | extra: branch=default |
|
260 | extra: branch=default | |
252 | description: |
|
261 | description: | |
253 | B' |
|
262 | B' | |
254 |
|
263 | |||
255 |
|
264 | |||
256 | changeset: 5:a030c6be5127abc010fcbff1851536552e6951a8 |
|
265 | changeset: 5:a030c6be5127abc010fcbff1851536552e6951a8 | |
257 | phase: secret |
|
266 | phase: secret | |
258 | parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde |
|
267 | parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde | |
259 | parent: -1:0000000000000000000000000000000000000000 |
|
268 | parent: -1:0000000000000000000000000000000000000000 | |
260 | manifest: 5:5c710aa854874fe3d5fa7192e77bdb314cc08b5a |
|
269 | manifest: 5:5c710aa854874fe3d5fa7192e77bdb314cc08b5a | |
261 | user: test |
|
270 | user: test | |
262 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
271 | date: Thu Jan 01 00:00:00 1970 +0000 | |
263 | files+: H |
|
272 | files+: H | |
264 | extra: branch=default |
|
273 | extra: branch=default | |
265 | description: |
|
274 | description: | |
266 | H |
|
275 | H | |
267 |
|
276 | |||
268 |
|
277 | |||
269 | changeset: 4:a603bfb5a83e312131cebcd05353c217d4d21dde |
|
278 | changeset: 4:a603bfb5a83e312131cebcd05353c217d4d21dde | |
270 | phase: secret |
|
279 | phase: secret | |
271 | parent: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e |
|
280 | parent: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e | |
272 | parent: -1:0000000000000000000000000000000000000000 |
|
281 | parent: -1:0000000000000000000000000000000000000000 | |
273 | manifest: 4:7173fd1c27119750b959e3a0f47ed78abe75d6dc |
|
282 | manifest: 4:7173fd1c27119750b959e3a0f47ed78abe75d6dc | |
274 | user: test |
|
283 | user: test | |
275 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
284 | date: Thu Jan 01 00:00:00 1970 +0000 | |
276 | files+: E |
|
285 | files+: E | |
277 | extra: branch=default |
|
286 | extra: branch=default | |
278 | description: |
|
287 | description: | |
279 | E |
|
288 | E | |
280 |
|
289 | |||
281 |
|
290 | |||
282 | changeset: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e |
|
291 | changeset: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e | |
283 | phase: draft |
|
292 | phase: draft | |
284 | parent: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757 |
|
293 | parent: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757 | |
285 | parent: -1:0000000000000000000000000000000000000000 |
|
294 | parent: -1:0000000000000000000000000000000000000000 | |
286 | manifest: 3:6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c |
|
295 | manifest: 3:6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c | |
287 | user: test |
|
296 | user: test | |
288 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
297 | date: Thu Jan 01 00:00:00 1970 +0000 | |
289 | files+: D |
|
298 | files+: D | |
290 | extra: branch=default |
|
299 | extra: branch=default | |
291 | description: |
|
300 | description: | |
292 | D |
|
301 | D | |
293 |
|
302 | |||
294 |
|
303 | |||
295 | changeset: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757 |
|
304 | changeset: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757 | |
296 | phase: draft |
|
305 | phase: draft | |
297 | parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 |
|
306 | parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 | |
298 | parent: -1:0000000000000000000000000000000000000000 |
|
307 | parent: -1:0000000000000000000000000000000000000000 | |
299 | manifest: 2:66a5a01817fdf5239c273802b5b7618d051c89e4 |
|
308 | manifest: 2:66a5a01817fdf5239c273802b5b7618d051c89e4 | |
300 | user: test |
|
309 | user: test | |
301 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
310 | date: Thu Jan 01 00:00:00 1970 +0000 | |
302 | files+: C |
|
311 | files+: C | |
303 | extra: branch=default |
|
312 | extra: branch=default | |
304 | description: |
|
313 | description: | |
305 | C |
|
314 | C | |
306 |
|
315 | |||
307 |
|
316 | |||
308 | changeset: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 |
|
317 | changeset: 1:27547f69f25460a52fff66ad004e58da7ad3fb56 | |
309 | parent: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256 |
|
318 | parent: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256 | |
310 | parent: -1:0000000000000000000000000000000000000000 |
|
319 | parent: -1:0000000000000000000000000000000000000000 | |
311 | manifest: 1:cb5cbbc1bfbf24cc34b9e8c16914e9caa2d2a7fd |
|
320 | manifest: 1:cb5cbbc1bfbf24cc34b9e8c16914e9caa2d2a7fd | |
312 | user: test |
|
321 | user: test | |
313 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
322 | date: Thu Jan 01 00:00:00 1970 +0000 | |
314 | files+: B |
|
323 | files+: B | |
315 | extra: branch=default |
|
324 | extra: branch=default | |
316 | description: |
|
325 | description: | |
317 | B |
|
326 | B | |
318 |
|
327 | |||
319 |
|
328 | |||
320 | changeset: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256 |
|
329 | changeset: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256 | |
321 | parent: -1:0000000000000000000000000000000000000000 |
|
330 | parent: -1:0000000000000000000000000000000000000000 | |
322 | parent: -1:0000000000000000000000000000000000000000 |
|
331 | parent: -1:0000000000000000000000000000000000000000 | |
323 | manifest: 0:007d8c9d88841325f5c6b06371b35b4e8a2b1a83 |
|
332 | manifest: 0:007d8c9d88841325f5c6b06371b35b4e8a2b1a83 | |
324 | user: test |
|
333 | user: test | |
325 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
334 | date: Thu Jan 01 00:00:00 1970 +0000 | |
326 | files+: A |
|
335 | files+: A | |
327 | extra: branch=default |
|
336 | extra: branch=default | |
328 | description: |
|
337 | description: | |
329 | A |
|
338 | A | |
330 |
|
339 | |||
331 |
|
340 | |||
332 |
|
341 | |||
333 | Test phase command |
|
342 | Test phase command | |
334 | =================== |
|
343 | =================== | |
335 |
|
344 | |||
336 | initial picture |
|
345 | initial picture | |
337 |
|
346 | |||
338 | $ cat >> $HGRCPATH << EOF |
|
347 | $ cat >> $HGRCPATH << EOF | |
339 | > [extensions] |
|
348 | > [extensions] | |
340 | > hgext.graphlog= |
|
349 | > hgext.graphlog= | |
341 | > EOF |
|
350 | > EOF | |
342 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
351 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
343 | @ 7 secret merge B' and E |
|
352 | @ 7 secret merge B' and E | |
344 | |\ |
|
353 | |\ | |
345 | | o 6 draft B' |
|
354 | | o 6 draft B' | |
346 | | | |
|
355 | | | | |
347 | +---o 5 secret H |
|
356 | +---o 5 secret H | |
348 | | | |
|
357 | | | | |
349 | o | 4 secret E |
|
358 | o | 4 secret E | |
350 | | | |
|
359 | | | | |
351 | o | 3 draft D |
|
360 | o | 3 draft D | |
352 | | | |
|
361 | | | | |
353 | o | 2 draft C |
|
362 | o | 2 draft C | |
354 | |/ |
|
363 | |/ | |
355 | o 1 public B |
|
364 | o 1 public B | |
356 | | |
|
365 | | | |
357 | o 0 public A |
|
366 | o 0 public A | |
358 |
|
367 | |||
359 |
|
368 | |||
360 | display changesets phase |
|
369 | display changesets phase | |
361 |
|
370 | |||
362 | (mixing -r and plain rev specification) |
|
371 | (mixing -r and plain rev specification) | |
363 |
|
372 | |||
364 | $ hg phase 1::4 -r 7 |
|
373 | $ hg phase 1::4 -r 7 | |
365 | 1: public |
|
374 | 1: public | |
366 | 2: draft |
|
375 | 2: draft | |
367 | 3: draft |
|
376 | 3: draft | |
368 | 4: secret |
|
377 | 4: secret | |
369 | 7: secret |
|
378 | 7: secret | |
370 |
|
379 | |||
371 |
|
380 | |||
372 | move changeset forward |
|
381 | move changeset forward | |
373 |
|
382 | |||
374 | (with -r option) |
|
383 | (with -r option) | |
375 |
|
384 | |||
376 | $ hg phase --public -r 2 |
|
385 | $ hg phase --public -r 2 | |
377 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
386 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
378 | @ 7 secret merge B' and E |
|
387 | @ 7 secret merge B' and E | |
379 | |\ |
|
388 | |\ | |
380 | | o 6 draft B' |
|
389 | | o 6 draft B' | |
381 | | | |
|
390 | | | | |
382 | +---o 5 secret H |
|
391 | +---o 5 secret H | |
383 | | | |
|
392 | | | | |
384 | o | 4 secret E |
|
393 | o | 4 secret E | |
385 | | | |
|
394 | | | | |
386 | o | 3 draft D |
|
395 | o | 3 draft D | |
387 | | | |
|
396 | | | | |
388 | o | 2 public C |
|
397 | o | 2 public C | |
389 | |/ |
|
398 | |/ | |
390 | o 1 public B |
|
399 | o 1 public B | |
391 | | |
|
400 | | | |
392 | o 0 public A |
|
401 | o 0 public A | |
393 |
|
402 | |||
394 |
|
403 | |||
395 | move changeset backward |
|
404 | move changeset backward | |
396 |
|
405 | |||
397 | (without -r option) |
|
406 | (without -r option) | |
398 |
|
407 | |||
399 | $ hg phase --draft --force 2 |
|
408 | $ hg phase --draft --force 2 | |
400 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
409 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
401 | @ 7 secret merge B' and E |
|
410 | @ 7 secret merge B' and E | |
402 | |\ |
|
411 | |\ | |
403 | | o 6 draft B' |
|
412 | | o 6 draft B' | |
404 | | | |
|
413 | | | | |
405 | +---o 5 secret H |
|
414 | +---o 5 secret H | |
406 | | | |
|
415 | | | | |
407 | o | 4 secret E |
|
416 | o | 4 secret E | |
408 | | | |
|
417 | | | | |
409 | o | 3 draft D |
|
418 | o | 3 draft D | |
410 | | | |
|
419 | | | | |
411 | o | 2 draft C |
|
420 | o | 2 draft C | |
412 | |/ |
|
421 | |/ | |
413 | o 1 public B |
|
422 | o 1 public B | |
414 | | |
|
423 | | | |
415 | o 0 public A |
|
424 | o 0 public A | |
416 |
|
425 | |||
417 |
|
426 | |||
418 | move changeset forward and backward |
|
427 | move changeset forward and backward | |
419 |
|
428 | |||
420 | $ hg phase --draft --force 1::4 |
|
429 | $ hg phase --draft --force 1::4 | |
421 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
430 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
422 | @ 7 secret merge B' and E |
|
431 | @ 7 secret merge B' and E | |
423 | |\ |
|
432 | |\ | |
424 | | o 6 draft B' |
|
433 | | o 6 draft B' | |
425 | | | |
|
434 | | | | |
426 | +---o 5 secret H |
|
435 | +---o 5 secret H | |
427 | | | |
|
436 | | | | |
428 | o | 4 draft E |
|
437 | o | 4 draft E | |
429 | | | |
|
438 | | | | |
430 | o | 3 draft D |
|
439 | o | 3 draft D | |
431 | | | |
|
440 | | | | |
432 | o | 2 draft C |
|
441 | o | 2 draft C | |
433 | |/ |
|
442 | |/ | |
434 | o 1 draft B |
|
443 | o 1 draft B | |
435 | | |
|
444 | | | |
436 | o 0 public A |
|
445 | o 0 public A | |
437 |
|
446 | |||
438 | test partial failure |
|
447 | test partial failure | |
439 |
|
448 | |||
440 | $ hg phase --public 7 |
|
449 | $ hg phase --public 7 | |
441 | $ hg phase --draft '5 or 7' |
|
450 | $ hg phase --draft '5 or 7' | |
442 | cannot move 1 changesets to a more permissive phase, use --force |
|
451 | cannot move 1 changesets to a more permissive phase, use --force | |
443 | phase changed for 1 changesets |
|
452 | phase changed for 1 changesets | |
444 | [1] |
|
453 | [1] | |
445 | $ hg log -G --template "{rev} {phase} {desc}\n" |
|
454 | $ hg log -G --template "{rev} {phase} {desc}\n" | |
446 | @ 7 public merge B' and E |
|
455 | @ 7 public merge B' and E | |
447 | |\ |
|
456 | |\ | |
448 | | o 6 public B' |
|
457 | | o 6 public B' | |
449 | | | |
|
458 | | | | |
450 | +---o 5 draft H |
|
459 | +---o 5 draft H | |
451 | | | |
|
460 | | | | |
452 | o | 4 public E |
|
461 | o | 4 public E | |
453 | | | |
|
462 | | | | |
454 | o | 3 public D |
|
463 | o | 3 public D | |
455 | | | |
|
464 | | | | |
456 | o | 2 public C |
|
465 | o | 2 public C | |
457 | |/ |
|
466 | |/ | |
458 | o 1 public B |
|
467 | o 1 public B | |
459 | | |
|
468 | | | |
460 | o 0 public A |
|
469 | o 0 public A | |
461 |
|
470 | |||
462 |
|
471 | |||
463 | test complete failure |
|
472 | test complete failure | |
464 |
|
473 | |||
465 | $ hg phase --draft 7 |
|
474 | $ hg phase --draft 7 | |
466 | cannot move 1 changesets to a more permissive phase, use --force |
|
475 | cannot move 1 changesets to a more permissive phase, use --force | |
467 | no phases changed |
|
476 | no phases changed | |
468 | [1] |
|
477 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now