equal
deleted
inserted
replaced
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: |