hgext/evolve.py
changeset 255 9852b3ef7234
parent 232 adb7e29cb2bd
child 258 8337bb3bb958
equal deleted inserted replaced
254:3ff969da57ef 255:9852b3ef7234
   154         rebase = extensions.find('rebase')
   154         rebase = extensions.find('rebase')
   155         # dummy state to trick rebase node
   155         # dummy state to trick rebase node
   156         assert orig.p2().rev() == node.nullrev, 'no support yet'
   156         assert orig.p2().rev() == node.nullrev, 'no support yet'
   157         destbookmarks = repo.nodebookmarks(dest.node())
   157         destbookmarks = repo.nodebookmarks(dest.node())
   158         cmdutil.duplicatecopies(repo, orig.node(), dest.node())
   158         cmdutil.duplicatecopies(repo, orig.node(), dest.node())
   159         rebase.rebasenode(repo, orig.node(), dest.node(), {node.nullrev: node.nullrev})
   159         if rebase.rebasenode.func_code.co_argcount == 5:
       
   160             # rebasenode collapse argument was introduced by
       
   161             # d1afbf03e69a (2.3)
       
   162             rebase.rebasenode(repo, orig.node(), dest.node(),
       
   163                               {node.nullrev: node.nullrev}, False)
       
   164         else:
       
   165             rebase.rebasenode(repo, orig.node(), dest.node(),
       
   166                               {node.nullrev: node.nullrev})
   160         nodenew = rebase.concludenode(repo, orig.node(), dest.node(), node.nullid)
   167         nodenew = rebase.concludenode(repo, orig.node(), dest.node(), node.nullid)
   161         nodesrc = orig.node()
   168         nodesrc = orig.node()
   162         repo.addobsolete(nodenew, nodesrc)
   169         repo.addobsolete(nodenew, nodesrc)
   163         phases.retractboundary(repo, repo[nodesrc].phase(), [nodenew])
   170         phases.retractboundary(repo, repo[nodesrc].phase(), [nodenew])
   164         oldbookmarks = repo.nodebookmarks(nodesrc)
   171         oldbookmarks = repo.nodebookmarks(nodesrc)