1123 |
1123 |
1124 repo.dirstate.setbranch(label) |
1124 repo.dirstate.setbranch(label) |
1125 ui.status(_('marked working directory as branch %s\n') % label) |
1125 ui.status(_('marked working directory as branch %s\n') % label) |
1126 |
1126 |
1127 # find any open named branches aside from default |
1127 # find any open named branches aside from default |
1128 others = [n for n, h, t, c in repo.branchmap().iterbranches() |
1128 for n, h, t, c in repo.branchmap().iterbranches(): |
1129 if n != "default" and not c] |
1129 if n != "default" and not c: |
1130 if not others: |
1130 return 0 |
1131 ui.status(_('(branches are permanent and global, ' |
1131 ui.status(_('(branches are permanent and global, ' |
1132 'did you want a bookmark?)\n')) |
1132 'did you want a bookmark?)\n')) |
1133 |
1133 |
1134 @command('branches', |
1134 @command('branches', |
1135 [('a', 'active', False, |
1135 [('a', 'active', False, |
1136 _('show only branches that have unmerged heads (DEPRECATED)')), |
1136 _('show only branches that have unmerged heads (DEPRECATED)')), |
1137 ('c', 'closed', False, _('show normal and closed branches')), |
1137 ('c', 'closed', False, _('show normal and closed branches')), |