comparison mercurial/commands.py @ 15615:41885892796e stable

branch: warn on branching
author Matt Mackall <mpm@selenic.com>
date Thu, 08 Dec 2011 14:32:44 -0600
parents 09b200396384
children fc8c7a5ccc4a dc5d1394ecd1
comparison
equal deleted inserted replaced
15610:09b200396384 15615:41885892796e
853 raise util.Abort(_('a branch of the same name already exists'), 853 raise util.Abort(_('a branch of the same name already exists'),
854 # i18n: "it" refers to an existing branch 854 # i18n: "it" refers to an existing branch
855 hint=_("use 'hg update' to switch to it")) 855 hint=_("use 'hg update' to switch to it"))
856 repo.dirstate.setbranch(label) 856 repo.dirstate.setbranch(label)
857 ui.status(_('marked working directory as branch %s\n') % label) 857 ui.status(_('marked working directory as branch %s\n') % label)
858 ui.status(_('(branches are permanent and global, '
859 'did you want a bookmark?)\n'))
858 else: 860 else:
859 ui.write("%s\n" % repo.dirstate.branch()) 861 ui.write("%s\n" % repo.dirstate.branch())
860 862
861 @command('branches', 863 @command('branches',
862 [('a', 'active', False, _('show only branches that have unmerged heads')), 864 [('a', 'active', False, _('show only branches that have unmerged heads')),