Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 44460:d543ef183eb8
merge with stable
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 05 Mar 2020 10:52:51 -0500 |
parents | 5a5aee8ba980 92b7caf4cb9e |
children | 9d2b2df2c2ba |
comparison
equal
deleted
inserted
replaced
44459:5a5aee8ba980 | 44460:d543ef183eb8 |
---|---|
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'), |