hgext/obsolete.py
changeset 275 336210dada95
parent 274 6622a24f3b0f
child 276 f26e9bc5f7fc
--- a/hgext/obsolete.py	Tue Jun 19 09:23:50 2012 +0200
+++ b/hgext/obsolete.py	Wed Jun 20 15:42:01 2012 +0200
@@ -45,6 +45,12 @@
 A ``debugobsolete`` command was added. It adds an obsolete relation between two
 nodes.
 
+Note that rebased changesets are not marked obsolete rather than being stripped
+In this experimental extensions, this is done forcing the --keep option. Trying
+to use the --keep option of rebase with this extensionn this experimental
+extension will cause such a call to abort. Until better releasen please use
+graft command to rebase and copy changesets.
+
 Context object
 --------------
 
@@ -231,9 +237,10 @@
     return newrev
 
 def cmdrebase(orig, ui, repo, *args, **kwargs):
-    oldkeep = kwargs.pop('keep', False)
-    if oldkeep:
-        ui.warn('WARNING --keep option ignored by experimental obsolete extension')
+    if kwargs.get('keep', False):
+        raise util.Abort(_('rebase --keep option is unsupported with obsolete '
+                           'extension'), hint=_("see 'hg help obsolete'"))
+    kwargs = dict(kwargs)
     kwargs['keep'] = True
     return orig(ui, repo, *args, **kwargs)