equal
deleted
inserted
replaced
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 |