changeset 6076:be9c35a8501d

precheck: do not check for new divergence if divergence allowed
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Wed, 27 Oct 2021 00:20:24 +0530
parents 399ea41d5e37
children c5cb95d677bc
files hgext3rd/evolve/rewriteutil.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/rewriteutil.py	Fri Oct 15 11:37:42 2021 +0300
+++ b/hgext3rd/evolve/rewriteutil.py	Wed Oct 27 00:20:24 2021 +0530
@@ -85,9 +85,11 @@
         msg %= (action, len(newunstable))
         hint = _(b"see 'hg help evolution.instability'")
         raise error.Abort(msg, hint=hint)
+    allowdivergence = compat.isenabled(repo, compat.allowdivergenceopt)
+    if allowdivergence:
+        return
     divrisk = revs_hascontentdivrisk(repo, revs)
-    allowdivergence = compat.isenabled(repo, compat.allowdivergenceopt)
-    if divrisk and not allowdivergence:
+    if divrisk:
         localdiv = repo[divrisk[0]]
         otherdiv, base = repo[divrisk[1][0]], repo[divrisk[1][1]]
         msg = _(b"%s of %s creates content-divergence "