Mercurial > evolve
changeset 151:e73944b6be8f
evolve: improve graft handling of -O
we now resolve changeset reference before graft
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 20 Mar 2012 15:18:10 +0100 |
parents | f12fd2410a60 |
children | 54c67d7f9eed |
files | hgext/evolve.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Tue Mar 20 15:10:53 2012 +0100 +++ b/hgext/evolve.py Tue Mar 20 15:18:10 2012 +0100 @@ -316,7 +316,7 @@ finally: wlock.release() -@command('^amend', +@command('^amend|refresh', [('A', 'addremove', None, _('mark new/missing files as added/removed before committing')), ('n', 'note', '', @@ -445,6 +445,14 @@ obsoleted.extend(repo.opener.read('graftstate').splitlines()) else: obsoleted.extend(revs) + # convert obsolete target into revs to avoid alias joke + obsoleted = kwargs.setdefault('obsolete', []) + obsoleted[:] = [str(i) for i in repo.revs('%lr', obsoleted)] + if obsoleted and len(revs) > 1: + + raise error.Abort(_('Can not graft multiple revision while ' + 'obsoleting (for now).')) + return commitwrapper(orig, ui, repo,*revs, **kwargs) finally: lock.release()