304 rebaseobsrevs, |
304 rebaseobsrevs, |
305 dest) |
305 dest) |
306 rebaseobsskipped = set(obsoletenotrebased) |
306 rebaseobsskipped = set(obsoletenotrebased) |
307 |
307 |
308 # Obsolete node with successors not in dest leads to divergence |
308 # Obsolete node with successors not in dest leads to divergence |
309 divergenceok = ui.configbool('rebase', |
309 divergenceok = ui.configbool('experimental', |
310 'allowdivergence') |
310 'allowdivergence') |
311 divergencebasecandidates = rebaseobsrevs - rebaseobsskipped |
311 divergencebasecandidates = rebaseobsrevs - rebaseobsskipped |
312 |
312 |
313 if divergencebasecandidates and not divergenceok: |
313 if divergencebasecandidates and not divergenceok: |
314 divhashes = (str(repo[r]) |
314 divhashes = (str(repo[r]) |
315 for r in divergencebasecandidates) |
315 for r in divergencebasecandidates) |
316 msg = _("this rebase will cause " |
316 msg = _("this rebase will cause " |
317 "divergences from: %s") |
317 "divergences from: %s") |
318 h = _("to force the rebase please set " |
318 h = _("to force the rebase please set " |
319 "rebase.allowdivergence=True") |
319 "experimental.allowdivergence=True") |
320 raise error.Abort(msg % (",".join(divhashes),), hint=h) |
320 raise error.Abort(msg % (",".join(divhashes),), hint=h) |
321 |
321 |
322 # - plain prune (no successor) changesets are rebased |
322 # - plain prune (no successor) changesets are rebased |
323 # - split changesets are not rebased if at least one of the |
323 # - split changesets are not rebased if at least one of the |
324 # changeset resulting from the split is an ancestor of dest |
324 # changeset resulting from the split is an ancestor of dest |