# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1522238634 -19800 # Node ID 7bc4a72b8a0b8df49946e06e1cf5f4008a1fa034 # Parent 1b9c2720faee1da0a02719482d6e14688ab35d1d evolve: add evolvestate as an argument to evolvecmd.relocate() This will help us in passing it to _finalizerelocate() and store the bookmark changes which happend. diff -r 1b9c2720faee -r 7bc4a72b8a0b hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Wed Mar 28 17:13:08 2018 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Wed Mar 28 17:33:54 2018 +0530 @@ -168,7 +168,8 @@ if progresscb: progresscb() try: - newid = relocate(repo, orig, target, pctx, keepbranch, 'orphan') + newid = relocate(repo, orig, target, evolvestate, pctx, + keepbranch, 'orphan') return (True, newid) except MergeFailure: ops = {'current': orig.node()} @@ -236,7 +237,8 @@ repo.ui.status( _('rebasing to destination parent: %s\n') % prec.p1()) try: - tmpid = relocate(repo, bumped, prec.p1(), category='phasedivergent') + tmpid = relocate(repo, bumped, prec.p1(), evolvestate, + category='phasedivergent') if tmpid is not None: tmpctx = repo[tmpid] compat.createmarkers(repo, [(bumped, (tmpctx,))], @@ -479,7 +481,8 @@ ordering.extend(sorted(dependencies)) return ordering -def relocate(repo, orig, dest, pctx=None, keepbranch=False, category=None): +def relocate(repo, orig, dest, evolvestate, pctx=None, keepbranch=False, + category=None): """rewrites the orig rev on dest rev returns the node of new commit which is formed