Commits

Pierre-Yves David committed 8337bb3

Fix amend and relocate who picked phases data after extinct wher made secret

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())
+        nodesrc = orig.node()
+        destphase = repo[nodesrc].phase()
         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})
         nodenew = rebase.concludenode(repo, orig.node(), dest.node(), node.nullid)
-        nodesrc = orig.node()
+        phases.retractboundary(repo, destphase, [nodenew])
         repo.addobsolete(nodenew, nodesrc)
-        phases.retractboundary(repo, repo[nodesrc].phase(), [nodenew])
         oldbookmarks = repo.nodebookmarks(nodesrc)
         for book in oldbookmarks:
             repo._bookmarks[book] = nodenew
         try:
             if not old.phase():
                 raise util.Abort(_("can not rewrite immutable changeset %s") % old)
-
+            oldphase = old.phase()
             # commit current changes as update
             # code copied from commands.commit to avoid noisy messages
             ciopts = dict(opts)
                             [old.p1().node(), old.p2().node()], opts)
 
             # reroute the working copy parent to the new changeset
-            phases.retractboundary(repo, old.phase(), [newid])
+            phases.retractboundary(repo, oldphase, [newid])
             repo.dirstate.setparents(newid, node.nullid)
 
         finally:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.