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