Mercurial > evolve
diff hgext/obsolete.py @ 150:f12fd2410a60
obsolete: improve rebase compat
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 20 Mar 2012 15:10:53 +0100 |
parents | 8e93e1f67205 |
children | 24346b78cd99 |
line wrap: on
line diff
--- a/hgext/obsolete.py Tue Mar 20 11:02:11 2012 +0100 +++ b/hgext/obsolete.py Tue Mar 20 15:10:53 2012 +0100 @@ -189,6 +189,13 @@ ### Other Extension compat ############################ + +def buildstate(orig, repo, dest, rebaseset, detach): + """wrapper for rebase 's buildstate that exclude obsolete changeset""" + rebaseset = repo.revs('%ld - extinct()', rebaseset) + return orig(repo, dest, rebaseset, detach) + + def concludenode(orig, repo, rev, *args, **kwargs): """wrapper for rebase 's concludenode that set obsolete relation""" newrev = orig(repo, rev, *args, **kwargs) @@ -219,6 +226,7 @@ try: rebase = extensions.find('rebase') if rebase: + extensions.wrapfunction(rebase, 'buildstate', buildstate) extensions.wrapfunction(rebase, 'concludenode', concludenode) extensions.wrapcommand(rebase.cmdtable, "rebase", cmdrebase) except KeyError: