obsolete: fix rebase wrapping
authorPatrick Mezard <patrick@mezard.eu>
Tue, 19 Jun 2012 09:23:50 +0200
changeset 274 6622a24f3b0f
parent 273 87e4d1eec5e8
child 275 336210dada95
obsolete: fix rebase wrapping ui and repo arguments were swapped which made --keep calls traceback.
hgext/obsolete.py
tests/test-obsolete.t
--- a/hgext/obsolete.py	Tue Jun 19 10:02:32 2012 +0200
+++ b/hgext/obsolete.py	Tue Jun 19 09:23:50 2012 +0200
@@ -230,12 +230,12 @@
     repo.addobsolete(newnode, oldnode)
     return newrev
 
-def cmdrebase(orig, repo, ui, *args, **kwargs):
+def cmdrebase(orig, ui, repo, *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)
+    return orig(ui, repo, *args, **kwargs)
 
 
 
--- a/tests/test-obsolete.t	Tue Jun 19 10:02:32 2012 +0200
+++ b/tests/test-obsolete.t	Tue Jun 19 09:23:50 2012 +0200
@@ -453,3 +453,26 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
+  $ cd ..
+
+
+Test compatibility with other extensions
+
+  $ hg init compat
+  $ cd compat
+  $ echo a > a
+  $ hg ci -Am adda
+  adding a
+  $ echo a >> a
+  $ hg ci -m changea
+  $ hg up 0
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo b > b
+  $ hg ci -Am addb
+  adding b
+  created new head
+
+Test rebase --keep warning
+
+  $ hg --config extensions.rebase= rebase -d 1 --keep
+  WARNING --keep option ignored by experimental obsolete extension (no-eol)