hgext/rebase.py
changeset 16867 1093ad1e8903
parent 16866 91f3ac205816
child 17005 50f434510da6
child 17027 6c05eebd9fab
equal deleted inserted replaced
16866:91f3ac205816 16867:1093ad1e8903
   319 
   319 
   320         if not keepf:
   320         if not keepf:
   321             # Remove no more useful revisions
   321             # Remove no more useful revisions
   322             rebased = [rev for rev in state if state[rev] != nullmerge]
   322             rebased = [rev for rev in state if state[rev] != nullmerge]
   323             if rebased:
   323             if rebased:
   324                 if set(repo.changelog.descendants(min(rebased))) - set(state):
   324                 if set(repo.changelog.descendants([min(rebased)])) - set(state):
   325                     ui.warn(_("warning: new changesets detected "
   325                     ui.warn(_("warning: new changesets detected "
   326                               "on source branch, not stripping\n"))
   326                               "on source branch, not stripping\n"))
   327                 else:
   327                 else:
   328                     # backup the old csets by default
   328                     # backup the old csets by default
   329                     repair.strip(ui, repo, repo[min(rebased)].node(), "all")
   329                     repair.strip(ui, repo, repo[min(rebased)].node(), "all")
   573                        "can't abort\n"))
   573                        "can't abort\n"))
   574         return -1
   574         return -1
   575 
   575 
   576     descendants = set()
   576     descendants = set()
   577     if dstates:
   577     if dstates:
   578         descendants = set(repo.changelog.descendants(*dstates))
   578         descendants = set(repo.changelog.descendants(dstates))
   579     if descendants - set(dstates):
   579     if descendants - set(dstates):
   580         repo.ui.warn(_("warning: new changesets detected on target branch, "
   580         repo.ui.warn(_("warning: new changesets detected on target branch, "
   581                        "can't abort\n"))
   581                        "can't abort\n"))
   582         return -1
   582         return -1
   583     else:
   583     else: