[Updated] D11222: fix: use obsolete.isenabled() to check for experimental.allowdivergence

av6 (Anton Shestakov) phabricator at mercurial-scm.org
Fri Jul 30 15:11:33 UTC 2021


Closed by commit rHG82c87566bfc0: fix: use obsolete.isenabled() to check for experimental.allowdivergence (authored by av6).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11222?vs=29729&id=29748

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11222/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11222

AFFECTED FILES
  hgext/fix.py

CHANGE DETAILS

diff --git a/hgext/fix.py b/hgext/fix.py
--- a/hgext/fix.py
+++ b/hgext/fix.py
@@ -147,6 +147,7 @@
     mdiff,
     merge,
     mergestate as mergestatemod,
+    obsolete,
     pycompat,
     registrar,
     rewriteutil,
@@ -451,10 +452,7 @@
     """Aborts if the revision shouldn't be replaced with a fixed one."""
     if ctx.obsolete():
         # It would be better to actually check if the revision has a successor.
-        allowdivergence = ui.configbool(
-            b'experimental', b'evolution.allowdivergence'
-        )
-        if not allowdivergence:
+        if not obsolete.isenabled(repo, obsolete.allowdivergenceopt):
             raise error.Abort(
                 b'fixing obsolete revision could cause divergence'
             )



To: av6, #hg-reviewers, marmoute
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210730/017d10be/attachment-0002.html>


More information about the Mercurial-patches mailing list