mercurial/commands.py
changeset 42124 d6437f414437
parent 42109 2a3c0106ded9
child 42129 232a33a11ce0
equal deleted inserted replaced
42123:be5eeaf5c24a 42124:d6437f414437
  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')),