Show More
@@ -1,1866 +1,1884 b'' | |||||
1 | #testcases stripbased phasebased |
|
1 | #testcases stripbased phasebased | |
2 |
|
2 | |||
3 | $ cat <<EOF >> $HGRCPATH |
|
3 | $ cat <<EOF >> $HGRCPATH | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > mq = |
|
5 | > mq = | |
6 | > shelve = |
|
6 | > shelve = | |
7 | > [defaults] |
|
7 | > [defaults] | |
8 | > diff = --nodates --git |
|
8 | > diff = --nodates --git | |
9 | > qnew = --date '0 0' |
|
9 | > qnew = --date '0 0' | |
10 | > [shelve] |
|
10 | > [shelve] | |
11 | > maxbackups = 2 |
|
11 | > maxbackups = 2 | |
12 | > EOF |
|
12 | > EOF | |
13 |
|
13 | |||
14 | #if phasebased |
|
14 | #if phasebased | |
15 |
|
15 | |||
16 | $ cat <<EOF >> $HGRCPATH |
|
16 | $ cat <<EOF >> $HGRCPATH | |
17 | > [format] |
|
17 | > [format] | |
18 | > internal-phase = yes |
|
18 | > internal-phase = yes | |
19 | > EOF |
|
19 | > EOF | |
20 |
|
20 | |||
21 | #endif |
|
21 | #endif | |
22 |
|
22 | |||
23 | $ hg init repo |
|
23 | $ hg init repo | |
24 | $ cd repo |
|
24 | $ cd repo | |
25 | $ mkdir a b |
|
25 | $ mkdir a b | |
26 | $ echo a > a/a |
|
26 | $ echo a > a/a | |
27 | $ echo b > b/b |
|
27 | $ echo b > b/b | |
28 | $ echo c > c |
|
28 | $ echo c > c | |
29 | $ echo d > d |
|
29 | $ echo d > d | |
30 | $ echo x > x |
|
30 | $ echo x > x | |
31 | $ hg addremove -q |
|
31 | $ hg addremove -q | |
32 |
|
32 | |||
33 | shelve has a help message |
|
33 | shelve has a help message | |
34 | $ hg shelve -h |
|
34 | $ hg shelve -h | |
35 | hg shelve [OPTION]... [FILE]... |
|
35 | hg shelve [OPTION]... [FILE]... | |
36 |
|
36 | |||
37 | save and set aside changes from the working directory |
|
37 | save and set aside changes from the working directory | |
38 |
|
38 | |||
39 | Shelving takes files that "hg status" reports as not clean, saves the |
|
39 | Shelving takes files that "hg status" reports as not clean, saves the | |
40 | modifications to a bundle (a shelved change), and reverts the files so |
|
40 | modifications to a bundle (a shelved change), and reverts the files so | |
41 | that their state in the working directory becomes clean. |
|
41 | that their state in the working directory becomes clean. | |
42 |
|
42 | |||
43 | To restore these changes to the working directory, using "hg unshelve"; |
|
43 | To restore these changes to the working directory, using "hg unshelve"; | |
44 | this will work even if you switch to a different commit. |
|
44 | this will work even if you switch to a different commit. | |
45 |
|
45 | |||
46 | When no files are specified, "hg shelve" saves all not-clean files. If |
|
46 | When no files are specified, "hg shelve" saves all not-clean files. If | |
47 | specific files or directories are named, only changes to those files are |
|
47 | specific files or directories are named, only changes to those files are | |
48 | shelved. |
|
48 | shelved. | |
49 |
|
49 | |||
50 | In bare shelve (when no files are specified, without interactive, include |
|
50 | In bare shelve (when no files are specified, without interactive, include | |
51 | and exclude option), shelving remembers information if the working |
|
51 | and exclude option), shelving remembers information if the working | |
52 | directory was on newly created branch, in other words working directory |
|
52 | directory was on newly created branch, in other words working directory | |
53 | was on different branch than its first parent. In this situation |
|
53 | was on different branch than its first parent. In this situation | |
54 | unshelving restores branch information to the working directory. |
|
54 | unshelving restores branch information to the working directory. | |
55 |
|
55 | |||
56 | Each shelved change has a name that makes it easier to find later. The |
|
56 | Each shelved change has a name that makes it easier to find later. The | |
57 | name of a shelved change defaults to being based on the active bookmark, |
|
57 | name of a shelved change defaults to being based on the active bookmark, | |
58 | or if there is no active bookmark, the current named branch. To specify a |
|
58 | or if there is no active bookmark, the current named branch. To specify a | |
59 | different name, use "--name". |
|
59 | different name, use "--name". | |
60 |
|
60 | |||
61 | To see a list of existing shelved changes, use the "--list" option. For |
|
61 | To see a list of existing shelved changes, use the "--list" option. For | |
62 | each shelved change, this will print its name, age, and description; use " |
|
62 | each shelved change, this will print its name, age, and description; use " | |
63 | --patch" or "--stat" for more details. |
|
63 | --patch" or "--stat" for more details. | |
64 |
|
64 | |||
65 | To delete specific shelved changes, use "--delete". To delete all shelved |
|
65 | To delete specific shelved changes, use "--delete". To delete all shelved | |
66 | changes, use "--cleanup". |
|
66 | changes, use "--cleanup". | |
67 |
|
67 | |||
68 | (use 'hg help -e shelve' to show help for the shelve extension) |
|
68 | (use 'hg help -e shelve' to show help for the shelve extension) | |
69 |
|
69 | |||
70 | options ([+] can be repeated): |
|
70 | options ([+] can be repeated): | |
71 |
|
71 | |||
72 | -A --addremove mark new/missing files as added/removed before |
|
72 | -A --addremove mark new/missing files as added/removed before | |
73 | shelving |
|
73 | shelving | |
74 | -u --unknown store unknown files in the shelve |
|
74 | -u --unknown store unknown files in the shelve | |
75 | --cleanup delete all shelved changes |
|
75 | --cleanup delete all shelved changes | |
76 | --date DATE shelve with the specified commit date |
|
76 | --date DATE shelve with the specified commit date | |
77 | -d --delete delete the named shelved change(s) |
|
77 | -d --delete delete the named shelved change(s) | |
78 | -e --edit invoke editor on commit messages |
|
78 | -e --edit invoke editor on commit messages | |
79 | -l --list list current shelves |
|
79 | -l --list list current shelves | |
80 | -m --message TEXT use text as shelve message |
|
80 | -m --message TEXT use text as shelve message | |
81 | -n --name NAME use the given name for the shelved commit |
|
81 | -n --name NAME use the given name for the shelved commit | |
82 | -p --patch output patches for changes (provide the names of the |
|
82 | -p --patch output patches for changes (provide the names of the | |
83 | shelved changes as positional arguments) |
|
83 | shelved changes as positional arguments) | |
84 | -i --interactive interactive mode, only works while creating a shelve |
|
84 | -i --interactive interactive mode, only works while creating a shelve | |
85 | --stat output diffstat-style summary of changes (provide |
|
85 | --stat output diffstat-style summary of changes (provide | |
86 | the names of the shelved changes as positional |
|
86 | the names of the shelved changes as positional | |
87 | arguments) |
|
87 | arguments) | |
88 | -I --include PATTERN [+] include names matching the given patterns |
|
88 | -I --include PATTERN [+] include names matching the given patterns | |
89 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
89 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
90 | --mq operate on patch repository |
|
90 | --mq operate on patch repository | |
91 |
|
91 | |||
92 | (some details hidden, use --verbose to show complete help) |
|
92 | (some details hidden, use --verbose to show complete help) | |
93 |
|
93 | |||
94 | shelving in an empty repo should be possible |
|
94 | shelving in an empty repo should be possible | |
95 | (this tests also that editor is not invoked, if '--edit' is not |
|
95 | (this tests also that editor is not invoked, if '--edit' is not | |
96 | specified) |
|
96 | specified) | |
97 |
|
97 | |||
98 | $ HGEDITOR=cat hg shelve |
|
98 | $ HGEDITOR=cat hg shelve | |
99 | shelved as default |
|
99 | shelved as default | |
100 | 0 files updated, 0 files merged, 5 files removed, 0 files unresolved |
|
100 | 0 files updated, 0 files merged, 5 files removed, 0 files unresolved | |
101 |
|
101 | |||
102 | $ hg unshelve |
|
102 | $ hg unshelve | |
103 | unshelving change 'default' |
|
103 | unshelving change 'default' | |
104 |
|
104 | |||
105 | $ hg commit -q -m 'initial commit' |
|
105 | $ hg commit -q -m 'initial commit' | |
106 |
|
106 | |||
107 | $ hg shelve |
|
107 | $ hg shelve | |
108 | nothing changed |
|
108 | nothing changed | |
109 | [1] |
|
109 | [1] | |
110 |
|
110 | |||
111 | make sure shelve files were backed up |
|
111 | make sure shelve files were backed up | |
112 |
|
112 | |||
113 | $ ls .hg/shelve-backup |
|
113 | $ ls .hg/shelve-backup | |
114 | default.hg |
|
114 | default.hg | |
115 | default.patch |
|
115 | default.patch | |
116 | default.shelve |
|
116 | default.shelve | |
117 |
|
117 | |||
118 | checks to make sure we dont create a directory or |
|
118 | checks to make sure we dont create a directory or | |
119 | hidden file while choosing a new shelve name |
|
119 | hidden file while choosing a new shelve name | |
120 |
|
120 | |||
121 | when we are given a name |
|
121 | when we are given a name | |
122 |
|
122 | |||
123 | $ hg shelve -n foo/bar |
|
123 | $ hg shelve -n foo/bar | |
124 | abort: shelved change names can not contain slashes |
|
124 | abort: shelved change names can not contain slashes | |
125 | [255] |
|
125 | [255] | |
126 | $ hg shelve -n .baz |
|
126 | $ hg shelve -n .baz | |
127 | abort: shelved change names can not start with '.' |
|
127 | abort: shelved change names can not start with '.' | |
128 | [255] |
|
128 | [255] | |
129 | $ hg shelve -n foo\\bar |
|
129 | $ hg shelve -n foo\\bar | |
130 | abort: shelved change names can not contain slashes |
|
130 | abort: shelved change names can not contain slashes | |
131 | [255] |
|
131 | [255] | |
132 |
|
132 | |||
133 | when shelve has to choose itself |
|
133 | when shelve has to choose itself | |
134 |
|
134 | |||
135 | $ hg branch x/y -q |
|
135 | $ hg branch x/y -q | |
136 | $ hg commit -q -m "Branch commit 0" |
|
136 | $ hg commit -q -m "Branch commit 0" | |
137 | $ hg shelve |
|
137 | $ hg shelve | |
138 | nothing changed |
|
138 | nothing changed | |
139 | [1] |
|
139 | [1] | |
140 | $ hg branch .x -q |
|
140 | $ hg branch .x -q | |
141 | $ hg commit -q -m "Branch commit 1" |
|
141 | $ hg commit -q -m "Branch commit 1" | |
142 | $ hg shelve |
|
142 | $ hg shelve | |
143 | nothing changed |
|
143 | nothing changed | |
144 | [1] |
|
144 | [1] | |
145 | $ hg branch x\\y -q |
|
145 | $ hg branch x\\y -q | |
146 | $ hg commit -q -m "Branch commit 2" |
|
146 | $ hg commit -q -m "Branch commit 2" | |
147 | $ hg shelve |
|
147 | $ hg shelve | |
148 | nothing changed |
|
148 | nothing changed | |
149 | [1] |
|
149 | [1] | |
150 |
|
150 | |||
151 | cleaning the branches made for name checking tests |
|
151 | cleaning the branches made for name checking tests | |
152 |
|
152 | |||
153 | $ hg up default -q |
|
153 | $ hg up default -q | |
154 | $ hg strip e9177275307e+6a6d231f43d+882bae7c62c2 -q |
|
154 | $ hg strip e9177275307e+6a6d231f43d+882bae7c62c2 -q | |
155 |
|
155 | |||
156 | create an mq patch - shelving should work fine with a patch applied |
|
156 | create an mq patch - shelving should work fine with a patch applied | |
157 |
|
157 | |||
158 | $ echo n > n |
|
158 | $ echo n > n | |
159 | $ hg add n |
|
159 | $ hg add n | |
160 | $ hg commit n -m second |
|
160 | $ hg commit n -m second | |
161 | $ hg qnew second.patch |
|
161 | $ hg qnew second.patch | |
162 |
|
162 | |||
163 | shelve a change that we will delete later |
|
163 | shelve a change that we will delete later | |
164 |
|
164 | |||
165 | $ echo a >> a/a |
|
165 | $ echo a >> a/a | |
166 | $ hg shelve |
|
166 | $ hg shelve | |
167 | shelved as default |
|
167 | shelved as default | |
168 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
168 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
169 |
|
169 | |||
170 | set up some more complex changes to shelve |
|
170 | set up some more complex changes to shelve | |
171 |
|
171 | |||
172 | $ echo a >> a/a |
|
172 | $ echo a >> a/a | |
173 | $ hg mv b b.rename |
|
173 | $ hg mv b b.rename | |
174 | moving b/b to b.rename/b |
|
174 | moving b/b to b.rename/b | |
175 | $ hg cp c c.copy |
|
175 | $ hg cp c c.copy | |
176 | $ hg status -C |
|
176 | $ hg status -C | |
177 | M a/a |
|
177 | M a/a | |
178 | A b.rename/b |
|
178 | A b.rename/b | |
179 | b/b |
|
179 | b/b | |
180 | A c.copy |
|
180 | A c.copy | |
181 | c |
|
181 | c | |
182 | R b/b |
|
182 | R b/b | |
183 |
|
183 | |||
184 | the common case - no options or filenames |
|
184 | the common case - no options or filenames | |
185 |
|
185 | |||
186 | $ hg shelve |
|
186 | $ hg shelve | |
187 | shelved as default-01 |
|
187 | shelved as default-01 | |
188 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
188 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
189 | $ hg status -C |
|
189 | $ hg status -C | |
190 |
|
190 | |||
191 | ensure that our shelved changes exist |
|
191 | ensure that our shelved changes exist | |
192 |
|
192 | |||
193 | $ hg shelve -l |
|
193 | $ hg shelve -l | |
194 | default-01 (*)* changes to: [mq]: second.patch (glob) |
|
194 | default-01 (*)* changes to: [mq]: second.patch (glob) | |
195 | default (*)* changes to: [mq]: second.patch (glob) |
|
195 | default (*)* changes to: [mq]: second.patch (glob) | |
196 |
|
196 | |||
197 | $ hg shelve -l -p default |
|
197 | $ hg shelve -l -p default | |
198 | default (*)* changes to: [mq]: second.patch (glob) |
|
198 | default (*)* changes to: [mq]: second.patch (glob) | |
199 |
|
199 | |||
200 | diff --git a/a/a b/a/a |
|
200 | diff --git a/a/a b/a/a | |
201 | --- a/a/a |
|
201 | --- a/a/a | |
202 | +++ b/a/a |
|
202 | +++ b/a/a | |
203 | @@ -1,1 +1,2 @@ |
|
203 | @@ -1,1 +1,2 @@ | |
204 | a |
|
204 | a | |
205 | +a |
|
205 | +a | |
206 |
|
206 | |||
207 | $ hg shelve --list --addremove |
|
207 | $ hg shelve --list --addremove | |
208 | abort: options '--list' and '--addremove' may not be used together |
|
208 | abort: options '--list' and '--addremove' may not be used together | |
209 | [255] |
|
209 | [255] | |
210 |
|
210 | |||
211 | delete our older shelved change |
|
211 | delete our older shelved change | |
212 |
|
212 | |||
213 | $ hg shelve -d default |
|
213 | $ hg shelve -d default | |
214 | $ hg qfinish -a -q |
|
214 | $ hg qfinish -a -q | |
215 |
|
215 | |||
216 | ensure shelve backups aren't overwritten |
|
216 | ensure shelve backups aren't overwritten | |
217 |
|
217 | |||
218 | $ ls .hg/shelve-backup/ |
|
218 | $ ls .hg/shelve-backup/ | |
219 | default-1.hg |
|
219 | default-1.hg | |
220 | default-1.patch |
|
220 | default-1.patch | |
221 | default-1.shelve |
|
221 | default-1.shelve | |
222 | default.hg |
|
222 | default.hg | |
223 | default.patch |
|
223 | default.patch | |
224 | default.shelve |
|
224 | default.shelve | |
225 |
|
225 | |||
226 | local edits should not prevent a shelved change from applying |
|
226 | local edits should not prevent a shelved change from applying | |
227 |
|
227 | |||
228 | $ printf "z\na\n" > a/a |
|
228 | $ printf "z\na\n" > a/a | |
229 | $ hg unshelve --keep |
|
229 | $ hg unshelve --keep | |
230 | unshelving change 'default-01' |
|
230 | unshelving change 'default-01' | |
231 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
231 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
232 | rebasing shelved changes |
|
232 | rebasing shelved changes | |
233 | merging a/a |
|
233 | merging a/a | |
234 |
|
234 | |||
235 | $ hg revert --all -q |
|
235 | $ hg revert --all -q | |
236 | $ rm a/a.orig b.rename/b c.copy |
|
236 | $ rm a/a.orig b.rename/b c.copy | |
237 |
|
237 | |||
238 | apply it and make sure our state is as expected |
|
238 | apply it and make sure our state is as expected | |
239 |
|
239 | |||
240 | (this also tests that same timestamp prevents backups from being |
|
240 | (this also tests that same timestamp prevents backups from being | |
241 | removed, even though there are more than 'maxbackups' backups) |
|
241 | removed, even though there are more than 'maxbackups' backups) | |
242 |
|
242 | |||
243 | $ f -t .hg/shelve-backup/default.patch |
|
243 | $ f -t .hg/shelve-backup/default.patch | |
244 | .hg/shelve-backup/default.patch: file |
|
244 | .hg/shelve-backup/default.patch: file | |
245 | $ touch -t 200001010000 .hg/shelve-backup/default.patch |
|
245 | $ touch -t 200001010000 .hg/shelve-backup/default.patch | |
246 | $ f -t .hg/shelve-backup/default-1.patch |
|
246 | $ f -t .hg/shelve-backup/default-1.patch | |
247 | .hg/shelve-backup/default-1.patch: file |
|
247 | .hg/shelve-backup/default-1.patch: file | |
248 | $ touch -t 200001010000 .hg/shelve-backup/default-1.patch |
|
248 | $ touch -t 200001010000 .hg/shelve-backup/default-1.patch | |
249 |
|
249 | |||
250 | $ hg unshelve |
|
250 | $ hg unshelve | |
251 | unshelving change 'default-01' |
|
251 | unshelving change 'default-01' | |
252 | $ hg status -C |
|
252 | $ hg status -C | |
253 | M a/a |
|
253 | M a/a | |
254 | A b.rename/b |
|
254 | A b.rename/b | |
255 | b/b |
|
255 | b/b | |
256 | A c.copy |
|
256 | A c.copy | |
257 | c |
|
257 | c | |
258 | R b/b |
|
258 | R b/b | |
259 | $ hg shelve -l |
|
259 | $ hg shelve -l | |
260 |
|
260 | |||
261 | (both of default.hg and default-1.hg should be still kept, because it |
|
261 | (both of default.hg and default-1.hg should be still kept, because it | |
262 | is difficult to decide actual order of them from same timestamp) |
|
262 | is difficult to decide actual order of them from same timestamp) | |
263 |
|
263 | |||
264 | $ ls .hg/shelve-backup/ |
|
264 | $ ls .hg/shelve-backup/ | |
265 | default-01.hg |
|
265 | default-01.hg | |
266 | default-01.patch |
|
266 | default-01.patch | |
267 | default-01.shelve |
|
267 | default-01.shelve | |
268 | default-1.hg |
|
268 | default-1.hg | |
269 | default-1.patch |
|
269 | default-1.patch | |
270 | default-1.shelve |
|
270 | default-1.shelve | |
271 | default.hg |
|
271 | default.hg | |
272 | default.patch |
|
272 | default.patch | |
273 | default.shelve |
|
273 | default.shelve | |
274 |
|
274 | |||
275 | $ hg unshelve |
|
275 | $ hg unshelve | |
276 | abort: no shelved changes to apply! |
|
276 | abort: no shelved changes to apply! | |
277 | [255] |
|
277 | [255] | |
278 | $ hg unshelve foo |
|
278 | $ hg unshelve foo | |
279 | abort: shelved change 'foo' not found |
|
279 | abort: shelved change 'foo' not found | |
280 | [255] |
|
280 | [255] | |
281 |
|
281 | |||
282 | named shelves, specific filenames, and "commit messages" should all work |
|
282 | named shelves, specific filenames, and "commit messages" should all work | |
283 | (this tests also that editor is invoked, if '--edit' is specified) |
|
283 | (this tests also that editor is invoked, if '--edit' is specified) | |
284 |
|
284 | |||
285 | $ hg status -C |
|
285 | $ hg status -C | |
286 | M a/a |
|
286 | M a/a | |
287 | A b.rename/b |
|
287 | A b.rename/b | |
288 | b/b |
|
288 | b/b | |
289 | A c.copy |
|
289 | A c.copy | |
290 | c |
|
290 | c | |
291 | R b/b |
|
291 | R b/b | |
292 | $ HGEDITOR=cat hg shelve -q -n wibble -m wat -e a |
|
292 | $ HGEDITOR=cat hg shelve -q -n wibble -m wat -e a | |
293 | wat |
|
293 | wat | |
294 |
|
294 | |||
295 |
|
295 | |||
296 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
296 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
297 | HG: Leave message empty to abort commit. |
|
297 | HG: Leave message empty to abort commit. | |
298 | HG: -- |
|
298 | HG: -- | |
299 | HG: user: shelve@localhost |
|
299 | HG: user: shelve@localhost | |
300 | HG: branch 'default' |
|
300 | HG: branch 'default' | |
301 | HG: changed a/a |
|
301 | HG: changed a/a | |
302 |
|
302 | |||
303 | expect "a" to no longer be present, but status otherwise unchanged |
|
303 | expect "a" to no longer be present, but status otherwise unchanged | |
304 |
|
304 | |||
305 | $ hg status -C |
|
305 | $ hg status -C | |
306 | A b.rename/b |
|
306 | A b.rename/b | |
307 | b/b |
|
307 | b/b | |
308 | A c.copy |
|
308 | A c.copy | |
309 | c |
|
309 | c | |
310 | R b/b |
|
310 | R b/b | |
311 | $ hg shelve -l --stat |
|
311 | $ hg shelve -l --stat | |
312 | wibble (*) wat (glob) |
|
312 | wibble (*) wat (glob) | |
313 | a/a | 1 + |
|
313 | a/a | 1 + | |
314 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
314 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
315 |
|
315 | |||
316 | and now "a/a" should reappear |
|
316 | and now "a/a" should reappear | |
317 |
|
317 | |||
318 | $ cd a |
|
318 | $ cd a | |
319 | $ hg unshelve -q wibble |
|
319 | $ hg unshelve -q wibble | |
320 | $ cd .. |
|
320 | $ cd .. | |
321 | $ hg status -C |
|
321 | $ hg status -C | |
322 | M a/a |
|
322 | M a/a | |
323 | A b.rename/b |
|
323 | A b.rename/b | |
324 | b/b |
|
324 | b/b | |
325 | A c.copy |
|
325 | A c.copy | |
326 | c |
|
326 | c | |
327 | R b/b |
|
327 | R b/b | |
328 |
|
328 | |||
329 | ensure old shelve backups are being deleted automatically |
|
329 | ensure old shelve backups are being deleted automatically | |
330 |
|
330 | |||
331 | $ ls .hg/shelve-backup/ |
|
331 | $ ls .hg/shelve-backup/ | |
332 | default-01.hg |
|
332 | default-01.hg | |
333 | default-01.patch |
|
333 | default-01.patch | |
334 | default-01.shelve |
|
334 | default-01.shelve | |
335 | wibble.hg |
|
335 | wibble.hg | |
336 | wibble.patch |
|
336 | wibble.patch | |
337 | wibble.shelve |
|
337 | wibble.shelve | |
338 |
|
338 | |||
339 | cause unshelving to result in a merge with 'a' conflicting |
|
339 | cause unshelving to result in a merge with 'a' conflicting | |
340 |
|
340 | |||
341 | $ hg shelve -q |
|
341 | $ hg shelve -q | |
342 | $ echo c>>a/a |
|
342 | $ echo c>>a/a | |
343 | $ hg commit -m second |
|
343 | $ hg commit -m second | |
344 | $ hg tip --template '{files}\n' |
|
344 | $ hg tip --template '{files}\n' | |
345 | a/a |
|
345 | a/a | |
346 |
|
346 | |||
347 | add an unrelated change that should be preserved |
|
347 | add an unrelated change that should be preserved | |
348 |
|
348 | |||
349 | $ mkdir foo |
|
349 | $ mkdir foo | |
350 | $ echo foo > foo/foo |
|
350 | $ echo foo > foo/foo | |
351 | $ hg add foo/foo |
|
351 | $ hg add foo/foo | |
352 |
|
352 | |||
353 | force a conflicted merge to occur |
|
353 | force a conflicted merge to occur | |
354 |
|
354 | |||
355 | $ hg unshelve |
|
355 | $ hg unshelve | |
356 | unshelving change 'default' |
|
356 | unshelving change 'default' | |
357 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
357 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
358 | rebasing shelved changes |
|
358 | rebasing shelved changes | |
359 | merging a/a |
|
359 | merging a/a | |
360 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') |
|
360 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') | |
361 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
361 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
362 | [1] |
|
362 | [1] | |
363 | $ hg status -v |
|
363 | $ hg status -v | |
364 | M a/a |
|
364 | M a/a | |
365 | M b.rename/b |
|
365 | M b.rename/b | |
366 | M c.copy |
|
366 | M c.copy | |
367 | R b/b |
|
367 | R b/b | |
368 | ? a/a.orig |
|
368 | ? a/a.orig | |
369 | # The repository is in an unfinished *unshelve* state. |
|
369 | # The repository is in an unfinished *unshelve* state. | |
370 |
|
370 | |||
371 | # Unresolved merge conflicts: |
|
371 | # Unresolved merge conflicts: | |
372 | # |
|
372 | # | |
373 | # a/a |
|
373 | # a/a | |
374 | # |
|
374 | # | |
375 | # To mark files as resolved: hg resolve --mark FILE |
|
375 | # To mark files as resolved: hg resolve --mark FILE | |
376 |
|
376 | |||
377 | # To continue: hg unshelve --continue |
|
377 | # To continue: hg unshelve --continue | |
378 | # To abort: hg unshelve --abort |
|
378 | # To abort: hg unshelve --abort | |
379 |
|
379 | |||
380 |
|
380 | |||
381 | ensure that we have a merge with unresolved conflicts |
|
381 | ensure that we have a merge with unresolved conflicts | |
382 |
|
382 | |||
383 | #if phasebased |
|
383 | #if phasebased | |
384 | $ hg heads -q --template '{rev}\n' |
|
384 | $ hg heads -q --template '{rev}\n' | |
385 | 8 |
|
385 | 8 | |
386 | 5 |
|
386 | 5 | |
387 | $ hg parents -q --template '{rev}\n' |
|
387 | $ hg parents -q --template '{rev}\n' | |
388 | 8 |
|
388 | 8 | |
389 | 5 |
|
389 | 5 | |
390 | #endif |
|
390 | #endif | |
391 |
|
391 | |||
392 | #if stripbased |
|
392 | #if stripbased | |
393 | $ hg heads -q --template '{rev}\n' |
|
393 | $ hg heads -q --template '{rev}\n' | |
394 | 5 |
|
394 | 5 | |
395 | 4 |
|
395 | 4 | |
396 | $ hg parents -q --template '{rev}\n' |
|
396 | $ hg parents -q --template '{rev}\n' | |
397 | 4 |
|
397 | 4 | |
398 | 5 |
|
398 | 5 | |
399 | #endif |
|
399 | #endif | |
400 |
|
400 | |||
401 | $ hg status |
|
401 | $ hg status | |
402 | M a/a |
|
402 | M a/a | |
403 | M b.rename/b |
|
403 | M b.rename/b | |
404 | M c.copy |
|
404 | M c.copy | |
405 | R b/b |
|
405 | R b/b | |
406 | ? a/a.orig |
|
406 | ? a/a.orig | |
407 | $ hg diff |
|
407 | $ hg diff | |
408 | diff --git a/a/a b/a/a |
|
408 | diff --git a/a/a b/a/a | |
409 | --- a/a/a |
|
409 | --- a/a/a | |
410 | +++ b/a/a |
|
410 | +++ b/a/a | |
411 | @@ -1,2 +1,6 @@ |
|
411 | @@ -1,2 +1,6 @@ | |
412 | a |
|
412 | a | |
413 | +<<<<<<< shelve: 2377350b6337 - shelve: pending changes temporary commit |
|
413 | +<<<<<<< shelve: 2377350b6337 - shelve: pending changes temporary commit | |
414 | c |
|
414 | c | |
415 | +======= |
|
415 | +======= | |
416 | +a |
|
416 | +a | |
417 | +>>>>>>> working-copy: a68ec3400638 - shelve: changes to: [mq]: second.patch |
|
417 | +>>>>>>> working-copy: a68ec3400638 - shelve: changes to: [mq]: second.patch | |
418 | diff --git a/b/b b/b.rename/b |
|
418 | diff --git a/b/b b/b.rename/b | |
419 | rename from b/b |
|
419 | rename from b/b | |
420 | rename to b.rename/b |
|
420 | rename to b.rename/b | |
421 | diff --git a/c b/c.copy |
|
421 | diff --git a/c b/c.copy | |
422 | copy from c |
|
422 | copy from c | |
423 | copy to c.copy |
|
423 | copy to c.copy | |
424 | $ hg resolve -l |
|
424 | $ hg resolve -l | |
425 | U a/a |
|
425 | U a/a | |
426 |
|
426 | |||
427 | $ hg shelve |
|
427 | $ hg shelve | |
428 | abort: unshelve already in progress |
|
428 | abort: unshelve already in progress | |
429 | (use 'hg unshelve --continue' or 'hg unshelve --abort') |
|
429 | (use 'hg unshelve --continue' or 'hg unshelve --abort') | |
430 | [255] |
|
430 | [255] | |
431 |
|
431 | |||
432 | abort the unshelve and be happy |
|
432 | abort the unshelve and be happy | |
433 |
|
433 | |||
434 | $ hg status |
|
434 | $ hg status | |
435 | M a/a |
|
435 | M a/a | |
436 | M b.rename/b |
|
436 | M b.rename/b | |
437 | M c.copy |
|
437 | M c.copy | |
438 | R b/b |
|
438 | R b/b | |
439 | ? a/a.orig |
|
439 | ? a/a.orig | |
440 | $ hg unshelve -a |
|
440 | $ hg unshelve -a | |
441 | unshelve of 'default' aborted |
|
441 | unshelve of 'default' aborted | |
442 | $ hg heads -q |
|
442 | $ hg heads -q | |
443 | [37]:2e69b451d1ea (re) |
|
443 | [37]:2e69b451d1ea (re) | |
444 | $ hg parents |
|
444 | $ hg parents | |
445 | changeset: [37]:2e69b451d1ea (re) |
|
445 | changeset: [37]:2e69b451d1ea (re) | |
446 | tag: tip |
|
446 | tag: tip | |
447 | parent: 3:509104101065 (?) |
|
447 | parent: 3:509104101065 (?) | |
448 | user: test |
|
448 | user: test | |
449 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
449 | date: Thu Jan 01 00:00:00 1970 +0000 | |
450 | summary: second |
|
450 | summary: second | |
451 |
|
451 | |||
452 | $ hg resolve -l |
|
452 | $ hg resolve -l | |
453 | $ hg status |
|
453 | $ hg status | |
454 | A foo/foo |
|
454 | A foo/foo | |
455 | ? a/a.orig |
|
455 | ? a/a.orig | |
456 |
|
456 | |||
457 | try to continue with no unshelve underway |
|
457 | try to continue with no unshelve underway | |
458 |
|
458 | |||
459 | $ hg unshelve -c |
|
459 | $ hg unshelve -c | |
460 | abort: no unshelve in progress |
|
460 | abort: no unshelve in progress | |
461 | [255] |
|
461 | [255] | |
462 | $ hg status |
|
462 | $ hg status | |
463 | A foo/foo |
|
463 | A foo/foo | |
464 | ? a/a.orig |
|
464 | ? a/a.orig | |
465 |
|
465 | |||
466 | redo the unshelve to get a conflict |
|
466 | redo the unshelve to get a conflict | |
467 |
|
467 | |||
468 | $ hg unshelve -q |
|
468 | $ hg unshelve -q | |
469 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') |
|
469 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') | |
470 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
470 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
471 | [1] |
|
471 | [1] | |
472 |
|
472 | |||
473 | attempt to continue |
|
473 | attempt to continue | |
474 |
|
474 | |||
475 | $ hg unshelve -c |
|
475 | $ hg unshelve -c | |
476 | abort: unresolved conflicts, can't continue |
|
476 | abort: unresolved conflicts, can't continue | |
477 | (see 'hg resolve', then 'hg unshelve --continue') |
|
477 | (see 'hg resolve', then 'hg unshelve --continue') | |
478 | [255] |
|
478 | [255] | |
479 |
|
479 | |||
480 | $ hg revert -r . a/a |
|
480 | $ hg revert -r . a/a | |
481 | $ hg resolve -m a/a |
|
481 | $ hg resolve -m a/a | |
482 | (no more unresolved files) |
|
482 | (no more unresolved files) | |
483 | continue: hg unshelve --continue |
|
483 | continue: hg unshelve --continue | |
484 |
|
484 | |||
485 | $ hg commit -m 'commit while unshelve in progress' |
|
485 | $ hg commit -m 'commit while unshelve in progress' | |
486 | abort: unshelve already in progress |
|
486 | abort: unshelve already in progress | |
487 | (use 'hg unshelve --continue' or 'hg unshelve --abort') |
|
487 | (use 'hg unshelve --continue' or 'hg unshelve --abort') | |
488 | [255] |
|
488 | [255] | |
489 |
|
489 | |||
490 | $ hg graft --continue |
|
490 | $ hg graft --continue | |
491 | abort: no graft in progress |
|
491 | abort: no graft in progress | |
492 | (continue: hg unshelve --continue) |
|
492 | (continue: hg unshelve --continue) | |
493 | [255] |
|
493 | [255] | |
494 | $ hg unshelve -c |
|
494 | $ hg unshelve -c | |
495 | unshelve of 'default' complete |
|
495 | unshelve of 'default' complete | |
496 |
|
496 | |||
497 | ensure the repo is as we hope |
|
497 | ensure the repo is as we hope | |
498 |
|
498 | |||
499 | $ hg parents |
|
499 | $ hg parents | |
500 | changeset: [37]:2e69b451d1ea (re) |
|
500 | changeset: [37]:2e69b451d1ea (re) | |
501 | tag: tip |
|
501 | tag: tip | |
502 | parent: 3:509104101065 (?) |
|
502 | parent: 3:509104101065 (?) | |
503 | user: test |
|
503 | user: test | |
504 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
504 | date: Thu Jan 01 00:00:00 1970 +0000 | |
505 | summary: second |
|
505 | summary: second | |
506 |
|
506 | |||
507 | $ hg heads -q |
|
507 | $ hg heads -q | |
508 | [37]:2e69b451d1ea (re) |
|
508 | [37]:2e69b451d1ea (re) | |
509 |
|
509 | |||
510 | $ hg status -C |
|
510 | $ hg status -C | |
511 | A b.rename/b |
|
511 | A b.rename/b | |
512 | b/b |
|
512 | b/b | |
513 | A c.copy |
|
513 | A c.copy | |
514 | c |
|
514 | c | |
515 | A foo/foo |
|
515 | A foo/foo | |
516 | R b/b |
|
516 | R b/b | |
517 | ? a/a.orig |
|
517 | ? a/a.orig | |
518 |
|
518 | |||
519 | there should be no shelves left |
|
519 | there should be no shelves left | |
520 |
|
520 | |||
521 | $ hg shelve -l |
|
521 | $ hg shelve -l | |
522 |
|
522 | |||
523 | #if execbit |
|
523 | #if execbit | |
524 |
|
524 | |||
525 | ensure that metadata-only changes are shelved |
|
525 | ensure that metadata-only changes are shelved | |
526 |
|
526 | |||
527 | $ chmod +x a/a |
|
527 | $ chmod +x a/a | |
528 | $ hg shelve -q -n execbit a/a |
|
528 | $ hg shelve -q -n execbit a/a | |
529 | $ hg status a/a |
|
529 | $ hg status a/a | |
530 | $ hg unshelve -q execbit |
|
530 | $ hg unshelve -q execbit | |
531 | $ hg status a/a |
|
531 | $ hg status a/a | |
532 | M a/a |
|
532 | M a/a | |
533 | $ hg revert a/a |
|
533 | $ hg revert a/a | |
534 |
|
534 | |||
|
535 | #else | |||
|
536 | ||||
|
537 | Dummy shelve op, to keep rev numbers aligned | |||
|
538 | ||||
|
539 | $ echo foo > a/a | |||
|
540 | $ hg shelve -q -n dummy a/a | |||
|
541 | $ hg unshelve -q dummy | |||
|
542 | $ hg revert a/a | |||
|
543 | ||||
535 | #endif |
|
544 | #endif | |
536 |
|
545 | |||
537 | #if symlink |
|
546 | #if symlink | |
538 |
|
547 | |||
539 | $ rm a/a |
|
548 | $ rm a/a | |
540 | $ ln -s foo a/a |
|
549 | $ ln -s foo a/a | |
541 | $ hg shelve -q -n symlink a/a |
|
550 | $ hg shelve -q -n symlink a/a | |
542 | $ hg status a/a |
|
551 | $ hg status a/a | |
543 | $ hg unshelve -q -n symlink |
|
552 | $ hg unshelve -q -n symlink | |
544 | $ hg status a/a |
|
553 | $ hg status a/a | |
545 | M a/a |
|
554 | M a/a | |
546 | $ hg revert a/a |
|
555 | $ hg revert a/a | |
547 |
|
556 | |||
|
557 | #else | |||
|
558 | ||||
|
559 | Dummy shelve op, to keep rev numbers aligned | |||
|
560 | ||||
|
561 | $ echo bar > a/a | |||
|
562 | $ hg shelve -q -n dummy a/a | |||
|
563 | $ hg unshelve -q dummy | |||
|
564 | $ hg revert a/a | |||
|
565 | ||||
548 | #endif |
|
566 | #endif | |
549 |
|
567 | |||
550 | set up another conflict between a commit and a shelved change |
|
568 | set up another conflict between a commit and a shelved change | |
551 |
|
569 | |||
552 | $ hg revert -q -C -a |
|
570 | $ hg revert -q -C -a | |
553 | $ rm a/a.orig b.rename/b c.copy |
|
571 | $ rm a/a.orig b.rename/b c.copy | |
554 | $ echo a >> a/a |
|
572 | $ echo a >> a/a | |
555 | $ hg shelve -q |
|
573 | $ hg shelve -q | |
556 | $ echo x >> a/a |
|
574 | $ echo x >> a/a | |
557 | $ hg ci -m 'create conflict' |
|
575 | $ hg ci -m 'create conflict' | |
558 | $ hg add foo/foo |
|
576 | $ hg add foo/foo | |
559 |
|
577 | |||
560 | if we resolve a conflict while unshelving, the unshelve should succeed |
|
578 | if we resolve a conflict while unshelving, the unshelve should succeed | |
561 |
|
579 | |||
562 | $ hg unshelve --tool :merge-other --keep |
|
580 | $ hg unshelve --tool :merge-other --keep | |
563 | unshelving change 'default' |
|
581 | unshelving change 'default' | |
564 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
582 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
565 | rebasing shelved changes |
|
583 | rebasing shelved changes | |
566 | merging a/a |
|
584 | merging a/a | |
567 | $ hg parents -q |
|
585 | $ hg parents -q | |
568 | (4|13):33f7f61e6c5e (re) |
|
586 | (4|13):33f7f61e6c5e (re) | |
569 | $ hg shelve -l |
|
587 | $ hg shelve -l | |
570 | default (*)* changes to: second (glob) |
|
588 | default (*)* changes to: second (glob) | |
571 | $ hg status |
|
589 | $ hg status | |
572 | M a/a |
|
590 | M a/a | |
573 | A foo/foo |
|
591 | A foo/foo | |
574 | $ cat a/a |
|
592 | $ cat a/a | |
575 | a |
|
593 | a | |
576 | c |
|
594 | c | |
577 | a |
|
595 | a | |
578 | $ cat > a/a << EOF |
|
596 | $ cat > a/a << EOF | |
579 | > a |
|
597 | > a | |
580 | > c |
|
598 | > c | |
581 | > x |
|
599 | > x | |
582 | > EOF |
|
600 | > EOF | |
583 |
|
601 | |||
584 | $ HGMERGE=true hg unshelve |
|
602 | $ HGMERGE=true hg unshelve | |
585 | unshelving change 'default' |
|
603 | unshelving change 'default' | |
586 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
604 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
587 | rebasing shelved changes |
|
605 | rebasing shelved changes | |
588 | merging a/a |
|
606 | merging a/a | |
589 | note: unshelved changes already existed in the working copy |
|
607 | note: unshelved changes already existed in the working copy | |
590 | $ hg parents -q |
|
608 | $ hg parents -q | |
591 | (4|13):33f7f61e6c5e (re) |
|
609 | (4|13):33f7f61e6c5e (re) | |
592 | $ hg shelve -l |
|
610 | $ hg shelve -l | |
593 | $ hg status |
|
611 | $ hg status | |
594 | A foo/foo |
|
612 | A foo/foo | |
595 | $ cat a/a |
|
613 | $ cat a/a | |
596 | a |
|
614 | a | |
597 | c |
|
615 | c | |
598 | x |
|
616 | x | |
599 |
|
617 | |||
600 | test keep and cleanup |
|
618 | test keep and cleanup | |
601 |
|
619 | |||
602 | $ hg shelve |
|
620 | $ hg shelve | |
603 | shelved as default |
|
621 | shelved as default | |
604 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
622 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
605 | $ hg shelve --list |
|
623 | $ hg shelve --list | |
606 | default (*)* changes to: create conflict (glob) |
|
624 | default (*)* changes to: create conflict (glob) | |
607 | $ hg unshelve -k |
|
625 | $ hg unshelve -k | |
608 | unshelving change 'default' |
|
626 | unshelving change 'default' | |
609 | $ hg shelve --list |
|
627 | $ hg shelve --list | |
610 | default (*)* changes to: create conflict (glob) |
|
628 | default (*)* changes to: create conflict (glob) | |
611 | $ hg shelve --cleanup |
|
629 | $ hg shelve --cleanup | |
612 | $ hg shelve --list |
|
630 | $ hg shelve --list | |
613 |
|
631 | |||
614 | $ hg shelve --cleanup --delete |
|
632 | $ hg shelve --cleanup --delete | |
615 | abort: options '--cleanup' and '--delete' may not be used together |
|
633 | abort: options '--cleanup' and '--delete' may not be used together | |
616 | [255] |
|
634 | [255] | |
617 | $ hg shelve --cleanup --patch |
|
635 | $ hg shelve --cleanup --patch | |
618 | abort: options '--cleanup' and '--patch' may not be used together |
|
636 | abort: options '--cleanup' and '--patch' may not be used together | |
619 | [255] |
|
637 | [255] | |
620 | $ hg shelve --cleanup --message MESSAGE |
|
638 | $ hg shelve --cleanup --message MESSAGE | |
621 | abort: options '--cleanup' and '--message' may not be used together |
|
639 | abort: options '--cleanup' and '--message' may not be used together | |
622 | [255] |
|
640 | [255] | |
623 |
|
641 | |||
624 | test bookmarks |
|
642 | test bookmarks | |
625 |
|
643 | |||
626 | $ hg bookmark test |
|
644 | $ hg bookmark test | |
627 | $ hg bookmark |
|
645 | $ hg bookmark | |
628 | \* test (4|13):33f7f61e6c5e (re) |
|
646 | \* test (4|13):33f7f61e6c5e (re) | |
629 | $ hg shelve |
|
647 | $ hg shelve | |
630 | shelved as test |
|
648 | shelved as test | |
631 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
649 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
632 | $ hg bookmark |
|
650 | $ hg bookmark | |
633 | \* test (4|13):33f7f61e6c5e (re) |
|
651 | \* test (4|13):33f7f61e6c5e (re) | |
634 | $ hg unshelve |
|
652 | $ hg unshelve | |
635 | unshelving change 'test' |
|
653 | unshelving change 'test' | |
636 | $ hg bookmark |
|
654 | $ hg bookmark | |
637 | \* test (4|13):33f7f61e6c5e (re) |
|
655 | \* test (4|13):33f7f61e6c5e (re) | |
638 |
|
656 | |||
639 | shelve should still work even if mq is disabled |
|
657 | shelve should still work even if mq is disabled | |
640 |
|
658 | |||
641 | $ hg --config extensions.mq=! shelve |
|
659 | $ hg --config extensions.mq=! shelve | |
642 | shelved as test |
|
660 | shelved as test | |
643 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
661 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
644 | $ hg --config extensions.mq=! shelve --list |
|
662 | $ hg --config extensions.mq=! shelve --list | |
645 | test (*)* changes to: create conflict (glob) |
|
663 | test (*)* changes to: create conflict (glob) | |
646 | $ hg bookmark |
|
664 | $ hg bookmark | |
647 | \* test (4|13):33f7f61e6c5e (re) |
|
665 | \* test (4|13):33f7f61e6c5e (re) | |
648 | $ hg --config extensions.mq=! unshelve |
|
666 | $ hg --config extensions.mq=! unshelve | |
649 | unshelving change 'test' |
|
667 | unshelving change 'test' | |
650 | $ hg bookmark |
|
668 | $ hg bookmark | |
651 | \* test (4|13):33f7f61e6c5e (re) |
|
669 | \* test (4|13):33f7f61e6c5e (re) | |
652 |
|
670 | |||
653 | shelve should leave dirstate clean (issue4055) |
|
671 | shelve should leave dirstate clean (issue4055) | |
654 |
|
672 | |||
655 | $ cd .. |
|
673 | $ cd .. | |
656 | $ hg init shelverebase |
|
674 | $ hg init shelverebase | |
657 | $ cd shelverebase |
|
675 | $ cd shelverebase | |
658 | $ printf 'x\ny\n' > x |
|
676 | $ printf 'x\ny\n' > x | |
659 | $ echo z > z |
|
677 | $ echo z > z | |
660 | $ hg commit -Aqm xy |
|
678 | $ hg commit -Aqm xy | |
661 | $ echo z >> x |
|
679 | $ echo z >> x | |
662 | $ hg commit -Aqm z |
|
680 | $ hg commit -Aqm z | |
663 | $ hg up 5c4c67fb7dce |
|
681 | $ hg up 5c4c67fb7dce | |
664 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
682 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
665 | $ printf 'a\nx\ny\nz\n' > x |
|
683 | $ printf 'a\nx\ny\nz\n' > x | |
666 | $ hg commit -Aqm xyz |
|
684 | $ hg commit -Aqm xyz | |
667 | $ echo c >> z |
|
685 | $ echo c >> z | |
668 | $ hg shelve |
|
686 | $ hg shelve | |
669 | shelved as default |
|
687 | shelved as default | |
670 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
688 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
671 |
|
689 | |||
672 | $ hg rebase -d 6c103be8f4e4 --config extensions.rebase= |
|
690 | $ hg rebase -d 6c103be8f4e4 --config extensions.rebase= | |
673 | rebasing 2:323bfa07f744 "xyz"( \(tip\))? (re) |
|
691 | rebasing 2:323bfa07f744 "xyz"( \(tip\))? (re) | |
674 | merging x |
|
692 | merging x | |
675 | saved backup bundle to \$TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-(78114325|7ae538ef)-rebase.hg (re) |
|
693 | saved backup bundle to \$TESTTMP/shelverebase/.hg/strip-backup/323bfa07f744-(78114325|7ae538ef)-rebase.hg (re) | |
676 | $ hg unshelve |
|
694 | $ hg unshelve | |
677 | unshelving change 'default' |
|
695 | unshelving change 'default' | |
678 | rebasing shelved changes |
|
696 | rebasing shelved changes | |
679 | $ hg status |
|
697 | $ hg status | |
680 | M z |
|
698 | M z | |
681 |
|
699 | |||
682 | $ cd .. |
|
700 | $ cd .. | |
683 |
|
701 | |||
684 | shelve should only unshelve pending changes (issue4068) |
|
702 | shelve should only unshelve pending changes (issue4068) | |
685 |
|
703 | |||
686 | $ hg init onlypendingchanges |
|
704 | $ hg init onlypendingchanges | |
687 | $ cd onlypendingchanges |
|
705 | $ cd onlypendingchanges | |
688 | $ touch a |
|
706 | $ touch a | |
689 | $ hg ci -Aqm a |
|
707 | $ hg ci -Aqm a | |
690 | $ touch b |
|
708 | $ touch b | |
691 | $ hg ci -Aqm b |
|
709 | $ hg ci -Aqm b | |
692 | $ hg up -q 3903775176ed |
|
710 | $ hg up -q 3903775176ed | |
693 | $ touch c |
|
711 | $ touch c | |
694 | $ hg ci -Aqm c |
|
712 | $ hg ci -Aqm c | |
695 |
|
713 | |||
696 | $ touch d |
|
714 | $ touch d | |
697 | $ hg add d |
|
715 | $ hg add d | |
698 | $ hg shelve |
|
716 | $ hg shelve | |
699 | shelved as default |
|
717 | shelved as default | |
700 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
718 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
701 | $ hg up -q 0e067c57feba |
|
719 | $ hg up -q 0e067c57feba | |
702 | $ hg unshelve |
|
720 | $ hg unshelve | |
703 | unshelving change 'default' |
|
721 | unshelving change 'default' | |
704 | rebasing shelved changes |
|
722 | rebasing shelved changes | |
705 | $ hg status |
|
723 | $ hg status | |
706 | A d |
|
724 | A d | |
707 |
|
725 | |||
708 | unshelve should work on an ancestor of the original commit |
|
726 | unshelve should work on an ancestor of the original commit | |
709 |
|
727 | |||
710 | $ hg shelve |
|
728 | $ hg shelve | |
711 | shelved as default |
|
729 | shelved as default | |
712 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
730 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
713 | $ hg up 3903775176ed |
|
731 | $ hg up 3903775176ed | |
714 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
732 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
715 | $ hg unshelve |
|
733 | $ hg unshelve | |
716 | unshelving change 'default' |
|
734 | unshelving change 'default' | |
717 | rebasing shelved changes |
|
735 | rebasing shelved changes | |
718 | $ hg status |
|
736 | $ hg status | |
719 | A d |
|
737 | A d | |
720 |
|
738 | |||
721 | test bug 4073 we need to enable obsolete markers for it |
|
739 | test bug 4073 we need to enable obsolete markers for it | |
722 |
|
740 | |||
723 | $ cat >> $HGRCPATH << EOF |
|
741 | $ cat >> $HGRCPATH << EOF | |
724 | > [experimental] |
|
742 | > [experimental] | |
725 | > evolution.createmarkers=True |
|
743 | > evolution.createmarkers=True | |
726 | > EOF |
|
744 | > EOF | |
727 | $ hg shelve |
|
745 | $ hg shelve | |
728 | shelved as default |
|
746 | shelved as default | |
729 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
747 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
730 | $ hg debugobsolete `hg log -r 0e067c57feba -T '{node}'` |
|
748 | $ hg debugobsolete `hg log -r 0e067c57feba -T '{node}'` | |
731 | obsoleted 1 changesets |
|
749 | obsoleted 1 changesets | |
732 | $ hg unshelve |
|
750 | $ hg unshelve | |
733 | unshelving change 'default' |
|
751 | unshelving change 'default' | |
734 |
|
752 | |||
735 | unshelve should leave unknown files alone (issue4113) |
|
753 | unshelve should leave unknown files alone (issue4113) | |
736 |
|
754 | |||
737 | $ echo e > e |
|
755 | $ echo e > e | |
738 | $ hg shelve |
|
756 | $ hg shelve | |
739 | shelved as default |
|
757 | shelved as default | |
740 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
758 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
741 | $ hg status |
|
759 | $ hg status | |
742 | ? e |
|
760 | ? e | |
743 | $ hg unshelve |
|
761 | $ hg unshelve | |
744 | unshelving change 'default' |
|
762 | unshelving change 'default' | |
745 | $ hg status |
|
763 | $ hg status | |
746 | A d |
|
764 | A d | |
747 | ? e |
|
765 | ? e | |
748 | $ cat e |
|
766 | $ cat e | |
749 | e |
|
767 | e | |
750 |
|
768 | |||
751 | unshelve should keep a copy of unknown files |
|
769 | unshelve should keep a copy of unknown files | |
752 |
|
770 | |||
753 | $ hg add e |
|
771 | $ hg add e | |
754 | $ hg shelve |
|
772 | $ hg shelve | |
755 | shelved as default |
|
773 | shelved as default | |
756 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
774 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
757 | $ echo z > e |
|
775 | $ echo z > e | |
758 | $ hg unshelve |
|
776 | $ hg unshelve | |
759 | unshelving change 'default' |
|
777 | unshelving change 'default' | |
760 | $ cat e |
|
778 | $ cat e | |
761 | e |
|
779 | e | |
762 | $ cat e.orig |
|
780 | $ cat e.orig | |
763 | z |
|
781 | z | |
764 |
|
782 | |||
765 |
|
783 | |||
766 | unshelve and conflicts with tracked and untracked files |
|
784 | unshelve and conflicts with tracked and untracked files | |
767 |
|
785 | |||
768 | preparing: |
|
786 | preparing: | |
769 |
|
787 | |||
770 | $ rm *.orig |
|
788 | $ rm *.orig | |
771 | $ hg ci -qm 'commit stuff' |
|
789 | $ hg ci -qm 'commit stuff' | |
772 | $ hg phase -p null: |
|
790 | $ hg phase -p null: | |
773 |
|
791 | |||
774 | no other changes - no merge: |
|
792 | no other changes - no merge: | |
775 |
|
793 | |||
776 | $ echo f > f |
|
794 | $ echo f > f | |
777 | $ hg add f |
|
795 | $ hg add f | |
778 | $ hg shelve |
|
796 | $ hg shelve | |
779 | shelved as default |
|
797 | shelved as default | |
780 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
798 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
781 | $ echo g > f |
|
799 | $ echo g > f | |
782 | $ hg unshelve |
|
800 | $ hg unshelve | |
783 | unshelving change 'default' |
|
801 | unshelving change 'default' | |
784 | $ hg st |
|
802 | $ hg st | |
785 | A f |
|
803 | A f | |
786 | ? f.orig |
|
804 | ? f.orig | |
787 | $ cat f |
|
805 | $ cat f | |
788 | f |
|
806 | f | |
789 | $ cat f.orig |
|
807 | $ cat f.orig | |
790 | g |
|
808 | g | |
791 |
|
809 | |||
792 | other uncommitted changes - merge: |
|
810 | other uncommitted changes - merge: | |
793 |
|
811 | |||
794 | $ hg st |
|
812 | $ hg st | |
795 | A f |
|
813 | A f | |
796 | ? f.orig |
|
814 | ? f.orig | |
797 | $ hg shelve |
|
815 | $ hg shelve | |
798 | shelved as default |
|
816 | shelved as default | |
799 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
817 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
800 | #if repobundlerepo |
|
818 | #if repobundlerepo | |
801 | $ hg log -G --template '{rev} {desc|firstline} {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()' --hidden |
|
819 | $ hg log -G --template '{rev} {desc|firstline} {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()' --hidden | |
802 | o [48] changes to: commit stuff shelve@localhost (re) |
|
820 | o [48] changes to: commit stuff shelve@localhost (re) | |
803 | | |
|
821 | | | |
804 | ~ |
|
822 | ~ | |
805 | #endif |
|
823 | #endif | |
806 | $ hg log -G --template '{rev} {desc|firstline} {author}' |
|
824 | $ hg log -G --template '{rev} {desc|firstline} {author}' | |
807 | @ [37] commit stuff test (re) |
|
825 | @ [37] commit stuff test (re) | |
808 | | |
|
826 | | | |
809 | | o 2 c test |
|
827 | | o 2 c test | |
810 | |/ |
|
828 | |/ | |
811 | o 0 a test |
|
829 | o 0 a test | |
812 |
|
830 | |||
813 | $ mv f.orig f |
|
831 | $ mv f.orig f | |
814 | $ echo 1 > a |
|
832 | $ echo 1 > a | |
815 | $ hg unshelve --date '1073741824 0' |
|
833 | $ hg unshelve --date '1073741824 0' | |
816 | unshelving change 'default' |
|
834 | unshelving change 'default' | |
817 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
835 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
818 | rebasing shelved changes |
|
836 | rebasing shelved changes | |
819 | merging f |
|
837 | merging f | |
820 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
838 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
821 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
839 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
822 | [1] |
|
840 | [1] | |
823 |
|
841 | |||
824 | #if phasebased |
|
842 | #if phasebased | |
825 | $ hg log -G --template '{rev} {desc|firstline} {author} {date|isodate}' |
|
843 | $ hg log -G --template '{rev} {desc|firstline} {author} {date|isodate}' | |
826 | @ 9 pending changes temporary commit shelve@localhost 2004-01-10 13:37 +0000 |
|
844 | @ 9 pending changes temporary commit shelve@localhost 2004-01-10 13:37 +0000 | |
827 | | |
|
845 | | | |
828 | | @ 8 changes to: commit stuff shelve@localhost 1970-01-01 00:00 +0000 |
|
846 | | @ 8 changes to: commit stuff shelve@localhost 1970-01-01 00:00 +0000 | |
829 | |/ |
|
847 | |/ | |
830 | o 7 commit stuff test 1970-01-01 00:00 +0000 |
|
848 | o 7 commit stuff test 1970-01-01 00:00 +0000 | |
831 | | |
|
849 | | | |
832 | | o 2 c test 1970-01-01 00:00 +0000 |
|
850 | | o 2 c test 1970-01-01 00:00 +0000 | |
833 | |/ |
|
851 | |/ | |
834 | o 0 a test 1970-01-01 00:00 +0000 |
|
852 | o 0 a test 1970-01-01 00:00 +0000 | |
835 |
|
853 | |||
836 | #endif |
|
854 | #endif | |
837 |
|
855 | |||
838 | #if stripbased |
|
856 | #if stripbased | |
839 | $ hg log -G --template '{rev} {desc|firstline} {author} {date|isodate}' |
|
857 | $ hg log -G --template '{rev} {desc|firstline} {author} {date|isodate}' | |
840 | @ 5 changes to: commit stuff shelve@localhost 1970-01-01 00:00 +0000 |
|
858 | @ 5 changes to: commit stuff shelve@localhost 1970-01-01 00:00 +0000 | |
841 | | |
|
859 | | | |
842 | | @ 4 pending changes temporary commit shelve@localhost 2004-01-10 13:37 +0000 |
|
860 | | @ 4 pending changes temporary commit shelve@localhost 2004-01-10 13:37 +0000 | |
843 | |/ |
|
861 | |/ | |
844 | o 3 commit stuff test 1970-01-01 00:00 +0000 |
|
862 | o 3 commit stuff test 1970-01-01 00:00 +0000 | |
845 | | |
|
863 | | | |
846 | | o 2 c test 1970-01-01 00:00 +0000 |
|
864 | | o 2 c test 1970-01-01 00:00 +0000 | |
847 | |/ |
|
865 | |/ | |
848 | o 0 a test 1970-01-01 00:00 +0000 |
|
866 | o 0 a test 1970-01-01 00:00 +0000 | |
849 |
|
867 | |||
850 | #endif |
|
868 | #endif | |
851 |
|
869 | |||
852 | $ hg st |
|
870 | $ hg st | |
853 | M f |
|
871 | M f | |
854 | ? f.orig |
|
872 | ? f.orig | |
855 | $ cat f |
|
873 | $ cat f | |
856 | <<<<<<< shelve: d44eae5c3d33 - shelve: pending changes temporary commit |
|
874 | <<<<<<< shelve: d44eae5c3d33 - shelve: pending changes temporary commit | |
857 | g |
|
875 | g | |
858 | ======= |
|
876 | ======= | |
859 | f |
|
877 | f | |
860 | >>>>>>> working-copy: aef214a5229c - shelve: changes to: commit stuff |
|
878 | >>>>>>> working-copy: aef214a5229c - shelve: changes to: commit stuff | |
861 | $ cat f.orig |
|
879 | $ cat f.orig | |
862 | g |
|
880 | g | |
863 | $ hg unshelve --abort -t false |
|
881 | $ hg unshelve --abort -t false | |
864 | tool option will be ignored |
|
882 | tool option will be ignored | |
865 | unshelve of 'default' aborted |
|
883 | unshelve of 'default' aborted | |
866 | $ hg st |
|
884 | $ hg st | |
867 | M a |
|
885 | M a | |
868 | ? f.orig |
|
886 | ? f.orig | |
869 | $ cat f.orig |
|
887 | $ cat f.orig | |
870 | g |
|
888 | g | |
871 | $ hg unshelve |
|
889 | $ hg unshelve | |
872 | unshelving change 'default' |
|
890 | unshelving change 'default' | |
873 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
891 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
874 | rebasing shelved changes |
|
892 | rebasing shelved changes | |
875 | $ hg st |
|
893 | $ hg st | |
876 | M a |
|
894 | M a | |
877 | A f |
|
895 | A f | |
878 | ? f.orig |
|
896 | ? f.orig | |
879 |
|
897 | |||
880 | other committed changes - merge: |
|
898 | other committed changes - merge: | |
881 |
|
899 | |||
882 | $ hg shelve f |
|
900 | $ hg shelve f | |
883 | shelved as default |
|
901 | shelved as default | |
884 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
902 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
885 | $ hg ci a -m 'intermediate other change' |
|
903 | $ hg ci a -m 'intermediate other change' | |
886 | $ mv f.orig f |
|
904 | $ mv f.orig f | |
887 | $ hg unshelve |
|
905 | $ hg unshelve | |
888 | unshelving change 'default' |
|
906 | unshelving change 'default' | |
889 | rebasing shelved changes |
|
907 | rebasing shelved changes | |
890 | merging f |
|
908 | merging f | |
891 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') |
|
909 | warning: conflicts while merging f! (edit, then use 'hg resolve --mark') | |
892 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
910 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
893 | [1] |
|
911 | [1] | |
894 | $ hg st |
|
912 | $ hg st | |
895 | M f |
|
913 | M f | |
896 | ? f.orig |
|
914 | ? f.orig | |
897 | $ cat f |
|
915 | $ cat f | |
898 | <<<<<<< shelve: 6b563750f973 - test: intermediate other change |
|
916 | <<<<<<< shelve: 6b563750f973 - test: intermediate other change | |
899 | g |
|
917 | g | |
900 | ======= |
|
918 | ======= | |
901 | f |
|
919 | f | |
902 | >>>>>>> working-copy: aef214a5229c - shelve: changes to: commit stuff |
|
920 | >>>>>>> working-copy: aef214a5229c - shelve: changes to: commit stuff | |
903 | $ cat f.orig |
|
921 | $ cat f.orig | |
904 | g |
|
922 | g | |
905 | $ hg unshelve --abort |
|
923 | $ hg unshelve --abort | |
906 | unshelve of 'default' aborted |
|
924 | unshelve of 'default' aborted | |
907 | $ hg st |
|
925 | $ hg st | |
908 | ? f.orig |
|
926 | ? f.orig | |
909 | $ cat f.orig |
|
927 | $ cat f.orig | |
910 | g |
|
928 | g | |
911 | $ hg shelve --delete default |
|
929 | $ hg shelve --delete default | |
912 |
|
930 | |||
913 | Recreate some conflict again |
|
931 | Recreate some conflict again | |
914 |
|
932 | |||
915 | $ cd ../repo |
|
933 | $ cd ../repo | |
916 | $ hg up -C -r 2e69b451d1ea |
|
934 | $ hg up -C -r 2e69b451d1ea | |
917 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
935 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
918 | (leaving bookmark test) |
|
936 | (leaving bookmark test) | |
919 | $ echo y >> a/a |
|
937 | $ echo y >> a/a | |
920 | $ hg shelve |
|
938 | $ hg shelve | |
921 | shelved as default |
|
939 | shelved as default | |
922 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
940 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
923 | $ hg up test |
|
941 | $ hg up test | |
924 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
942 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
925 | (activating bookmark test) |
|
943 | (activating bookmark test) | |
926 | $ hg bookmark |
|
944 | $ hg bookmark | |
927 | \* test (4|13):33f7f61e6c5e (re) |
|
945 | \* test (4|13):33f7f61e6c5e (re) | |
928 | $ hg unshelve |
|
946 | $ hg unshelve | |
929 | unshelving change 'default' |
|
947 | unshelving change 'default' | |
930 | rebasing shelved changes |
|
948 | rebasing shelved changes | |
931 | merging a/a |
|
949 | merging a/a | |
932 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') |
|
950 | warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark') | |
933 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
951 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
934 | [1] |
|
952 | [1] | |
935 | $ hg bookmark |
|
953 | $ hg bookmark | |
936 | test (4|13):33f7f61e6c5e (re) |
|
954 | test (4|13):33f7f61e6c5e (re) | |
937 |
|
955 | |||
938 | Test that resolving all conflicts in one direction (so that the rebase |
|
956 | Test that resolving all conflicts in one direction (so that the rebase | |
939 | is a no-op), works (issue4398) |
|
957 | is a no-op), works (issue4398) | |
940 |
|
958 | |||
941 | $ hg revert -a -r . |
|
959 | $ hg revert -a -r . | |
942 | reverting a/a |
|
960 | reverting a/a | |
943 | $ hg resolve -m a/a |
|
961 | $ hg resolve -m a/a | |
944 | (no more unresolved files) |
|
962 | (no more unresolved files) | |
945 | continue: hg unshelve --continue |
|
963 | continue: hg unshelve --continue | |
946 | $ hg unshelve -c |
|
964 | $ hg unshelve -c | |
947 | note: unshelved changes already existed in the working copy |
|
965 | note: unshelved changes already existed in the working copy | |
948 | unshelve of 'default' complete |
|
966 | unshelve of 'default' complete | |
949 | $ hg bookmark |
|
967 | $ hg bookmark | |
950 | \* test (4|13):33f7f61e6c5e (re) |
|
968 | \* test (4|13):33f7f61e6c5e (re) | |
951 | $ hg diff |
|
969 | $ hg diff | |
952 | $ hg status |
|
970 | $ hg status | |
953 | ? a/a.orig |
|
971 | ? a/a.orig | |
954 | ? foo/foo |
|
972 | ? foo/foo | |
955 | $ hg summary |
|
973 | $ hg summary | |
956 | parent: (4|13):33f7f61e6c5e tip (re) |
|
974 | parent: (4|13):33f7f61e6c5e tip (re) | |
957 | create conflict |
|
975 | create conflict | |
958 | branch: default |
|
976 | branch: default | |
959 | bookmarks: *test |
|
977 | bookmarks: *test | |
960 | commit: 2 unknown (clean) |
|
978 | commit: 2 unknown (clean) | |
961 | update: (current) |
|
979 | update: (current) | |
962 | phases: 5 draft |
|
980 | phases: 5 draft | |
963 |
|
981 | |||
964 | $ hg shelve --delete --stat |
|
982 | $ hg shelve --delete --stat | |
965 | abort: options '--delete' and '--stat' may not be used together |
|
983 | abort: options '--delete' and '--stat' may not be used together | |
966 | [255] |
|
984 | [255] | |
967 | $ hg shelve --delete --name NAME |
|
985 | $ hg shelve --delete --name NAME | |
968 | abort: options '--delete' and '--name' may not be used together |
|
986 | abort: options '--delete' and '--name' may not be used together | |
969 | [255] |
|
987 | [255] | |
970 |
|
988 | |||
971 | Test interactive shelve |
|
989 | Test interactive shelve | |
972 | $ cat <<EOF >> $HGRCPATH |
|
990 | $ cat <<EOF >> $HGRCPATH | |
973 | > [ui] |
|
991 | > [ui] | |
974 | > interactive = true |
|
992 | > interactive = true | |
975 | > EOF |
|
993 | > EOF | |
976 | $ echo 'a' >> a/b |
|
994 | $ echo 'a' >> a/b | |
977 | $ cat a/a >> a/b |
|
995 | $ cat a/a >> a/b | |
978 | $ echo 'x' >> a/b |
|
996 | $ echo 'x' >> a/b | |
979 | $ mv a/b a/a |
|
997 | $ mv a/b a/a | |
980 | $ echo 'a' >> foo/foo |
|
998 | $ echo 'a' >> foo/foo | |
981 | $ hg st |
|
999 | $ hg st | |
982 | M a/a |
|
1000 | M a/a | |
983 | ? a/a.orig |
|
1001 | ? a/a.orig | |
984 | ? foo/foo |
|
1002 | ? foo/foo | |
985 | $ cat a/a |
|
1003 | $ cat a/a | |
986 | a |
|
1004 | a | |
987 | a |
|
1005 | a | |
988 | c |
|
1006 | c | |
989 | x |
|
1007 | x | |
990 | x |
|
1008 | x | |
991 | $ cat foo/foo |
|
1009 | $ cat foo/foo | |
992 | foo |
|
1010 | foo | |
993 | a |
|
1011 | a | |
994 | $ hg shelve --interactive --config ui.interactive=false |
|
1012 | $ hg shelve --interactive --config ui.interactive=false | |
995 | abort: running non-interactively |
|
1013 | abort: running non-interactively | |
996 | [255] |
|
1014 | [255] | |
997 | $ hg shelve --interactive << EOF |
|
1015 | $ hg shelve --interactive << EOF | |
998 | > y |
|
1016 | > y | |
999 | > y |
|
1017 | > y | |
1000 | > n |
|
1018 | > n | |
1001 | > EOF |
|
1019 | > EOF | |
1002 | diff --git a/a/a b/a/a |
|
1020 | diff --git a/a/a b/a/a | |
1003 | 2 hunks, 2 lines changed |
|
1021 | 2 hunks, 2 lines changed | |
1004 | examine changes to 'a/a'? [Ynesfdaq?] y |
|
1022 | examine changes to 'a/a'? [Ynesfdaq?] y | |
1005 |
|
1023 | |||
1006 | @@ -1,3 +1,4 @@ |
|
1024 | @@ -1,3 +1,4 @@ | |
1007 | +a |
|
1025 | +a | |
1008 | a |
|
1026 | a | |
1009 | c |
|
1027 | c | |
1010 | x |
|
1028 | x | |
1011 | record change 1/2 to 'a/a'? [Ynesfdaq?] y |
|
1029 | record change 1/2 to 'a/a'? [Ynesfdaq?] y | |
1012 |
|
1030 | |||
1013 | @@ -1,3 +2,4 @@ |
|
1031 | @@ -1,3 +2,4 @@ | |
1014 | a |
|
1032 | a | |
1015 | c |
|
1033 | c | |
1016 | x |
|
1034 | x | |
1017 | +x |
|
1035 | +x | |
1018 | record change 2/2 to 'a/a'? [Ynesfdaq?] n |
|
1036 | record change 2/2 to 'a/a'? [Ynesfdaq?] n | |
1019 |
|
1037 | |||
1020 | shelved as test |
|
1038 | shelved as test | |
1021 | merging a/a |
|
1039 | merging a/a | |
1022 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
1040 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
1023 | $ cat a/a |
|
1041 | $ cat a/a | |
1024 | a |
|
1042 | a | |
1025 | c |
|
1043 | c | |
1026 | x |
|
1044 | x | |
1027 | x |
|
1045 | x | |
1028 | $ cat foo/foo |
|
1046 | $ cat foo/foo | |
1029 | foo |
|
1047 | foo | |
1030 | a |
|
1048 | a | |
1031 | $ hg st |
|
1049 | $ hg st | |
1032 | M a/a |
|
1050 | M a/a | |
1033 | ? foo/foo |
|
1051 | ? foo/foo | |
1034 | $ hg bookmark |
|
1052 | $ hg bookmark | |
1035 | \* test (4|13):33f7f61e6c5e (re) |
|
1053 | \* test (4|13):33f7f61e6c5e (re) | |
1036 | $ hg unshelve |
|
1054 | $ hg unshelve | |
1037 | unshelving change 'test' |
|
1055 | unshelving change 'test' | |
1038 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1056 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1039 | rebasing shelved changes |
|
1057 | rebasing shelved changes | |
1040 | merging a/a |
|
1058 | merging a/a | |
1041 | $ hg bookmark |
|
1059 | $ hg bookmark | |
1042 | \* test (4|13):33f7f61e6c5e (re) |
|
1060 | \* test (4|13):33f7f61e6c5e (re) | |
1043 | $ cat a/a |
|
1061 | $ cat a/a | |
1044 | a |
|
1062 | a | |
1045 | a |
|
1063 | a | |
1046 | c |
|
1064 | c | |
1047 | x |
|
1065 | x | |
1048 | x |
|
1066 | x | |
1049 |
|
1067 | |||
1050 | shelve --patch and shelve --stat should work with valid shelfnames |
|
1068 | shelve --patch and shelve --stat should work with valid shelfnames | |
1051 |
|
1069 | |||
1052 | $ hg up --clean . |
|
1070 | $ hg up --clean . | |
1053 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1071 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1054 | (leaving bookmark test) |
|
1072 | (leaving bookmark test) | |
1055 | $ hg shelve --list |
|
1073 | $ hg shelve --list | |
1056 | $ echo 'patch a' > shelf-patch-a |
|
1074 | $ echo 'patch a' > shelf-patch-a | |
1057 | $ hg add shelf-patch-a |
|
1075 | $ hg add shelf-patch-a | |
1058 | $ hg shelve |
|
1076 | $ hg shelve | |
1059 | shelved as default |
|
1077 | shelved as default | |
1060 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1078 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1061 | $ echo 'patch b' > shelf-patch-b |
|
1079 | $ echo 'patch b' > shelf-patch-b | |
1062 | $ hg add shelf-patch-b |
|
1080 | $ hg add shelf-patch-b | |
1063 | $ hg shelve |
|
1081 | $ hg shelve | |
1064 | shelved as default-01 |
|
1082 | shelved as default-01 | |
1065 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1083 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1066 | $ hg shelve --patch default default-01 |
|
1084 | $ hg shelve --patch default default-01 | |
1067 | default-01 (*)* changes to: create conflict (glob) |
|
1085 | default-01 (*)* changes to: create conflict (glob) | |
1068 |
|
1086 | |||
1069 | diff --git a/shelf-patch-b b/shelf-patch-b |
|
1087 | diff --git a/shelf-patch-b b/shelf-patch-b | |
1070 | new file mode 100644 |
|
1088 | new file mode 100644 | |
1071 | --- /dev/null |
|
1089 | --- /dev/null | |
1072 | +++ b/shelf-patch-b |
|
1090 | +++ b/shelf-patch-b | |
1073 | @@ -0,0 +1,1 @@ |
|
1091 | @@ -0,0 +1,1 @@ | |
1074 | +patch b |
|
1092 | +patch b | |
1075 | default (*)* changes to: create conflict (glob) |
|
1093 | default (*)* changes to: create conflict (glob) | |
1076 |
|
1094 | |||
1077 | diff --git a/shelf-patch-a b/shelf-patch-a |
|
1095 | diff --git a/shelf-patch-a b/shelf-patch-a | |
1078 | new file mode 100644 |
|
1096 | new file mode 100644 | |
1079 | --- /dev/null |
|
1097 | --- /dev/null | |
1080 | +++ b/shelf-patch-a |
|
1098 | +++ b/shelf-patch-a | |
1081 | @@ -0,0 +1,1 @@ |
|
1099 | @@ -0,0 +1,1 @@ | |
1082 | +patch a |
|
1100 | +patch a | |
1083 | $ hg shelve --stat default default-01 |
|
1101 | $ hg shelve --stat default default-01 | |
1084 | default-01 (*)* changes to: create conflict (glob) |
|
1102 | default-01 (*)* changes to: create conflict (glob) | |
1085 | shelf-patch-b | 1 + |
|
1103 | shelf-patch-b | 1 + | |
1086 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
1104 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
1087 | default (*)* changes to: create conflict (glob) |
|
1105 | default (*)* changes to: create conflict (glob) | |
1088 | shelf-patch-a | 1 + |
|
1106 | shelf-patch-a | 1 + | |
1089 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
1107 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
1090 | $ hg shelve --patch default |
|
1108 | $ hg shelve --patch default | |
1091 | default (*)* changes to: create conflict (glob) |
|
1109 | default (*)* changes to: create conflict (glob) | |
1092 |
|
1110 | |||
1093 | diff --git a/shelf-patch-a b/shelf-patch-a |
|
1111 | diff --git a/shelf-patch-a b/shelf-patch-a | |
1094 | new file mode 100644 |
|
1112 | new file mode 100644 | |
1095 | --- /dev/null |
|
1113 | --- /dev/null | |
1096 | +++ b/shelf-patch-a |
|
1114 | +++ b/shelf-patch-a | |
1097 | @@ -0,0 +1,1 @@ |
|
1115 | @@ -0,0 +1,1 @@ | |
1098 | +patch a |
|
1116 | +patch a | |
1099 | $ hg shelve --stat default |
|
1117 | $ hg shelve --stat default | |
1100 | default (*)* changes to: create conflict (glob) |
|
1118 | default (*)* changes to: create conflict (glob) | |
1101 | shelf-patch-a | 1 + |
|
1119 | shelf-patch-a | 1 + | |
1102 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
1120 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
1103 | $ hg shelve --patch nonexistentshelf |
|
1121 | $ hg shelve --patch nonexistentshelf | |
1104 | abort: cannot find shelf nonexistentshelf |
|
1122 | abort: cannot find shelf nonexistentshelf | |
1105 | [255] |
|
1123 | [255] | |
1106 | $ hg shelve --stat nonexistentshelf |
|
1124 | $ hg shelve --stat nonexistentshelf | |
1107 | abort: cannot find shelf nonexistentshelf |
|
1125 | abort: cannot find shelf nonexistentshelf | |
1108 | [255] |
|
1126 | [255] | |
1109 | $ hg shelve --patch default nonexistentshelf |
|
1127 | $ hg shelve --patch default nonexistentshelf | |
1110 | abort: cannot find shelf nonexistentshelf |
|
1128 | abort: cannot find shelf nonexistentshelf | |
1111 | [255] |
|
1129 | [255] | |
1112 |
|
1130 | |||
1113 | when the user asks for a patch, we assume they want the most recent shelve if |
|
1131 | when the user asks for a patch, we assume they want the most recent shelve if | |
1114 | they don't provide a shelve name |
|
1132 | they don't provide a shelve name | |
1115 |
|
1133 | |||
1116 | $ hg shelve --patch |
|
1134 | $ hg shelve --patch | |
1117 | default-01 (*)* changes to: create conflict (glob) |
|
1135 | default-01 (*)* changes to: create conflict (glob) | |
1118 |
|
1136 | |||
1119 | diff --git a/shelf-patch-b b/shelf-patch-b |
|
1137 | diff --git a/shelf-patch-b b/shelf-patch-b | |
1120 | new file mode 100644 |
|
1138 | new file mode 100644 | |
1121 | --- /dev/null |
|
1139 | --- /dev/null | |
1122 | +++ b/shelf-patch-b |
|
1140 | +++ b/shelf-patch-b | |
1123 | @@ -0,0 +1,1 @@ |
|
1141 | @@ -0,0 +1,1 @@ | |
1124 | +patch b |
|
1142 | +patch b | |
1125 |
|
1143 | |||
1126 | $ cd .. |
|
1144 | $ cd .. | |
1127 |
|
1145 | |||
1128 | you shouldn't be able to ask for the patch/stats of the most recent shelve if |
|
1146 | you shouldn't be able to ask for the patch/stats of the most recent shelve if | |
1129 | there are no shelves |
|
1147 | there are no shelves | |
1130 |
|
1148 | |||
1131 | $ hg init noshelves |
|
1149 | $ hg init noshelves | |
1132 | $ cd noshelves |
|
1150 | $ cd noshelves | |
1133 |
|
1151 | |||
1134 | $ hg shelve --patch |
|
1152 | $ hg shelve --patch | |
1135 | abort: there are no shelves to show |
|
1153 | abort: there are no shelves to show | |
1136 | [255] |
|
1154 | [255] | |
1137 | $ hg shelve --stat |
|
1155 | $ hg shelve --stat | |
1138 | abort: there are no shelves to show |
|
1156 | abort: there are no shelves to show | |
1139 | [255] |
|
1157 | [255] | |
1140 |
|
1158 | |||
1141 | $ cd .. |
|
1159 | $ cd .. | |
1142 |
|
1160 | |||
1143 | Shelve from general delta repo uses bundle2 on disk |
|
1161 | Shelve from general delta repo uses bundle2 on disk | |
1144 | -------------------------------------------------- |
|
1162 | -------------------------------------------------- | |
1145 |
|
1163 | |||
1146 | no general delta |
|
1164 | no general delta | |
1147 |
|
1165 | |||
1148 | $ hg clone --pull repo bundle1 --config format.usegeneraldelta=0 |
|
1166 | $ hg clone --pull repo bundle1 --config format.usegeneraldelta=0 | |
1149 | requesting all changes |
|
1167 | requesting all changes | |
1150 | adding changesets |
|
1168 | adding changesets | |
1151 | adding manifests |
|
1169 | adding manifests | |
1152 | adding file changes |
|
1170 | adding file changes | |
1153 | added 5 changesets with 8 changes to 6 files |
|
1171 | added 5 changesets with 8 changes to 6 files | |
1154 | new changesets cc01e2b0c59f:33f7f61e6c5e |
|
1172 | new changesets cc01e2b0c59f:33f7f61e6c5e | |
1155 | updating to branch default |
|
1173 | updating to branch default | |
1156 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1174 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1157 | $ cd bundle1 |
|
1175 | $ cd bundle1 | |
1158 | $ echo babar > jungle |
|
1176 | $ echo babar > jungle | |
1159 | $ hg add jungle |
|
1177 | $ hg add jungle | |
1160 | $ hg shelve |
|
1178 | $ hg shelve | |
1161 | shelved as default |
|
1179 | shelved as default | |
1162 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1180 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1163 | $ hg debugbundle .hg/shelved/*.hg |
|
1181 | $ hg debugbundle .hg/shelved/*.hg | |
1164 | 330882a04d2ce8487636b1fb292e5beea77fa1e3 |
|
1182 | 330882a04d2ce8487636b1fb292e5beea77fa1e3 | |
1165 | $ cd .. |
|
1183 | $ cd .. | |
1166 |
|
1184 | |||
1167 | with general delta |
|
1185 | with general delta | |
1168 |
|
1186 | |||
1169 | $ hg clone --pull repo bundle2 --config format.usegeneraldelta=1 |
|
1187 | $ hg clone --pull repo bundle2 --config format.usegeneraldelta=1 | |
1170 | requesting all changes |
|
1188 | requesting all changes | |
1171 | adding changesets |
|
1189 | adding changesets | |
1172 | adding manifests |
|
1190 | adding manifests | |
1173 | adding file changes |
|
1191 | adding file changes | |
1174 | added 5 changesets with 8 changes to 6 files |
|
1192 | added 5 changesets with 8 changes to 6 files | |
1175 | new changesets cc01e2b0c59f:33f7f61e6c5e |
|
1193 | new changesets cc01e2b0c59f:33f7f61e6c5e | |
1176 | updating to branch default |
|
1194 | updating to branch default | |
1177 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1195 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1178 | $ cd bundle2 |
|
1196 | $ cd bundle2 | |
1179 | $ echo babar > jungle |
|
1197 | $ echo babar > jungle | |
1180 | $ hg add jungle |
|
1198 | $ hg add jungle | |
1181 | $ hg shelve |
|
1199 | $ hg shelve | |
1182 | shelved as default |
|
1200 | shelved as default | |
1183 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1201 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1184 | $ hg debugbundle .hg/shelved/*.hg |
|
1202 | $ hg debugbundle .hg/shelved/*.hg | |
1185 | Stream params: {Compression: BZ} |
|
1203 | Stream params: {Compression: BZ} | |
1186 | changegroup -- {nbchanges: 1, version: 02} (mandatory: True) |
|
1204 | changegroup -- {nbchanges: 1, version: 02} (mandatory: True) | |
1187 | 330882a04d2ce8487636b1fb292e5beea77fa1e3 |
|
1205 | 330882a04d2ce8487636b1fb292e5beea77fa1e3 | |
1188 | $ cd .. |
|
1206 | $ cd .. | |
1189 |
|
1207 | |||
1190 | Test visibility of in-memory changes inside transaction to external hook |
|
1208 | Test visibility of in-memory changes inside transaction to external hook | |
1191 | ------------------------------------------------------------------------ |
|
1209 | ------------------------------------------------------------------------ | |
1192 |
|
1210 | |||
1193 | $ cd repo |
|
1211 | $ cd repo | |
1194 |
|
1212 | |||
1195 | $ echo xxxx >> x |
|
1213 | $ echo xxxx >> x | |
1196 | $ hg commit -m "#5: changes to invoke rebase" |
|
1214 | $ hg commit -m "#5: changes to invoke rebase" | |
1197 |
|
1215 | |||
1198 | $ cat > $TESTTMP/checkvisibility.sh <<EOF |
|
1216 | $ cat > $TESTTMP/checkvisibility.sh <<EOF | |
1199 | > echo "==== \$1:" |
|
1217 | > echo "==== \$1:" | |
1200 | > hg parents --template "VISIBLE {rev}:{node|short}\n" |
|
1218 | > hg parents --template "VISIBLE {rev}:{node|short}\n" | |
1201 | > # test that pending changes are hidden |
|
1219 | > # test that pending changes are hidden | |
1202 | > unset HG_PENDING |
|
1220 | > unset HG_PENDING | |
1203 | > hg parents --template "ACTUAL {rev}:{node|short}\n" |
|
1221 | > hg parents --template "ACTUAL {rev}:{node|short}\n" | |
1204 | > echo "====" |
|
1222 | > echo "====" | |
1205 | > EOF |
|
1223 | > EOF | |
1206 |
|
1224 | |||
1207 | $ cat >> .hg/hgrc <<EOF |
|
1225 | $ cat >> .hg/hgrc <<EOF | |
1208 | > [defaults] |
|
1226 | > [defaults] | |
1209 | > # to fix hash id of temporary revisions |
|
1227 | > # to fix hash id of temporary revisions | |
1210 | > unshelve = --date '0 0' |
|
1228 | > unshelve = --date '0 0' | |
1211 | > EOF |
|
1229 | > EOF | |
1212 |
|
1230 | |||
1213 | "hg unshelve" at REV5 implies steps below: |
|
1231 | "hg unshelve" at REV5 implies steps below: | |
1214 |
|
1232 | |||
1215 | (1) commit changes in the working directory (REV6) |
|
1233 | (1) commit changes in the working directory (REV6) | |
1216 | (2) unbundle shelved revision (REV7) |
|
1234 | (2) unbundle shelved revision (REV7) | |
1217 | (3) rebase: merge REV7 into REV6 (REV6 => REV6, REV7) |
|
1235 | (3) rebase: merge REV7 into REV6 (REV6 => REV6, REV7) | |
1218 | (4) rebase: commit merged revision (REV8) |
|
1236 | (4) rebase: commit merged revision (REV8) | |
1219 | (5) rebase: update to REV6 (REV8 => REV6) |
|
1237 | (5) rebase: update to REV6 (REV8 => REV6) | |
1220 | (6) update to REV5 (REV6 => REV5) |
|
1238 | (6) update to REV5 (REV6 => REV5) | |
1221 | (7) abort transaction |
|
1239 | (7) abort transaction | |
1222 |
|
1240 | |||
1223 | == test visibility to external preupdate hook |
|
1241 | == test visibility to external preupdate hook | |
1224 |
|
1242 | |||
1225 | $ cat >> .hg/hgrc <<EOF |
|
1243 | $ cat >> .hg/hgrc <<EOF | |
1226 | > [hooks] |
|
1244 | > [hooks] | |
1227 | > preupdate.visibility = sh $TESTTMP/checkvisibility.sh preupdate |
|
1245 | > preupdate.visibility = sh $TESTTMP/checkvisibility.sh preupdate | |
1228 | > EOF |
|
1246 | > EOF | |
1229 |
|
1247 | |||
1230 | $ echo nnnn >> n |
|
1248 | $ echo nnnn >> n | |
1231 |
|
1249 | |||
1232 | $ sh $TESTTMP/checkvisibility.sh before-unshelving |
|
1250 | $ sh $TESTTMP/checkvisibility.sh before-unshelving | |
1233 | ==== before-unshelving: |
|
1251 | ==== before-unshelving: | |
1234 | VISIBLE (5|19):703117a2acfb (re) |
|
1252 | VISIBLE (5|19):703117a2acfb (re) | |
1235 | ACTUAL (5|19):703117a2acfb (re) |
|
1253 | ACTUAL (5|19):703117a2acfb (re) | |
1236 | ==== |
|
1254 | ==== | |
1237 |
|
1255 | |||
1238 | $ hg unshelve --keep default |
|
1256 | $ hg unshelve --keep default | |
1239 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1257 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1240 | rebasing shelved changes |
|
1258 | rebasing shelved changes | |
1241 | ==== preupdate: |
|
1259 | ==== preupdate: | |
1242 | VISIBLE (6|20):54c00d20fb3f (re) |
|
1260 | VISIBLE (6|20):54c00d20fb3f (re) | |
1243 | ACTUAL (5|19):703117a2acfb (re) |
|
1261 | ACTUAL (5|19):703117a2acfb (re) | |
1244 | ==== |
|
1262 | ==== | |
1245 | ==== preupdate: |
|
1263 | ==== preupdate: | |
1246 | VISIBLE (8|21):8efe6f7537dc (re) |
|
1264 | VISIBLE (8|21):8efe6f7537dc (re) | |
1247 | ACTUAL (5|19):703117a2acfb (re) |
|
1265 | ACTUAL (5|19):703117a2acfb (re) | |
1248 | ==== |
|
1266 | ==== | |
1249 | ==== preupdate: |
|
1267 | ==== preupdate: | |
1250 | VISIBLE (6|20):54c00d20fb3f (re) |
|
1268 | VISIBLE (6|20):54c00d20fb3f (re) | |
1251 | ACTUAL (5|19):703117a2acfb (re) |
|
1269 | ACTUAL (5|19):703117a2acfb (re) | |
1252 | ==== |
|
1270 | ==== | |
1253 |
|
1271 | |||
1254 | $ cat >> .hg/hgrc <<EOF |
|
1272 | $ cat >> .hg/hgrc <<EOF | |
1255 | > [hooks] |
|
1273 | > [hooks] | |
1256 | > preupdate.visibility = |
|
1274 | > preupdate.visibility = | |
1257 | > EOF |
|
1275 | > EOF | |
1258 |
|
1276 | |||
1259 | $ sh $TESTTMP/checkvisibility.sh after-unshelving |
|
1277 | $ sh $TESTTMP/checkvisibility.sh after-unshelving | |
1260 | ==== after-unshelving: |
|
1278 | ==== after-unshelving: | |
1261 | VISIBLE (5|19):703117a2acfb (re) |
|
1279 | VISIBLE (5|19):703117a2acfb (re) | |
1262 | ACTUAL (5|19):703117a2acfb (re) |
|
1280 | ACTUAL (5|19):703117a2acfb (re) | |
1263 | ==== |
|
1281 | ==== | |
1264 |
|
1282 | |||
1265 | == test visibility to external update hook |
|
1283 | == test visibility to external update hook | |
1266 |
|
1284 | |||
1267 | $ hg update -q -C 703117a2acfb |
|
1285 | $ hg update -q -C 703117a2acfb | |
1268 |
|
1286 | |||
1269 | $ cat >> .hg/hgrc <<EOF |
|
1287 | $ cat >> .hg/hgrc <<EOF | |
1270 | > [hooks] |
|
1288 | > [hooks] | |
1271 | > update.visibility = sh $TESTTMP/checkvisibility.sh update |
|
1289 | > update.visibility = sh $TESTTMP/checkvisibility.sh update | |
1272 | > EOF |
|
1290 | > EOF | |
1273 |
|
1291 | |||
1274 | $ echo nnnn >> n |
|
1292 | $ echo nnnn >> n | |
1275 |
|
1293 | |||
1276 | $ sh $TESTTMP/checkvisibility.sh before-unshelving |
|
1294 | $ sh $TESTTMP/checkvisibility.sh before-unshelving | |
1277 | ==== before-unshelving: |
|
1295 | ==== before-unshelving: | |
1278 | VISIBLE (5|19):703117a2acfb (re) |
|
1296 | VISIBLE (5|19):703117a2acfb (re) | |
1279 | ACTUAL (5|19):703117a2acfb (re) |
|
1297 | ACTUAL (5|19):703117a2acfb (re) | |
1280 | ==== |
|
1298 | ==== | |
1281 |
|
1299 | |||
1282 | $ hg unshelve --keep default |
|
1300 | $ hg unshelve --keep default | |
1283 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1301 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1284 | rebasing shelved changes |
|
1302 | rebasing shelved changes | |
1285 | ==== update: |
|
1303 | ==== update: | |
1286 | VISIBLE (6|20):54c00d20fb3f (re) |
|
1304 | VISIBLE (6|20):54c00d20fb3f (re) | |
1287 | VISIBLE 1?7:492ed9d705e5 (re) |
|
1305 | VISIBLE 1?7:492ed9d705e5 (re) | |
1288 | ACTUAL (5|19):703117a2acfb (re) |
|
1306 | ACTUAL (5|19):703117a2acfb (re) | |
1289 | ==== |
|
1307 | ==== | |
1290 | ==== update: |
|
1308 | ==== update: | |
1291 | VISIBLE (6|20):54c00d20fb3f (re) |
|
1309 | VISIBLE (6|20):54c00d20fb3f (re) | |
1292 | ACTUAL (5|19):703117a2acfb (re) |
|
1310 | ACTUAL (5|19):703117a2acfb (re) | |
1293 | ==== |
|
1311 | ==== | |
1294 | ==== update: |
|
1312 | ==== update: | |
1295 | VISIBLE (5|19):703117a2acfb (re) |
|
1313 | VISIBLE (5|19):703117a2acfb (re) | |
1296 | ACTUAL (5|19):703117a2acfb (re) |
|
1314 | ACTUAL (5|19):703117a2acfb (re) | |
1297 | ==== |
|
1315 | ==== | |
1298 |
|
1316 | |||
1299 | $ cat >> .hg/hgrc <<EOF |
|
1317 | $ cat >> .hg/hgrc <<EOF | |
1300 | > [hooks] |
|
1318 | > [hooks] | |
1301 | > update.visibility = |
|
1319 | > update.visibility = | |
1302 | > EOF |
|
1320 | > EOF | |
1303 |
|
1321 | |||
1304 | $ sh $TESTTMP/checkvisibility.sh after-unshelving |
|
1322 | $ sh $TESTTMP/checkvisibility.sh after-unshelving | |
1305 | ==== after-unshelving: |
|
1323 | ==== after-unshelving: | |
1306 | VISIBLE (5|19):703117a2acfb (re) |
|
1324 | VISIBLE (5|19):703117a2acfb (re) | |
1307 | ACTUAL (5|19):703117a2acfb (re) |
|
1325 | ACTUAL (5|19):703117a2acfb (re) | |
1308 | ==== |
|
1326 | ==== | |
1309 |
|
1327 | |||
1310 | $ cd .. |
|
1328 | $ cd .. | |
1311 |
|
1329 | |||
1312 | test .orig files go where the user wants them to |
|
1330 | test .orig files go where the user wants them to | |
1313 | --------------------------------------------------------------- |
|
1331 | --------------------------------------------------------------- | |
1314 | $ hg init salvage |
|
1332 | $ hg init salvage | |
1315 | $ cd salvage |
|
1333 | $ cd salvage | |
1316 | $ echo 'content' > root |
|
1334 | $ echo 'content' > root | |
1317 | $ hg commit -A -m 'root' -q |
|
1335 | $ hg commit -A -m 'root' -q | |
1318 | $ echo '' > root |
|
1336 | $ echo '' > root | |
1319 | $ hg shelve -q |
|
1337 | $ hg shelve -q | |
1320 | $ echo 'contADDent' > root |
|
1338 | $ echo 'contADDent' > root | |
1321 | $ hg unshelve -q --config 'ui.origbackuppath=.hg/origbackups' |
|
1339 | $ hg unshelve -q --config 'ui.origbackuppath=.hg/origbackups' | |
1322 | warning: conflicts while merging root! (edit, then use 'hg resolve --mark') |
|
1340 | warning: conflicts while merging root! (edit, then use 'hg resolve --mark') | |
1323 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1341 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1324 | [1] |
|
1342 | [1] | |
1325 | $ ls .hg/origbackups |
|
1343 | $ ls .hg/origbackups | |
1326 | root |
|
1344 | root | |
1327 | $ rm -rf .hg/origbackups |
|
1345 | $ rm -rf .hg/origbackups | |
1328 |
|
1346 | |||
1329 | test Abort unshelve always gets user out of the unshelved state |
|
1347 | test Abort unshelve always gets user out of the unshelved state | |
1330 | --------------------------------------------------------------- |
|
1348 | --------------------------------------------------------------- | |
1331 |
|
1349 | |||
1332 | with a corrupted shelve state file |
|
1350 | with a corrupted shelve state file | |
1333 | $ sed 's/ae8c668541e8/123456789012/' .hg/shelvedstate > ../corrupt-shelvedstate |
|
1351 | $ sed 's/ae8c668541e8/123456789012/' .hg/shelvedstate > ../corrupt-shelvedstate | |
1334 | $ mv ../corrupt-shelvedstate .hg/shelvestate |
|
1352 | $ mv ../corrupt-shelvedstate .hg/shelvestate | |
1335 | $ hg unshelve --abort 2>&1 | grep 'aborted' |
|
1353 | $ hg unshelve --abort 2>&1 | grep 'aborted' | |
1336 | unshelve of 'default' aborted |
|
1354 | unshelve of 'default' aborted | |
1337 | $ hg summary |
|
1355 | $ hg summary | |
1338 | parent: 0:ae8c668541e8 tip |
|
1356 | parent: 0:ae8c668541e8 tip | |
1339 | root |
|
1357 | root | |
1340 | branch: default |
|
1358 | branch: default | |
1341 | commit: 1 modified |
|
1359 | commit: 1 modified | |
1342 | update: (current) |
|
1360 | update: (current) | |
1343 | phases: 1 draft |
|
1361 | phases: 1 draft | |
1344 | $ hg up -C . |
|
1362 | $ hg up -C . | |
1345 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1363 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1346 |
|
1364 | |||
1347 | $ cd .. |
|
1365 | $ cd .. | |
1348 |
|
1366 | |||
1349 | Keep active bookmark while (un)shelving even on shared repo (issue4940) |
|
1367 | Keep active bookmark while (un)shelving even on shared repo (issue4940) | |
1350 | ----------------------------------------------------------------------- |
|
1368 | ----------------------------------------------------------------------- | |
1351 |
|
1369 | |||
1352 | $ cat <<EOF >> $HGRCPATH |
|
1370 | $ cat <<EOF >> $HGRCPATH | |
1353 | > [extensions] |
|
1371 | > [extensions] | |
1354 | > share = |
|
1372 | > share = | |
1355 | > EOF |
|
1373 | > EOF | |
1356 |
|
1374 | |||
1357 | $ hg bookmarks -R repo |
|
1375 | $ hg bookmarks -R repo | |
1358 | test (4|13):33f7f61e6c5e (re) |
|
1376 | test (4|13):33f7f61e6c5e (re) | |
1359 | $ hg share -B repo share |
|
1377 | $ hg share -B repo share | |
1360 | updating working directory |
|
1378 | updating working directory | |
1361 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1379 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1362 | $ cd share |
|
1380 | $ cd share | |
1363 |
|
1381 | |||
1364 | $ hg bookmarks |
|
1382 | $ hg bookmarks | |
1365 | test (4|13):33f7f61e6c5e (re) |
|
1383 | test (4|13):33f7f61e6c5e (re) | |
1366 | $ hg bookmarks foo |
|
1384 | $ hg bookmarks foo | |
1367 | $ hg bookmarks |
|
1385 | $ hg bookmarks | |
1368 | \* foo (5|19):703117a2acfb (re) |
|
1386 | \* foo (5|19):703117a2acfb (re) | |
1369 | test (4|13):33f7f61e6c5e (re) |
|
1387 | test (4|13):33f7f61e6c5e (re) | |
1370 | $ echo x >> x |
|
1388 | $ echo x >> x | |
1371 | $ hg shelve |
|
1389 | $ hg shelve | |
1372 | shelved as foo |
|
1390 | shelved as foo | |
1373 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1391 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1374 | $ hg bookmarks |
|
1392 | $ hg bookmarks | |
1375 | \* foo (5|19):703117a2acfb (re) |
|
1393 | \* foo (5|19):703117a2acfb (re) | |
1376 | test (4|13):33f7f61e6c5e (re) |
|
1394 | test (4|13):33f7f61e6c5e (re) | |
1377 |
|
1395 | |||
1378 | $ hg unshelve |
|
1396 | $ hg unshelve | |
1379 | unshelving change 'foo' |
|
1397 | unshelving change 'foo' | |
1380 | $ hg bookmarks |
|
1398 | $ hg bookmarks | |
1381 | \* foo (5|19):703117a2acfb (re) |
|
1399 | \* foo (5|19):703117a2acfb (re) | |
1382 | test (4|13):33f7f61e6c5e (re) |
|
1400 | test (4|13):33f7f61e6c5e (re) | |
1383 |
|
1401 | |||
1384 | $ cd .. |
|
1402 | $ cd .. | |
1385 |
|
1403 | |||
1386 | Shelve and unshelve unknown files. For the purposes of unshelve, a shelved |
|
1404 | Shelve and unshelve unknown files. For the purposes of unshelve, a shelved | |
1387 | unknown file is the same as a shelved added file, except that it will be in |
|
1405 | unknown file is the same as a shelved added file, except that it will be in | |
1388 | unknown state after unshelve if and only if it was either absent or unknown |
|
1406 | unknown state after unshelve if and only if it was either absent or unknown | |
1389 | before the unshelve operation. |
|
1407 | before the unshelve operation. | |
1390 |
|
1408 | |||
1391 | $ hg init unknowns |
|
1409 | $ hg init unknowns | |
1392 | $ cd unknowns |
|
1410 | $ cd unknowns | |
1393 |
|
1411 | |||
1394 | The simplest case is if I simply have an unknown file that I shelve and unshelve |
|
1412 | The simplest case is if I simply have an unknown file that I shelve and unshelve | |
1395 |
|
1413 | |||
1396 | $ echo unknown > unknown |
|
1414 | $ echo unknown > unknown | |
1397 | $ hg status |
|
1415 | $ hg status | |
1398 | ? unknown |
|
1416 | ? unknown | |
1399 | $ hg shelve --unknown |
|
1417 | $ hg shelve --unknown | |
1400 | shelved as default |
|
1418 | shelved as default | |
1401 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1419 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1402 | $ hg status |
|
1420 | $ hg status | |
1403 | $ hg unshelve |
|
1421 | $ hg unshelve | |
1404 | unshelving change 'default' |
|
1422 | unshelving change 'default' | |
1405 | $ hg status |
|
1423 | $ hg status | |
1406 | ? unknown |
|
1424 | ? unknown | |
1407 | $ rm unknown |
|
1425 | $ rm unknown | |
1408 |
|
1426 | |||
1409 | If I shelve, add the file, and unshelve, does it stay added? |
|
1427 | If I shelve, add the file, and unshelve, does it stay added? | |
1410 |
|
1428 | |||
1411 | $ echo unknown > unknown |
|
1429 | $ echo unknown > unknown | |
1412 | $ hg shelve -u |
|
1430 | $ hg shelve -u | |
1413 | shelved as default |
|
1431 | shelved as default | |
1414 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1432 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1415 | $ hg status |
|
1433 | $ hg status | |
1416 | $ touch unknown |
|
1434 | $ touch unknown | |
1417 | $ hg add unknown |
|
1435 | $ hg add unknown | |
1418 | $ hg status |
|
1436 | $ hg status | |
1419 | A unknown |
|
1437 | A unknown | |
1420 | $ hg unshelve |
|
1438 | $ hg unshelve | |
1421 | unshelving change 'default' |
|
1439 | unshelving change 'default' | |
1422 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1440 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1423 | rebasing shelved changes |
|
1441 | rebasing shelved changes | |
1424 | merging unknown |
|
1442 | merging unknown | |
1425 | $ hg status |
|
1443 | $ hg status | |
1426 | A unknown |
|
1444 | A unknown | |
1427 | $ hg forget unknown |
|
1445 | $ hg forget unknown | |
1428 | $ rm unknown |
|
1446 | $ rm unknown | |
1429 |
|
1447 | |||
1430 | And if I shelve, commit, then unshelve, does it become modified? |
|
1448 | And if I shelve, commit, then unshelve, does it become modified? | |
1431 |
|
1449 | |||
1432 | $ echo unknown > unknown |
|
1450 | $ echo unknown > unknown | |
1433 | $ hg shelve -u |
|
1451 | $ hg shelve -u | |
1434 | shelved as default |
|
1452 | shelved as default | |
1435 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1453 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1436 | $ hg status |
|
1454 | $ hg status | |
1437 | $ touch unknown |
|
1455 | $ touch unknown | |
1438 | $ hg add unknown |
|
1456 | $ hg add unknown | |
1439 | $ hg commit -qm "Add unknown" |
|
1457 | $ hg commit -qm "Add unknown" | |
1440 | $ hg status |
|
1458 | $ hg status | |
1441 | $ hg unshelve |
|
1459 | $ hg unshelve | |
1442 | unshelving change 'default' |
|
1460 | unshelving change 'default' | |
1443 | rebasing shelved changes |
|
1461 | rebasing shelved changes | |
1444 | merging unknown |
|
1462 | merging unknown | |
1445 | $ hg status |
|
1463 | $ hg status | |
1446 | M unknown |
|
1464 | M unknown | |
1447 | $ hg remove --force unknown |
|
1465 | $ hg remove --force unknown | |
1448 | $ hg commit -qm "Remove unknown" |
|
1466 | $ hg commit -qm "Remove unknown" | |
1449 |
|
1467 | |||
1450 | $ cd .. |
|
1468 | $ cd .. | |
1451 |
|
1469 | |||
1452 | We expects that non-bare shelve keeps newly created branch in |
|
1470 | We expects that non-bare shelve keeps newly created branch in | |
1453 | working directory. |
|
1471 | working directory. | |
1454 |
|
1472 | |||
1455 | $ hg init shelve-preserve-new-branch |
|
1473 | $ hg init shelve-preserve-new-branch | |
1456 | $ cd shelve-preserve-new-branch |
|
1474 | $ cd shelve-preserve-new-branch | |
1457 | $ echo "a" >> a |
|
1475 | $ echo "a" >> a | |
1458 | $ hg add a |
|
1476 | $ hg add a | |
1459 | $ echo "b" >> b |
|
1477 | $ echo "b" >> b | |
1460 | $ hg add b |
|
1478 | $ hg add b | |
1461 | $ hg commit -m "ab" |
|
1479 | $ hg commit -m "ab" | |
1462 | $ echo "aa" >> a |
|
1480 | $ echo "aa" >> a | |
1463 | $ echo "bb" >> b |
|
1481 | $ echo "bb" >> b | |
1464 | $ hg branch new-branch |
|
1482 | $ hg branch new-branch | |
1465 | marked working directory as branch new-branch |
|
1483 | marked working directory as branch new-branch | |
1466 | (branches are permanent and global, did you want a bookmark?) |
|
1484 | (branches are permanent and global, did you want a bookmark?) | |
1467 | $ hg status |
|
1485 | $ hg status | |
1468 | M a |
|
1486 | M a | |
1469 | M b |
|
1487 | M b | |
1470 | $ hg branch |
|
1488 | $ hg branch | |
1471 | new-branch |
|
1489 | new-branch | |
1472 | $ hg shelve a |
|
1490 | $ hg shelve a | |
1473 | shelved as default |
|
1491 | shelved as default | |
1474 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1492 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1475 | $ hg branch |
|
1493 | $ hg branch | |
1476 | new-branch |
|
1494 | new-branch | |
1477 | $ hg status |
|
1495 | $ hg status | |
1478 | M b |
|
1496 | M b | |
1479 | $ touch "c" >> c |
|
1497 | $ touch "c" >> c | |
1480 | $ hg add c |
|
1498 | $ hg add c | |
1481 | $ hg status |
|
1499 | $ hg status | |
1482 | M b |
|
1500 | M b | |
1483 | A c |
|
1501 | A c | |
1484 | $ hg shelve --exclude c |
|
1502 | $ hg shelve --exclude c | |
1485 | shelved as default-01 |
|
1503 | shelved as default-01 | |
1486 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1504 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1487 | $ hg branch |
|
1505 | $ hg branch | |
1488 | new-branch |
|
1506 | new-branch | |
1489 | $ hg status |
|
1507 | $ hg status | |
1490 | A c |
|
1508 | A c | |
1491 | $ hg shelve --include c |
|
1509 | $ hg shelve --include c | |
1492 | shelved as default-02 |
|
1510 | shelved as default-02 | |
1493 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1511 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1494 | $ hg branch |
|
1512 | $ hg branch | |
1495 | new-branch |
|
1513 | new-branch | |
1496 | $ hg status |
|
1514 | $ hg status | |
1497 | $ echo "d" >> d |
|
1515 | $ echo "d" >> d | |
1498 | $ hg add d |
|
1516 | $ hg add d | |
1499 | $ hg status |
|
1517 | $ hg status | |
1500 | A d |
|
1518 | A d | |
1501 |
|
1519 | |||
1502 | We expect that bare-shelve will not keep branch in current working directory. |
|
1520 | We expect that bare-shelve will not keep branch in current working directory. | |
1503 |
|
1521 | |||
1504 | $ hg shelve |
|
1522 | $ hg shelve | |
1505 | shelved as default-03 |
|
1523 | shelved as default-03 | |
1506 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1524 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1507 | $ hg branch |
|
1525 | $ hg branch | |
1508 | default |
|
1526 | default | |
1509 | $ cd .. |
|
1527 | $ cd .. | |
1510 |
|
1528 | |||
1511 | When i shelve commit on newly created branch i expect |
|
1529 | When i shelve commit on newly created branch i expect | |
1512 | that after unshelve newly created branch will be preserved. |
|
1530 | that after unshelve newly created branch will be preserved. | |
1513 |
|
1531 | |||
1514 | $ hg init shelve_on_new_branch_simple |
|
1532 | $ hg init shelve_on_new_branch_simple | |
1515 | $ cd shelve_on_new_branch_simple |
|
1533 | $ cd shelve_on_new_branch_simple | |
1516 | $ echo "aaa" >> a |
|
1534 | $ echo "aaa" >> a | |
1517 | $ hg commit -A -m "a" |
|
1535 | $ hg commit -A -m "a" | |
1518 | adding a |
|
1536 | adding a | |
1519 | $ hg branch |
|
1537 | $ hg branch | |
1520 | default |
|
1538 | default | |
1521 | $ hg branch test |
|
1539 | $ hg branch test | |
1522 | marked working directory as branch test |
|
1540 | marked working directory as branch test | |
1523 | (branches are permanent and global, did you want a bookmark?) |
|
1541 | (branches are permanent and global, did you want a bookmark?) | |
1524 | $ echo "bbb" >> a |
|
1542 | $ echo "bbb" >> a | |
1525 | $ hg status |
|
1543 | $ hg status | |
1526 | M a |
|
1544 | M a | |
1527 | $ hg shelve |
|
1545 | $ hg shelve | |
1528 | shelved as default |
|
1546 | shelved as default | |
1529 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1547 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1530 | $ hg branch |
|
1548 | $ hg branch | |
1531 | default |
|
1549 | default | |
1532 | $ echo "bbb" >> b |
|
1550 | $ echo "bbb" >> b | |
1533 | $ hg status |
|
1551 | $ hg status | |
1534 | ? b |
|
1552 | ? b | |
1535 | $ hg unshelve |
|
1553 | $ hg unshelve | |
1536 | unshelving change 'default' |
|
1554 | unshelving change 'default' | |
1537 | marked working directory as branch test |
|
1555 | marked working directory as branch test | |
1538 | $ hg status |
|
1556 | $ hg status | |
1539 | M a |
|
1557 | M a | |
1540 | ? b |
|
1558 | ? b | |
1541 | $ hg branch |
|
1559 | $ hg branch | |
1542 | test |
|
1560 | test | |
1543 | $ cd .. |
|
1561 | $ cd .. | |
1544 |
|
1562 | |||
1545 | When i shelve commit on newly created branch, make |
|
1563 | When i shelve commit on newly created branch, make | |
1546 | some changes, unshelve it and running into merge |
|
1564 | some changes, unshelve it and running into merge | |
1547 | conflicts i expect that after fixing them and |
|
1565 | conflicts i expect that after fixing them and | |
1548 | running unshelve --continue newly created branch |
|
1566 | running unshelve --continue newly created branch | |
1549 | will be preserved. |
|
1567 | will be preserved. | |
1550 |
|
1568 | |||
1551 | $ hg init shelve_on_new_branch_conflict |
|
1569 | $ hg init shelve_on_new_branch_conflict | |
1552 | $ cd shelve_on_new_branch_conflict |
|
1570 | $ cd shelve_on_new_branch_conflict | |
1553 | $ echo "aaa" >> a |
|
1571 | $ echo "aaa" >> a | |
1554 | $ hg commit -A -m "a" |
|
1572 | $ hg commit -A -m "a" | |
1555 | adding a |
|
1573 | adding a | |
1556 | $ hg branch |
|
1574 | $ hg branch | |
1557 | default |
|
1575 | default | |
1558 | $ hg branch test |
|
1576 | $ hg branch test | |
1559 | marked working directory as branch test |
|
1577 | marked working directory as branch test | |
1560 | (branches are permanent and global, did you want a bookmark?) |
|
1578 | (branches are permanent and global, did you want a bookmark?) | |
1561 | $ echo "bbb" >> a |
|
1579 | $ echo "bbb" >> a | |
1562 | $ hg status |
|
1580 | $ hg status | |
1563 | M a |
|
1581 | M a | |
1564 | $ hg shelve |
|
1582 | $ hg shelve | |
1565 | shelved as default |
|
1583 | shelved as default | |
1566 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1584 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1567 | $ hg branch |
|
1585 | $ hg branch | |
1568 | default |
|
1586 | default | |
1569 | $ echo "ccc" >> a |
|
1587 | $ echo "ccc" >> a | |
1570 | $ hg status |
|
1588 | $ hg status | |
1571 | M a |
|
1589 | M a | |
1572 | $ hg unshelve |
|
1590 | $ hg unshelve | |
1573 | unshelving change 'default' |
|
1591 | unshelving change 'default' | |
1574 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1592 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1575 | rebasing shelved changes |
|
1593 | rebasing shelved changes | |
1576 | merging a |
|
1594 | merging a | |
1577 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
1595 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
1578 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1596 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1579 | [1] |
|
1597 | [1] | |
1580 | $ echo "aaabbbccc" > a |
|
1598 | $ echo "aaabbbccc" > a | |
1581 | $ rm a.orig |
|
1599 | $ rm a.orig | |
1582 | $ hg resolve --mark a |
|
1600 | $ hg resolve --mark a | |
1583 | (no more unresolved files) |
|
1601 | (no more unresolved files) | |
1584 | continue: hg unshelve --continue |
|
1602 | continue: hg unshelve --continue | |
1585 | $ hg unshelve --continue |
|
1603 | $ hg unshelve --continue | |
1586 | marked working directory as branch test |
|
1604 | marked working directory as branch test | |
1587 | unshelve of 'default' complete |
|
1605 | unshelve of 'default' complete | |
1588 | $ cat a |
|
1606 | $ cat a | |
1589 | aaabbbccc |
|
1607 | aaabbbccc | |
1590 | $ hg status |
|
1608 | $ hg status | |
1591 | M a |
|
1609 | M a | |
1592 | $ hg branch |
|
1610 | $ hg branch | |
1593 | test |
|
1611 | test | |
1594 | $ hg commit -m "test-commit" |
|
1612 | $ hg commit -m "test-commit" | |
1595 |
|
1613 | |||
1596 | When i shelve on test branch, update to default branch |
|
1614 | When i shelve on test branch, update to default branch | |
1597 | and unshelve i expect that it will not preserve previous |
|
1615 | and unshelve i expect that it will not preserve previous | |
1598 | test branch. |
|
1616 | test branch. | |
1599 |
|
1617 | |||
1600 | $ echo "xxx" > b |
|
1618 | $ echo "xxx" > b | |
1601 | $ hg add b |
|
1619 | $ hg add b | |
1602 | $ hg shelve |
|
1620 | $ hg shelve | |
1603 | shelved as test |
|
1621 | shelved as test | |
1604 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1622 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1605 | $ hg update -r 7049e48789d7 |
|
1623 | $ hg update -r 7049e48789d7 | |
1606 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1624 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1607 | $ hg unshelve |
|
1625 | $ hg unshelve | |
1608 | unshelving change 'test' |
|
1626 | unshelving change 'test' | |
1609 | rebasing shelved changes |
|
1627 | rebasing shelved changes | |
1610 | $ hg status |
|
1628 | $ hg status | |
1611 | A b |
|
1629 | A b | |
1612 | $ hg branch |
|
1630 | $ hg branch | |
1613 | default |
|
1631 | default | |
1614 | $ cd .. |
|
1632 | $ cd .. | |
1615 |
|
1633 | |||
1616 | When i unshelve resulting in merge conflicts and makes saved |
|
1634 | When i unshelve resulting in merge conflicts and makes saved | |
1617 | file shelvedstate looks like in previous versions in |
|
1635 | file shelvedstate looks like in previous versions in | |
1618 | mercurial(without restore branch information in 7th line) i |
|
1636 | mercurial(without restore branch information in 7th line) i | |
1619 | expect that after resolving conflicts and successfully |
|
1637 | expect that after resolving conflicts and successfully | |
1620 | running 'shelve --continue' the branch information won't be |
|
1638 | running 'shelve --continue' the branch information won't be | |
1621 | restored and branch will be unchanged. |
|
1639 | restored and branch will be unchanged. | |
1622 |
|
1640 | |||
1623 | shelve on new branch, conflict with previous shelvedstate |
|
1641 | shelve on new branch, conflict with previous shelvedstate | |
1624 |
|
1642 | |||
1625 | $ hg init conflict |
|
1643 | $ hg init conflict | |
1626 | $ cd conflict |
|
1644 | $ cd conflict | |
1627 | $ echo "aaa" >> a |
|
1645 | $ echo "aaa" >> a | |
1628 | $ hg commit -A -m "a" |
|
1646 | $ hg commit -A -m "a" | |
1629 | adding a |
|
1647 | adding a | |
1630 | $ hg branch |
|
1648 | $ hg branch | |
1631 | default |
|
1649 | default | |
1632 | $ hg branch test |
|
1650 | $ hg branch test | |
1633 | marked working directory as branch test |
|
1651 | marked working directory as branch test | |
1634 | (branches are permanent and global, did you want a bookmark?) |
|
1652 | (branches are permanent and global, did you want a bookmark?) | |
1635 | $ echo "bbb" >> a |
|
1653 | $ echo "bbb" >> a | |
1636 | $ hg status |
|
1654 | $ hg status | |
1637 | M a |
|
1655 | M a | |
1638 | $ hg shelve |
|
1656 | $ hg shelve | |
1639 | shelved as default |
|
1657 | shelved as default | |
1640 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1658 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1641 | $ hg branch |
|
1659 | $ hg branch | |
1642 | default |
|
1660 | default | |
1643 | $ echo "ccc" >> a |
|
1661 | $ echo "ccc" >> a | |
1644 | $ hg status |
|
1662 | $ hg status | |
1645 | M a |
|
1663 | M a | |
1646 | $ hg unshelve |
|
1664 | $ hg unshelve | |
1647 | unshelving change 'default' |
|
1665 | unshelving change 'default' | |
1648 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1666 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1649 | rebasing shelved changes |
|
1667 | rebasing shelved changes | |
1650 | merging a |
|
1668 | merging a | |
1651 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
1669 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
1652 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1670 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1653 | [1] |
|
1671 | [1] | |
1654 |
|
1672 | |||
1655 | Removing restore branch information from shelvedstate file(making it looks like |
|
1673 | Removing restore branch information from shelvedstate file(making it looks like | |
1656 | in previous versions) and running unshelve --continue |
|
1674 | in previous versions) and running unshelve --continue | |
1657 |
|
1675 | |||
1658 | $ cp .hg/shelvedstate .hg/shelvedstate_old |
|
1676 | $ cp .hg/shelvedstate .hg/shelvedstate_old | |
1659 | $ cat .hg/shelvedstate_old | grep -v 'branchtorestore' > .hg/shelvedstate |
|
1677 | $ cat .hg/shelvedstate_old | grep -v 'branchtorestore' > .hg/shelvedstate | |
1660 |
|
1678 | |||
1661 | $ echo "aaabbbccc" > a |
|
1679 | $ echo "aaabbbccc" > a | |
1662 | $ rm a.orig |
|
1680 | $ rm a.orig | |
1663 | $ hg resolve --mark a |
|
1681 | $ hg resolve --mark a | |
1664 | (no more unresolved files) |
|
1682 | (no more unresolved files) | |
1665 | continue: hg unshelve --continue |
|
1683 | continue: hg unshelve --continue | |
1666 | $ hg unshelve --continue |
|
1684 | $ hg unshelve --continue | |
1667 | unshelve of 'default' complete |
|
1685 | unshelve of 'default' complete | |
1668 | $ cat a |
|
1686 | $ cat a | |
1669 | aaabbbccc |
|
1687 | aaabbbccc | |
1670 | $ hg status |
|
1688 | $ hg status | |
1671 | M a |
|
1689 | M a | |
1672 | $ hg branch |
|
1690 | $ hg branch | |
1673 | default |
|
1691 | default | |
1674 | $ cd .. |
|
1692 | $ cd .. | |
1675 |
|
1693 | |||
1676 | On non bare shelve the branch information shouldn't be restored |
|
1694 | On non bare shelve the branch information shouldn't be restored | |
1677 |
|
1695 | |||
1678 | $ hg init bare_shelve_on_new_branch |
|
1696 | $ hg init bare_shelve_on_new_branch | |
1679 | $ cd bare_shelve_on_new_branch |
|
1697 | $ cd bare_shelve_on_new_branch | |
1680 | $ echo "aaa" >> a |
|
1698 | $ echo "aaa" >> a | |
1681 | $ hg commit -A -m "a" |
|
1699 | $ hg commit -A -m "a" | |
1682 | adding a |
|
1700 | adding a | |
1683 | $ hg branch |
|
1701 | $ hg branch | |
1684 | default |
|
1702 | default | |
1685 | $ hg branch test |
|
1703 | $ hg branch test | |
1686 | marked working directory as branch test |
|
1704 | marked working directory as branch test | |
1687 | (branches are permanent and global, did you want a bookmark?) |
|
1705 | (branches are permanent and global, did you want a bookmark?) | |
1688 | $ echo "bbb" >> a |
|
1706 | $ echo "bbb" >> a | |
1689 | $ hg status |
|
1707 | $ hg status | |
1690 | M a |
|
1708 | M a | |
1691 | $ hg shelve a |
|
1709 | $ hg shelve a | |
1692 | shelved as default |
|
1710 | shelved as default | |
1693 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1711 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1694 | $ hg branch |
|
1712 | $ hg branch | |
1695 | test |
|
1713 | test | |
1696 | $ hg branch default |
|
1714 | $ hg branch default | |
1697 | marked working directory as branch default |
|
1715 | marked working directory as branch default | |
1698 | (branches are permanent and global, did you want a bookmark?) |
|
1716 | (branches are permanent and global, did you want a bookmark?) | |
1699 | $ echo "bbb" >> b |
|
1717 | $ echo "bbb" >> b | |
1700 | $ hg status |
|
1718 | $ hg status | |
1701 | ? b |
|
1719 | ? b | |
1702 | $ hg unshelve |
|
1720 | $ hg unshelve | |
1703 | unshelving change 'default' |
|
1721 | unshelving change 'default' | |
1704 | $ hg status |
|
1722 | $ hg status | |
1705 | M a |
|
1723 | M a | |
1706 | ? b |
|
1724 | ? b | |
1707 | $ hg branch |
|
1725 | $ hg branch | |
1708 | default |
|
1726 | default | |
1709 | $ cd .. |
|
1727 | $ cd .. | |
1710 |
|
1728 | |||
1711 | Prepare unshelve with a corrupted shelvedstate |
|
1729 | Prepare unshelve with a corrupted shelvedstate | |
1712 | $ hg init r1 && cd r1 |
|
1730 | $ hg init r1 && cd r1 | |
1713 | $ echo text1 > file && hg add file |
|
1731 | $ echo text1 > file && hg add file | |
1714 | $ hg shelve |
|
1732 | $ hg shelve | |
1715 | shelved as default |
|
1733 | shelved as default | |
1716 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1734 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1717 | $ echo text2 > file && hg ci -Am text1 |
|
1735 | $ echo text2 > file && hg ci -Am text1 | |
1718 | adding file |
|
1736 | adding file | |
1719 | $ hg unshelve |
|
1737 | $ hg unshelve | |
1720 | unshelving change 'default' |
|
1738 | unshelving change 'default' | |
1721 | rebasing shelved changes |
|
1739 | rebasing shelved changes | |
1722 | merging file |
|
1740 | merging file | |
1723 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') |
|
1741 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') | |
1724 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1742 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1725 | [1] |
|
1743 | [1] | |
1726 | $ echo somethingsomething > .hg/shelvedstate |
|
1744 | $ echo somethingsomething > .hg/shelvedstate | |
1727 |
|
1745 | |||
1728 | Unshelve --continue fails with appropriate message if shelvedstate is corrupted |
|
1746 | Unshelve --continue fails with appropriate message if shelvedstate is corrupted | |
1729 | $ hg unshelve --continue |
|
1747 | $ hg unshelve --continue | |
1730 | abort: corrupted shelved state file |
|
1748 | abort: corrupted shelved state file | |
1731 | (please run hg unshelve --abort to abort unshelve operation) |
|
1749 | (please run hg unshelve --abort to abort unshelve operation) | |
1732 | [255] |
|
1750 | [255] | |
1733 |
|
1751 | |||
1734 | Unshelve --abort works with a corrupted shelvedstate |
|
1752 | Unshelve --abort works with a corrupted shelvedstate | |
1735 | $ hg unshelve --abort |
|
1753 | $ hg unshelve --abort | |
1736 | could not read shelved state file, your working copy may be in an unexpected state |
|
1754 | could not read shelved state file, your working copy may be in an unexpected state | |
1737 | please update to some commit |
|
1755 | please update to some commit | |
1738 |
|
1756 | |||
1739 | Unshelve --abort fails with appropriate message if there's no unshelve in |
|
1757 | Unshelve --abort fails with appropriate message if there's no unshelve in | |
1740 | progress |
|
1758 | progress | |
1741 | $ hg unshelve --abort |
|
1759 | $ hg unshelve --abort | |
1742 | abort: no unshelve in progress |
|
1760 | abort: no unshelve in progress | |
1743 | [255] |
|
1761 | [255] | |
1744 | $ cd .. |
|
1762 | $ cd .. | |
1745 |
|
1763 | |||
1746 | Unshelve respects --keep even if user intervention is needed |
|
1764 | Unshelve respects --keep even if user intervention is needed | |
1747 | $ hg init unshelvekeep && cd unshelvekeep |
|
1765 | $ hg init unshelvekeep && cd unshelvekeep | |
1748 | $ echo 1 > file && hg ci -Am 1 |
|
1766 | $ echo 1 > file && hg ci -Am 1 | |
1749 | adding file |
|
1767 | adding file | |
1750 | $ echo 2 >> file |
|
1768 | $ echo 2 >> file | |
1751 | $ hg shelve |
|
1769 | $ hg shelve | |
1752 | shelved as default |
|
1770 | shelved as default | |
1753 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1771 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1754 | $ echo 3 >> file && hg ci -Am 13 |
|
1772 | $ echo 3 >> file && hg ci -Am 13 | |
1755 | $ hg shelve --list |
|
1773 | $ hg shelve --list | |
1756 | default (*s ago) * changes to: 1 (glob) |
|
1774 | default (*s ago) * changes to: 1 (glob) | |
1757 | $ hg unshelve --keep |
|
1775 | $ hg unshelve --keep | |
1758 | unshelving change 'default' |
|
1776 | unshelving change 'default' | |
1759 | rebasing shelved changes |
|
1777 | rebasing shelved changes | |
1760 | merging file |
|
1778 | merging file | |
1761 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') |
|
1779 | warning: conflicts while merging file! (edit, then use 'hg resolve --mark') | |
1762 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1780 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1763 | [1] |
|
1781 | [1] | |
1764 | $ hg resolve --mark file |
|
1782 | $ hg resolve --mark file | |
1765 | (no more unresolved files) |
|
1783 | (no more unresolved files) | |
1766 | continue: hg unshelve --continue |
|
1784 | continue: hg unshelve --continue | |
1767 | $ hg unshelve --continue |
|
1785 | $ hg unshelve --continue | |
1768 | unshelve of 'default' complete |
|
1786 | unshelve of 'default' complete | |
1769 | $ hg shelve --list |
|
1787 | $ hg shelve --list | |
1770 | default (*s ago) * changes to: 1 (glob) |
|
1788 | default (*s ago) * changes to: 1 (glob) | |
1771 | $ cd .. |
|
1789 | $ cd .. | |
1772 |
|
1790 | |||
1773 | Unshelving when there are deleted files does not crash (issue4176) |
|
1791 | Unshelving when there are deleted files does not crash (issue4176) | |
1774 | $ hg init unshelve-deleted-file && cd unshelve-deleted-file |
|
1792 | $ hg init unshelve-deleted-file && cd unshelve-deleted-file | |
1775 | $ echo a > a && echo b > b && hg ci -Am ab |
|
1793 | $ echo a > a && echo b > b && hg ci -Am ab | |
1776 | adding a |
|
1794 | adding a | |
1777 | adding b |
|
1795 | adding b | |
1778 | $ echo aa > a && hg shelve |
|
1796 | $ echo aa > a && hg shelve | |
1779 | shelved as default |
|
1797 | shelved as default | |
1780 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1798 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1781 | $ rm b |
|
1799 | $ rm b | |
1782 | $ hg st |
|
1800 | $ hg st | |
1783 | ! b |
|
1801 | ! b | |
1784 | $ hg unshelve |
|
1802 | $ hg unshelve | |
1785 | unshelving change 'default' |
|
1803 | unshelving change 'default' | |
1786 | $ hg shelve |
|
1804 | $ hg shelve | |
1787 | shelved as default |
|
1805 | shelved as default | |
1788 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1806 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1789 | $ rm a && echo b > b |
|
1807 | $ rm a && echo b > b | |
1790 | $ hg st |
|
1808 | $ hg st | |
1791 | ! a |
|
1809 | ! a | |
1792 | $ hg unshelve |
|
1810 | $ hg unshelve | |
1793 | unshelving change 'default' |
|
1811 | unshelving change 'default' | |
1794 | abort: shelved change touches missing files |
|
1812 | abort: shelved change touches missing files | |
1795 | (run hg status to see which files are missing) |
|
1813 | (run hg status to see which files are missing) | |
1796 | [255] |
|
1814 | [255] | |
1797 | $ hg st |
|
1815 | $ hg st | |
1798 | ! a |
|
1816 | ! a | |
1799 | $ cd .. |
|
1817 | $ cd .. | |
1800 |
|
1818 | |||
1801 | New versions of Mercurial know how to read onld shelvedstate files |
|
1819 | New versions of Mercurial know how to read onld shelvedstate files | |
1802 | $ hg init oldshelvedstate |
|
1820 | $ hg init oldshelvedstate | |
1803 | $ cd oldshelvedstate |
|
1821 | $ cd oldshelvedstate | |
1804 | $ echo root > root && hg ci -Am root |
|
1822 | $ echo root > root && hg ci -Am root | |
1805 | adding root |
|
1823 | adding root | |
1806 | $ echo 1 > a |
|
1824 | $ echo 1 > a | |
1807 | $ hg add a |
|
1825 | $ hg add a | |
1808 | $ hg shelve --name ashelve |
|
1826 | $ hg shelve --name ashelve | |
1809 | shelved as ashelve |
|
1827 | shelved as ashelve | |
1810 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1828 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1811 | $ echo 2 > a |
|
1829 | $ echo 2 > a | |
1812 | $ hg ci -Am a |
|
1830 | $ hg ci -Am a | |
1813 | adding a |
|
1831 | adding a | |
1814 | $ hg unshelve |
|
1832 | $ hg unshelve | |
1815 | unshelving change 'ashelve' |
|
1833 | unshelving change 'ashelve' | |
1816 | rebasing shelved changes |
|
1834 | rebasing shelved changes | |
1817 | merging a |
|
1835 | merging a | |
1818 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
1836 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
1819 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1837 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1820 | [1] |
|
1838 | [1] | |
1821 | putting v1 shelvedstate file in place of a created v2 |
|
1839 | putting v1 shelvedstate file in place of a created v2 | |
1822 | $ cat << EOF > .hg/shelvedstate |
|
1840 | $ cat << EOF > .hg/shelvedstate | |
1823 | > 1 |
|
1841 | > 1 | |
1824 | > ashelve |
|
1842 | > ashelve | |
1825 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d |
|
1843 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d | |
1826 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d |
|
1844 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d | |
1827 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d f543b27db2cdb41737e2e0008dc524c471da1446 |
|
1845 | > 8b058dae057a5a78f393f4535d9e363dd5efac9d f543b27db2cdb41737e2e0008dc524c471da1446 | |
1828 | > f543b27db2cdb41737e2e0008dc524c471da1446 |
|
1846 | > f543b27db2cdb41737e2e0008dc524c471da1446 | |
1829 | > |
|
1847 | > | |
1830 | > nokeep |
|
1848 | > nokeep | |
1831 | > :no-active-bookmark |
|
1849 | > :no-active-bookmark | |
1832 | > EOF |
|
1850 | > EOF | |
1833 | $ echo 1 > a |
|
1851 | $ echo 1 > a | |
1834 | $ hg resolve --mark a |
|
1852 | $ hg resolve --mark a | |
1835 | (no more unresolved files) |
|
1853 | (no more unresolved files) | |
1836 | continue: hg unshelve --continue |
|
1854 | continue: hg unshelve --continue | |
1837 | mercurial does not crash |
|
1855 | mercurial does not crash | |
1838 | $ hg unshelve --continue |
|
1856 | $ hg unshelve --continue | |
1839 | unshelve of 'ashelve' complete |
|
1857 | unshelve of 'ashelve' complete | |
1840 |
|
1858 | |||
1841 | #if phasebased |
|
1859 | #if phasebased | |
1842 |
|
1860 | |||
1843 | Unshelve without .shelve metadata: |
|
1861 | Unshelve without .shelve metadata: | |
1844 |
|
1862 | |||
1845 | $ hg shelve |
|
1863 | $ hg shelve | |
1846 | shelved as default |
|
1864 | shelved as default | |
1847 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1865 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1848 | $ cat .hg/shelved/default.shelve |
|
1866 | $ cat .hg/shelved/default.shelve | |
1849 | node=82e0cb9893247d12667017593ce1e5655860f1ac |
|
1867 | node=82e0cb9893247d12667017593ce1e5655860f1ac | |
1850 | $ hg strip --hidden --rev 82e0cb989324 --no-backup |
|
1868 | $ hg strip --hidden --rev 82e0cb989324 --no-backup | |
1851 | $ rm .hg/shelved/default.shelve |
|
1869 | $ rm .hg/shelved/default.shelve | |
1852 | $ echo 3 > a |
|
1870 | $ echo 3 > a | |
1853 | $ hg unshelve |
|
1871 | $ hg unshelve | |
1854 | unshelving change 'default' |
|
1872 | unshelving change 'default' | |
1855 | temporarily committing pending changes (restore with 'hg unshelve --abort') |
|
1873 | temporarily committing pending changes (restore with 'hg unshelve --abort') | |
1856 | rebasing shelved changes |
|
1874 | rebasing shelved changes | |
1857 | merging a |
|
1875 | merging a | |
1858 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
1876 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
1859 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') |
|
1877 | unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue') | |
1860 | [1] |
|
1878 | [1] | |
1861 | $ cat .hg/shelved/default.shelve |
|
1879 | $ cat .hg/shelved/default.shelve | |
1862 | node=82e0cb9893247d12667017593ce1e5655860f1ac |
|
1880 | node=82e0cb9893247d12667017593ce1e5655860f1ac | |
1863 |
|
1881 | |||
1864 | #endif |
|
1882 | #endif | |
1865 |
|
1883 | |||
1866 | $ cd .. |
|
1884 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now