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