mercurial/commands.py
changeset 17990 8216eb592dcd
parent 17986 e853d27956fb
child 18038 f8aee8033ab2
equal deleted inserted replaced
17989:e8c9b13c7799 17990:8216eb592dcd
   926                 if label not in [p.branch() for p in repo.parents()]:
   926                 if label not in [p.branch() for p in repo.parents()]:
   927                     raise util.Abort(_('a branch of the same name already'
   927                     raise util.Abort(_('a branch of the same name already'
   928                                        ' exists'),
   928                                        ' exists'),
   929                                      # i18n: "it" refers to an existing branch
   929                                      # i18n: "it" refers to an existing branch
   930                                      hint=_("use 'hg update' to switch to it"))
   930                                      hint=_("use 'hg update' to switch to it"))
   931             scmutil.checknewlabel(None, label, 'branch')
   931             scmutil.checknewlabel(repo, label, 'branch')
   932             repo.dirstate.setbranch(label)
   932             repo.dirstate.setbranch(label)
   933             ui.status(_('marked working directory as branch %s\n') % label)
   933             ui.status(_('marked working directory as branch %s\n') % label)
   934             ui.status(_('(branches are permanent and global, '
   934             ui.status(_('(branches are permanent and global, '
   935                         'did you want a bookmark?)\n'))
   935                         'did you want a bookmark?)\n'))
   936     finally:
   936     finally: