hgext/rebase.py
changeset 28280 dc6032a1d888
parent 28189 fac3a24be50e
child 28394 dcb4209bd30d
equal deleted inserted replaced
28279:c1fbc92d6238 28280:dc6032a1d888
   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