mercurial/commands.py
branchstable
changeset 44401 92b7caf4cb9e
parent 44170 0ab651b5f77c
child 44440 d543ef183eb8
equal deleted inserted replaced
44378:bb58931d0c4f 44401:92b7caf4cb9e
  1336             ui.status(_(b'reset working directory to branch %s\n') % label)
  1336             ui.status(_(b'reset working directory to branch %s\n') % label)
  1337         elif label:
  1337         elif label:
  1338 
  1338 
  1339             scmutil.checknewlabel(repo, label, b'branch')
  1339             scmutil.checknewlabel(repo, label, b'branch')
  1340             if revs:
  1340             if revs:
  1341                 return cmdutil.changebranch(ui, repo, revs, label)
  1341                 return cmdutil.changebranch(ui, repo, revs, label, opts)
  1342 
  1342 
  1343             if not opts.get(b'force') and label in repo.branchmap():
  1343             if not opts.get(b'force') and label in repo.branchmap():
  1344                 if label not in [p.branch() for p in repo[None].parents()]:
  1344                 if label not in [p.branch() for p in repo[None].parents()]:
  1345                     raise error.Abort(
  1345                     raise error.Abort(
  1346                         _(b'a branch of the same name already exists'),
  1346                         _(b'a branch of the same name already exists'),