Mercurial > evolve
diff hgext/obsolete.py @ 84:c4cc5f3bcf12
[obsolete] rebase always keep changeset.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 19 Sep 2011 01:56:48 +0200 |
parents | 97a5c943db19 |
children | 531058dbd703 |
line wrap: on
line diff
--- a/hgext/obsolete.py Mon Sep 19 01:55:35 2011 +0200 +++ b/hgext/obsolete.py Mon Sep 19 01:56:48 2011 +0200 @@ -139,6 +139,14 @@ repo.addobsolete(newnode, oldnode) return newrev +def cmdrebase(orig, repo, ui, *args, **kwargs): + oldkeep = kwargs.pop('keep', False) + if oldkeep: + ui.warn('WARNING --keep option ignored by experimental obsolete extension') + kwargs['keep'] = True + return orig(repo, ui, *args, **kwargs) + + ### Filter obsolet changeset ############################ @@ -179,6 +187,7 @@ rebase = extensions.find('rebase') if rebase: extensions.wrapfunction(rebase, 'concludenode', concludenode) + extensions.wrapcommand(rebase.cmdtable, "rebase", cmdrebase) except KeyError: pass # rebase not found