equal
deleted
inserted
replaced
1338 ui.status(_(b'reset working directory to branch %s\n') % label) |
1338 ui.status(_(b'reset working directory to branch %s\n') % label) |
1339 elif label: |
1339 elif label: |
1340 |
1340 |
1341 scmutil.checknewlabel(repo, label, b'branch') |
1341 scmutil.checknewlabel(repo, label, b'branch') |
1342 if revs: |
1342 if revs: |
1343 return cmdutil.changebranch(ui, repo, revs, label) |
1343 return cmdutil.changebranch(ui, repo, revs, label, opts) |
1344 |
1344 |
1345 if not opts.get(b'force') and label in repo.branchmap(): |
1345 if not opts.get(b'force') and label in repo.branchmap(): |
1346 if label not in [p.branch() for p in repo[None].parents()]: |
1346 if label not in [p.branch() for p in repo[None].parents()]: |
1347 raise error.Abort( |
1347 raise error.Abort( |
1348 _(b'a branch of the same name already exists'), |
1348 _(b'a branch of the same name already exists'), |