Commit 7b0b01bb authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

evolvecmd: mark relocate() private

parent 967e9a87e82d
......@@ -178,8 +178,8 @@ def _solveunstable(ui, repo, orig, evolvestate, displayer, dryrun=False,
if progresscb:
progresscb()
with state.saver(evolvestate, {b'current': orig.node()}):
newid = relocate(repo, orig, target, evolvestate, pctx,
keepbranch, b'orphan')
newid = _relocate(repo, orig, target, evolvestate, pctx,
keepbranch, b'orphan')
return (True, newid)
def _solvephasedivergence(ui, repo, bumped, evolvestate, displayer,
......@@ -237,8 +237,8 @@ def _solvephasedivergence(ui, repo, bumped, evolvestate, displayer,
_(b'rebasing to destination parent: %s\n') % prec.p1())
with state.saver(evolvestate, {b'current': bumped.hex(),
b'precursor': prec.hex()}):
newnode = relocate(repo, bumped, prec.p1(), evolvestate,
category=b'phasedivergent')
newnode = _relocate(repo, bumped, prec.p1(), evolvestate,
category=b'phasedivergent')
if newnode is not None:
new = repo[newnode]
obsolete.createmarkers(repo, [(bumped, (new,))],
......@@ -517,8 +517,8 @@ def _solvedivergent(ui, repo, divergent, evolvestate, displayer, dryrun=False,
ui.status(_(b'rebasing "divergent" content-divergent changeset %s on'
b' %s\n' % (divergent, repo[succsdivp1])))
with state.saver(evolvestate, {b'current': divergent.node()}):
newdivergent = relocate(repo, divergent, repo[succsdivp1],
evolvestate, keepbranch=True)
newdivergent = _relocate(repo, divergent, repo[succsdivp1],
evolvestate, keepbranch=True)
divergent = repo[newdivergent]
evolvestate[b'relocating-div'] = False
evolvestate[b'relocated-div'] = divergent.node()
......@@ -538,8 +538,8 @@ def _solvedivergent(ui, repo, divergent, evolvestate, displayer, dryrun=False,
ui.status(_(b'rebasing "other" content-divergent changeset %s on'
b' %s\n' % (other, divergent.p1())))
with state.saver(evolvestate, {b'current': other.node()}):
newother = relocate(repo, other, divergent.p1(), evolvestate,
keepbranch=True)
newother = _relocate(repo, other, divergent.p1(), evolvestate,
keepbranch=True)
evolvestate[b'old-other'] = other.node()
other = repo[newother]
evolvestate[b'relocating-other'] = False
......@@ -955,8 +955,8 @@ def _orderrevs(repo, revs):
ordering.extend(sorted(dependencies))
return ordering
def relocate(repo, orig, dest, evolvestate, 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
......@@ -2039,8 +2039,8 @@ def _continuecontentdivergent(ui, repo, evolvestate, progresscb):
ui.status(_(b'rebasing "other" content-divergent changeset %s on'
b' %s\n' % (other, divergent.p1())))
with state.saver(evolvestate, {b'current': other.node()}):
newother = relocate(repo, other, divergent.p1(), evolvestate,
keepbranch=True)
newother = _relocate(repo, other, divergent.p1(),
evolvestate, keepbranch=True)
evolvestate[b'old-other'] = other.node()
other = repo[newother]
evolvestate[b'relocating-other'] = False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment