Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 50825:13ad1b2ad3b4
branch: migrate `opts` to native kwargs
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 20 Aug 2023 00:55:52 -0400 |
parents | 489268c8ee7e |
children | 1270677d740b |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sun Aug 20 00:44:15 2023 -0400 +++ b/mercurial/cmdutil.py Sun Aug 20 00:55:52 2023 -0400 @@ -1007,7 +1007,7 @@ raise error.UnknownCommand(cmd, allcmds) -def changebranch(ui, repo, revs, label, opts): +def changebranch(ui, repo, revs, label, **opts): """Change the branch name of given revs to label""" with repo.wlock(), repo.lock(), repo.transaction(b'branches'): @@ -1026,7 +1026,7 @@ root = repo[roots.first()] rpb = {parent.branch() for parent in root.parents()} if ( - not opts.get(b'force') + not opts.get('force') and label not in rpb and label in repo.branchmap() ):