Commits

Pierre-Yves David committed c4cc5f3

[obsolete] rebase always keep changeset.

  • Participants
  • Parent commits 97a5c94

Comments (0)

Files changed (1)

File hgext/obsolete.py

     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
 ############################
 
         rebase = extensions.find('rebase')
         if rebase:
             extensions.wrapfunction(rebase, 'concludenode', concludenode)
+            extensions.wrapcommand(rebase.cmdtable, "rebase", cmdrebase)
     except KeyError:
         pass # rebase not found