Commits

Patrick Mézard  committed 6622a24

obsolete: fix rebase wrapping

ui and repo arguments were swapped which made --keep calls traceback.

  • Participants
  • Parent commits 87e4d1e
  • Branches default

Comments (0)

Files changed (2)

File hgext/obsolete.py

     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)
 
 
 

File tests/test-obsolete.t

   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)