Submitter | Yuya Nishihara |
---|---|
Date | Dec. 6, 2015, 3:24 p.m. |
Message ID | <da2eec44aafba17f62f5.1449415465@mimosa> |
Download | mbox | patch |
Permalink | /patch/11860/ |
State | Accepted |
Headers | show |
Comments
On 12/06/2015 07:24 AM, Yuya Nishihara wrote: > # HG changeset patch > # User Yuya Nishihara <yuya@tcha.org> > # Date 1449327013 -32400 > # Sat Dec 05 23:50:13 2015 +0900 > # Node ID da2eec44aafba17f62f559f451fed18b95a971a6 > # Parent 0b93ef8a1c3e8f9394776ecada576fb608162dc3 > rebase: remove extra "if" from check of collapsing named branches Sure, pushed to the clowncopter. Thanks for cleaning things up.
Patch
diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -386,14 +386,13 @@ def rebase(ui, repo, **opts): if dest.closesbranch() and not keepbranchesf: ui.status(_('reopening closed branch head %s\n') % dest) - if keepbranchesf: - if collapsef: - branches = set() - for rev in state: - branches.add(repo[rev].branch()) - if len(branches) > 1: - raise error.Abort(_('cannot collapse multiple named ' - 'branches')) + if keepbranchesf and collapsef: + branches = set() + for rev in state: + branches.add(repo[rev].branch()) + if len(branches) > 1: + raise error.Abort(_('cannot collapse multiple named ' + 'branches')) # Rebase if not targetancestors: