# HG changeset patch # User Pierre-Yves David # Date 1316390208 -7200 # Node ID c4cc5f3bcf1295b1e4d828cf0aa0ace2f0021d4e # Parent 97a5c943db1922f97eed76a50062993c5f3d0876 [obsolete] rebase always keep changeset. diff -r 97a5c943db19 -r c4cc5f3bcf12 hgext/obsolete.py --- 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