equal
deleted
inserted
replaced
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'), |