hgext/fix.py
branchstable
changeset 47797 e69c82bf3a01
parent 47767 66ad7e32011f
child 47859 155a2ec8a9dc
child 47886 86a60679cf61
equal deleted inserted replaced
47796:16c60e90a496 47797:e69c82bf3a01
   146     error,
   146     error,
   147     match as matchmod,
   147     match as matchmod,
   148     mdiff,
   148     mdiff,
   149     merge,
   149     merge,
   150     mergestate as mergestatemod,
   150     mergestate as mergestatemod,
       
   151     obsolete,
   151     pycompat,
   152     pycompat,
   152     registrar,
   153     registrar,
   153     rewriteutil,
   154     rewriteutil,
   154     scmutil,
   155     scmutil,
   155     util,
   156     util,
   450 
   451 
   451 def checkfixablectx(ui, repo, ctx):
   452 def checkfixablectx(ui, repo, ctx):
   452     """Aborts if the revision shouldn't be replaced with a fixed one."""
   453     """Aborts if the revision shouldn't be replaced with a fixed one."""
   453     if ctx.obsolete():
   454     if ctx.obsolete():
   454         # It would be better to actually check if the revision has a successor.
   455         # It would be better to actually check if the revision has a successor.
   455         allowdivergence = ui.configbool(
   456         if not obsolete.isenabled(repo, obsolete.allowdivergenceopt):
   456             b'experimental', b'evolution.allowdivergence'
       
   457         )
       
   458         if not allowdivergence:
       
   459             raise error.Abort(
   457             raise error.Abort(
   460                 b'fixing obsolete revision could cause divergence'
   458                 b'fixing obsolete revision could cause divergence'
   461             )
   459             )
   462 
   460 
   463 
   461