Commits

Pierre-Yves David committed 9852b3e

evolve: update rebase usage to match 2.3

Comments (0)

Files changed (1)

         assert orig.p2().rev() == node.nullrev, 'no support yet'
         destbookmarks = repo.nodebookmarks(dest.node())
         cmdutil.duplicatecopies(repo, orig.node(), dest.node())
-        rebase.rebasenode(repo, orig.node(), dest.node(), {node.nullrev: node.nullrev})
+        if rebase.rebasenode.func_code.co_argcount == 5:
+            # rebasenode collapse argument was introduced by
+            # d1afbf03e69a (2.3)
+            rebase.rebasenode(repo, orig.node(), dest.node(),
+                              {node.nullrev: node.nullrev}, False)
+        else:
+            rebase.rebasenode(repo, orig.node(), dest.node(),
+                              {node.nullrev: node.nullrev})
         nodenew = rebase.concludenode(repo, orig.node(), dest.node(), node.nullid)
         nodesrc = orig.node()
         repo.addobsolete(nodenew, nodesrc)