Mercurial > evolve
changeset 419:03672e955bc8
evolve: make graft wrapper handle --rev
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sat, 04 Aug 2012 12:44:51 +0200 |
parents | 984be08ef504 |
children | b6163a85ddac |
files | hgext/evolve.py tests/test-evolve.t |
diffstat | 2 files changed, 52 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Tue Jul 31 14:30:00 2012 +0200 +++ b/hgext/evolve.py Sat Aug 04 12:44:51 2012 +0200 @@ -634,6 +634,10 @@ lock.release() def graftwrapper(orig, ui, repo, *revs, **kwargs): + kwargs = dict(kwargs) + revs = list(revs) + kwargs.get('rev', []) + kwargs['rev'] = [] + lock = repo.lock() try: if kwargs.get('old_obsolete'):
--- a/tests/test-evolve.t Tue Jul 31 14:30:00 2012 +0200 +++ b/tests/test-evolve.t Sat Aug 04 12:44:51 2012 +0200 @@ -356,3 +356,51 @@ (run 'hg update' to get a working copy) $ hg up 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd .. + +Test graft --obsolete/--old-obsolete + + $ hg init test-graft + $ cd test-graft + $ mkcommit 0 + $ mkcommit 1 + $ mkcommit 2 + $ mkcommit 3 + $ hg up -qC 0 + $ mkcommit 4 + created new head + $ glog --hidden + @ 4:ce341209337f@default(draft) add 4 + | + | o 3:0e84df4912da@default(draft) add 3 + | | + | o 2:db038628b9e5@default(draft) add 2 + | | + | o 1:73d38bb17fd7@default(draft) add 1 + |/ + o 0:8685c6d34325@default(draft) add 0 + + $ hg graft -r3 -O + grafting revision 3 + $ hg graft -r1 -o 2 + grafting revision 1 + $ glog --hidden + @ 6:acb28cd497b7@default(draft) add 1 + | + o 5:0b9e50c35132@default(draft) add 3 + | + o 4:ce341209337f@default(draft) add 4 + | + | x 3:0e84df4912da@default(draft) add 3 + | | + | x 2:db038628b9e5@default(draft) add 2 + | | + | o 1:73d38bb17fd7@default(draft) add 1 + |/ + o 0:8685c6d34325@default(draft) add 0 + + $ hg debugsuccessors + 0e84df4912da 0b9e50c35132 + db038628b9e5 acb28cd497b7 + $ cd .. +