comparison mercurial/commands.py @ 23620:3d4aa20b775d

branches: deprecate -a
author Matt Mackall <mpm@selenic.com>
date Mon, 22 Dec 2014 14:49:05 -0600
parents 7cfe58983bff
children de5c76aaeaf4
comparison
equal deleted inserted replaced
23616:11a160547d7f 23620:3d4aa20b775d
1038 in the repository until the next commit). Standard practice 1038 in the repository until the next commit). Standard practice
1039 recommends that primary development take place on the 'default' 1039 recommends that primary development take place on the 'default'
1040 branch. 1040 branch.
1041 1041
1042 Unless -f/--force is specified, branch will not let you set a 1042 Unless -f/--force is specified, branch will not let you set a
1043 branch name that already exists, even if it's inactive. 1043 branch name that already exists.
1044 1044
1045 Use -C/--clean to reset the working directory branch to that of 1045 Use -C/--clean to reset the working directory branch to that of
1046 the parent of the working directory, negating a previous branch 1046 the parent of the working directory, negating a previous branch
1047 change. 1047 change.
1048 1048
1078 'did you want a bookmark?)\n')) 1078 'did you want a bookmark?)\n'))
1079 finally: 1079 finally:
1080 wlock.release() 1080 wlock.release()
1081 1081
1082 @command('branches', 1082 @command('branches',
1083 [('a', 'active', False, _('show only branches that have unmerged heads')), 1083 [('a', 'active', False,
1084 _('show only branches that have unmerged heads (DEPRECATED)')),
1084 ('c', 'closed', False, _('show normal and closed branches')), 1085 ('c', 'closed', False, _('show normal and closed branches')),
1085 ] + formatteropts, 1086 ] + formatteropts,
1086 _('[-ac]')) 1087 _('[-ac]'))
1087 def branches(ui, repo, active=False, closed=False, **opts): 1088 def branches(ui, repo, active=False, closed=False, **opts):
1088 """list repository named branches 1089 """list repository named branches
1089 1090
1090 List the repository's named branches, indicating which ones are 1091 List the repository's named branches, indicating which ones are
1091 inactive. If -c/--closed is specified, also list branches which have 1092 inactive. If -c/--closed is specified, also list branches which have
1092 been marked closed (see :hg:`commit --close-branch`). 1093 been marked closed (see :hg:`commit --close-branch`).
1093
1094 If -a/--active is specified, only show active branches. A branch
1095 is considered active if it contains repository heads.
1096 1094
1097 Use the command :hg:`update` to switch to an existing branch. 1095 Use the command :hg:`update` to switch to an existing branch.
1098 1096
1099 Returns 0. 1097 Returns 0.
1100 """ 1098 """