Show More
@@ -2489,7 +2489,9 b' def strip(ui, repo, *revs, **opts):' | |||||
2489 | backup = 'none' |
|
2489 | backup = 'none' | |
2490 |
|
2490 | |||
2491 | cl = repo.changelog |
|
2491 | cl = repo.changelog | |
2492 |
revs = set(cl.rev(repo |
|
2492 | revs = set(cmdutil.revrange(repo, revs)) | |
|
2493 | if not revs: | |||
|
2494 | raise util.Abort("empty revision set") | |||
2493 |
|
2495 | |||
2494 | descendants = set(cl.descendants(*revs)) |
|
2496 | descendants = set(cl.descendants(*revs)) | |
2495 | strippedrevs = revs.union(descendants) |
|
2497 | strippedrevs = revs.union(descendants) |
@@ -257,7 +257,7 b' after strip of merge parent' | |||||
257 |
|
257 | |||
258 | 2 is parent of 3, only one strip should happen |
|
258 | 2 is parent of 3, only one strip should happen | |
259 |
|
259 | |||
260 | $ hg strip 2 3 |
|
260 | $ hg strip "roots(2)" 3 | |
261 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
261 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
262 | $ hg glog |
|
262 | $ hg glog | |
263 | @ changeset: 2:264128213d29 |
|
263 | @ changeset: 2:264128213d29 | |
@@ -333,11 +333,16 b' 2 different branches: 2 strips' | |||||
333 |
|
333 | |||
334 | 2 different branches and a common ancestor: 1 strip |
|
334 | 2 different branches and a common ancestor: 1 strip | |
335 |
|
335 | |||
336 |
$ hg strip 1 |
|
336 | $ hg strip 1 "2|4" | |
337 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
337 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
338 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
|
338 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
339 | $ restore |
|
339 | $ restore | |
340 |
|
340 | |||
|
341 | stripping an empty revset | |||
|
342 | ||||
|
343 | $ hg strip "1 and not 1" | |||
|
344 | abort: empty revision set | |||
|
345 | [255] | |||
341 |
|
346 | |||
342 | remove branchy history for qimport tests |
|
347 | remove branchy history for qimport tests | |
343 |
|
348 |
General Comments 0
You need to be logged in to leave comments.
Login now