# HG changeset patch # User Wagner Bruna # Date 1287433898 7200 # Node ID c3316b6a32198a2a8257691a1233a9231222e503 # Parent 21a50fe47a9286c726c77afc4ca53c429847727e strip: support revision sets diff -r 21a50fe47a92 -r c3316b6a3219 hgext/mq.py --- a/hgext/mq.py Sat Oct 16 18:09:47 2010 -0500 +++ b/hgext/mq.py Mon Oct 18 18:31:38 2010 -0200 @@ -2489,7 +2489,9 @@ backup = 'none' cl = repo.changelog - revs = set(cl.rev(repo.lookup(r)) for r in revs) + revs = set(cmdutil.revrange(repo, revs)) + if not revs: + raise util.Abort("empty revision set") descendants = set(cl.descendants(*revs)) strippedrevs = revs.union(descendants) diff -r 21a50fe47a92 -r c3316b6a3219 tests/test-mq-strip.t --- a/tests/test-mq-strip.t Sat Oct 16 18:09:47 2010 -0500 +++ b/tests/test-mq-strip.t Mon Oct 18 18:31:38 2010 -0200 @@ -257,7 +257,7 @@ 2 is parent of 3, only one strip should happen - $ hg strip 2 3 + $ hg strip "roots(2)" 3 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) $ hg glog @ changeset: 2:264128213d29 @@ -333,11 +333,16 @@ 2 different branches and a common ancestor: 1 strip - $ hg strip 1 2 4 + $ hg strip 1 "2|4" 1 files updated, 0 files merged, 0 files removed, 0 files unresolved saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) $ restore +stripping an empty revset + + $ hg strip "1 and not 1" + abort: empty revision set + [255] remove branchy history for qimport tests