Show More
@@ -166,7 +166,8 b' def uncommit(ui, repo, *pats, **opts):' | |||||
166 |
|
166 | |||
167 | with repo.transaction('uncommit'): |
|
167 | with repo.transaction('uncommit'): | |
168 | match = scmutil.match(old, pats, opts) |
|
168 | match = scmutil.match(old, pats, opts) | |
169 | newid = _commitfiltered(repo, old, match, opts.get('keep')) |
|
169 | allowempty = opts.get('keep') or pats | |
|
170 | newid = _commitfiltered(repo, old, match, allowempty) | |||
170 | if newid is None: |
|
171 | if newid is None: | |
171 | ui.status(_("nothing to uncommit\n")) |
|
172 | ui.status(_("nothing to uncommit\n")) | |
172 | return 1 |
|
173 | return 1 |
@@ -158,7 +158,7 b' Uncommit with dirty state' | |||||
158 | $ cat files |
|
158 | $ cat files | |
159 | abcde |
|
159 | abcde | |
160 | foo |
|
160 | foo | |
161 | $ hg commit -m "files abcde + foo" |
|
161 | $ hg commit --amend -m "files abcde + foo" | |
162 |
|
162 | |||
163 | Testing the 'experimental.uncommitondirtywdir' config |
|
163 | Testing the 'experimental.uncommitondirtywdir' config | |
164 |
|
164 | |||
@@ -188,16 +188,16 b' Uncommit in the middle of a stack, does ' | |||||
188 | +abc |
|
188 | +abc | |
189 |
|
189 | |||
190 | $ hg bookmark |
|
190 | $ hg bookmark | |
191 |
foo |
|
191 | foo 10:48e5bd7cd583 | |
192 | $ hg uncommit |
|
192 | $ hg uncommit | |
193 | 3 new orphan changesets |
|
193 | 3 new orphan changesets | |
194 | $ hg status |
|
194 | $ hg status | |
195 | M files |
|
195 | M files | |
196 | A file-abc |
|
196 | A file-abc | |
197 | $ hg heads -T '{rev}:{node} {desc}' |
|
197 | $ hg heads -T '{rev}:{node} {desc}' | |
198 |
|
|
198 | 10:48e5bd7cd583eb24164ef8b89185819c84c96ed7 files abcde + foo (no-eol) | |
199 | $ hg bookmark |
|
199 | $ hg bookmark | |
200 |
foo |
|
200 | foo 10:48e5bd7cd583 | |
201 | $ hg commit -m 'new abc' |
|
201 | $ hg commit -m 'new abc' | |
202 | created new head |
|
202 | created new head | |
203 |
|
203 | |||
@@ -219,36 +219,38 b' Partial uncommit in the middle, does not' | |||||
219 | +ab |
|
219 | +ab | |
220 |
|
220 | |||
221 | $ hg bookmark |
|
221 | $ hg bookmark | |
222 |
foo |
|
222 | foo 10:48e5bd7cd583 | |
223 | $ hg uncommit file-ab |
|
223 | $ hg uncommit file-ab | |
224 | 1 new orphan changesets |
|
224 | 1 new orphan changesets | |
225 | $ hg status |
|
225 | $ hg status | |
226 | A file-ab |
|
226 | A file-ab | |
227 |
|
227 | |||
228 | $ hg heads -T '{rev}:{node} {desc}\n' |
|
228 | $ hg heads -T '{rev}:{node} {desc}\n' | |
229 |
1 |
|
229 | 12:8eb87968f2edb7f27f27fe676316e179de65fff6 added file-ab | |
230 |
1 |
|
230 | 11:5dc89ca4486f8a88716c5797fa9f498d13d7c2e1 new abc | |
231 |
|
|
231 | 10:48e5bd7cd583eb24164ef8b89185819c84c96ed7 files abcde + foo | |
232 |
|
232 | |||
233 | $ hg bookmark |
|
233 | $ hg bookmark | |
234 |
foo |
|
234 | foo 10:48e5bd7cd583 | |
235 | $ hg commit -m 'update ab' |
|
235 | $ hg commit -m 'update ab' | |
236 | $ hg status |
|
236 | $ hg status | |
237 | $ hg heads -T '{rev}:{node} {desc}\n' |
|
237 | $ hg heads -T '{rev}:{node} {desc}\n' | |
238 |
1 |
|
238 | 13:f21039c59242b085491bb58f591afc4ed1c04c09 update ab | |
239 |
1 |
|
239 | 11:5dc89ca4486f8a88716c5797fa9f498d13d7c2e1 new abc | |
240 |
|
|
240 | 10:48e5bd7cd583eb24164ef8b89185819c84c96ed7 files abcde + foo | |
241 |
|
241 | |||
242 | $ hg log -G -T '{rev}:{node} {desc}' --hidden |
|
242 | $ hg log -G -T '{rev}:{node} {desc}' --hidden | |
243 |
@ 1 |
|
243 | @ 13:f21039c59242b085491bb58f591afc4ed1c04c09 update ab | |
244 | | |
|
244 | | | |
245 |
o 1 |
|
245 | o 12:8eb87968f2edb7f27f27fe676316e179de65fff6 added file-ab | |
246 | | |
|
246 | | | |
247 |
| * 1 |
|
247 | | * 11:5dc89ca4486f8a88716c5797fa9f498d13d7c2e1 new abc | |
248 | | | |
|
248 | | | | |
249 |
| | * |
|
249 | | | * 10:48e5bd7cd583eb24164ef8b89185819c84c96ed7 files abcde + foo | |
250 | | | | |
|
250 | | | | | |
251 | | | | x 8:83815831694b1271e9f207cb1b79b2b19275edcb files abcde + foo |
|
251 | | | | x 9:8a6b58c173ca6a2e3745d8bd86698718d664bc6c files abcde + foo | |
|
252 | | | |/ | |||
|
253 | | | | x 8:39ad452c7f684a55d161c574340c5766c4569278 update files for abcde | |||
252 | | | |/ |
|
254 | | | |/ | |
253 | | | | x 7:0977fa602c2fd7d8427ed4e7ee15ea13b84c9173 update files for abcde |
|
255 | | | | x 7:0977fa602c2fd7d8427ed4e7ee15ea13b84c9173 update files for abcde | |
254 | | | |/ |
|
256 | | | |/ | |
@@ -270,7 +272,7 b' Uncommit with draft parent' | |||||
270 |
|
272 | |||
271 | $ hg uncommit |
|
273 | $ hg uncommit | |
272 | $ hg phase -r . |
|
274 | $ hg phase -r . | |
273 |
1 |
|
275 | 12: draft | |
274 | $ hg commit -m 'update ab again' |
|
276 | $ hg commit -m 'update ab again' | |
275 |
|
277 | |||
276 | Uncommit with public parent |
|
278 | Uncommit with public parent | |
@@ -278,7 +280,7 b' Uncommit with public parent' | |||||
278 | $ hg phase -p "::.^" |
|
280 | $ hg phase -p "::.^" | |
279 | $ hg uncommit |
|
281 | $ hg uncommit | |
280 | $ hg phase -r . |
|
282 | $ hg phase -r . | |
281 |
1 |
|
283 | 12: public | |
282 |
|
284 | |||
283 | Partial uncommit with public parent |
|
285 | Partial uncommit with public parent | |
284 |
|
286 | |||
@@ -289,9 +291,9 b' Partial uncommit with public parent' | |||||
289 | $ hg status |
|
291 | $ hg status | |
290 | A xyz |
|
292 | A xyz | |
291 | $ hg phase -r . |
|
293 | $ hg phase -r . | |
292 |
1 |
|
294 | 16: draft | |
293 | $ hg phase -r ".^" |
|
295 | $ hg phase -r ".^" | |
294 |
1 |
|
296 | 12: public | |
295 |
|
297 | |||
296 | Uncommit leaving an empty changeset |
|
298 | Uncommit leaving an empty changeset | |
297 |
|
299 |
General Comments 0
You need to be logged in to leave comments.
Login now