Mercurial > hg
comparison hgext/rebase.py @ 27261:986d04b9fedd
rebase: remove extra "if" from check of collapsing named branches
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 05 Dec 2015 23:50:13 +0900 |
parents | d755a9531fce |
children | 43c00ca887d1 |
comparison
equal
deleted
inserted
replaced
27260:d755a9531fce | 27261:986d04b9fedd |
---|---|
384 external = externalparent(repo, state, targetancestors) | 384 external = externalparent(repo, state, targetancestors) |
385 | 385 |
386 if dest.closesbranch() and not keepbranchesf: | 386 if dest.closesbranch() and not keepbranchesf: |
387 ui.status(_('reopening closed branch head %s\n') % dest) | 387 ui.status(_('reopening closed branch head %s\n') % dest) |
388 | 388 |
389 if keepbranchesf: | 389 if keepbranchesf and collapsef: |
390 if collapsef: | 390 branches = set() |
391 branches = set() | 391 for rev in state: |
392 for rev in state: | 392 branches.add(repo[rev].branch()) |
393 branches.add(repo[rev].branch()) | 393 if len(branches) > 1: |
394 if len(branches) > 1: | 394 raise error.Abort(_('cannot collapse multiple named ' |
395 raise error.Abort(_('cannot collapse multiple named ' | 395 'branches')) |
396 'branches')) | |
397 | 396 |
398 # Rebase | 397 # Rebase |
399 if not targetancestors: | 398 if not targetancestors: |
400 targetancestors = repo.changelog.ancestors([target], inclusive=True) | 399 targetancestors = repo.changelog.ancestors([target], inclusive=True) |
401 | 400 |