hgext/rebase.py
changeset 18093 9c76da468a19
parent 17989 e8c9b13c7799
child 18164 bacf55bd8f90
equal deleted inserted replaced
18092:ff36650e4238 18093:9c76da468a19
   212                 ui.status(_('nothing to rebase\n'))
   212                 ui.status(_('nothing to rebase\n'))
   213                 return 1
   213                 return 1
   214             else:
   214             else:
   215                 originalwd, target, state = result
   215                 originalwd, target, state = result
   216                 if collapsef:
   216                 if collapsef:
   217                     targetancestors = set(repo.changelog.ancestors([target]))
   217                     targetancestors = repo.changelog.ancestors([target],
   218                     targetancestors.add(target)
   218                                                                inclusive=True)
   219                     external = checkexternal(repo, state, targetancestors)
   219                     external = checkexternal(repo, state, targetancestors)
   220 
   220 
   221         if keepbranchesf:
   221         if keepbranchesf:
   222             assert not extrafn, 'cannot use both keepbranches and extrafn'
   222             assert not extrafn, 'cannot use both keepbranches and extrafn'
   223             def extrafn(ctx, extra):
   223             def extrafn(ctx, extra):
   231                             'branches'))
   231                             'branches'))
   232 
   232 
   233 
   233 
   234         # Rebase
   234         # Rebase
   235         if not targetancestors:
   235         if not targetancestors:
   236             targetancestors = set(repo.changelog.ancestors([target]))
   236             targetancestors = repo.changelog.ancestors([target], inclusive=True)
   237             targetancestors.add(target)
       
   238 
   237 
   239         # Keep track of the current bookmarks in order to reset them later
   238         # Keep track of the current bookmarks in order to reset them later
   240         currentbookmarks = repo._bookmarks.copy()
   239         currentbookmarks = repo._bookmarks.copy()
   241         activebookmark = repo._bookmarkcurrent
   240         activebookmark = repo._bookmarkcurrent
   242         if activebookmark:
   241         if activebookmark: