Commit 9a561d1f authored by Sushil Khanchi's avatar Sushil Khanchi 🐨
Browse files

evolve: remove a check which is already done by rewriteutil.precheck()

We have tests to check if fold is being performed on public cset.
There is no changes in test files because testing that never touched
the part this patch removes, and already caught in rewriteutil.precheck()
parent 39d282fd04e0
Pipeline #2067 passed with stage
in 5 minutes and 48 seconds
......@@ -22,7 +22,6 @@ from mercurial import (
node,
obsolete,
obsutil,
phases,
revset,
util,
)
......@@ -123,9 +122,6 @@ def foldcheck(repo, revs):
if len(roots) > 1:
raise error.Abort(_(b"cannot fold non-linear revisions "
b"(multiple roots given)"))
root = repo[roots.first()]
if root.phase() <= phases.public:
raise error.Abort(_(b"cannot fold public revisions"))
heads = repo.revs(b'heads(%ld)', revs)
if len(heads) > 1:
raise error.Abort(_(b"cannot fold non-linear revisions "
......@@ -142,6 +138,7 @@ def foldcheck(repo, revs):
hint = _(b'set experimental.evolution.allowdivergence=yes'
b' to allow folding them')
raise error.Abort(msg, hint=hint)
root = repo[roots.first()]
# root's p1 is already used as the target ctx p1
baseparents -= {root.p1().rev()}
p2 = repo[baseparents.first()]
......
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