diff mercurial/commands.py @ 44190:92b7caf4cb9e stable

branch: make --force work even when specifying revs The `hg branch` command accepts a `--force` parameter that allows to "set branch name even if it shadows an existing branch". However, before this patch, that didn?t work when specifying revs with `-r`.
author Manuel Jacob <me@manueljacob.de>
date Sun, 01 Mar 2020 19:39:23 +0100
parents 0ab651b5f77c
children d543ef183eb8
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Feb 24 00:20:47 2020 -0500
+++ b/mercurial/commands.py	Sun Mar 01 19:39:23 2020 +0100
@@ -1338,7 +1338,7 @@
 
             scmutil.checknewlabel(repo, label, b'branch')
             if revs:
-                return cmdutil.changebranch(ui, repo, revs, label)
+                return cmdutil.changebranch(ui, repo, revs, label, opts)
 
             if not opts.get(b'force') and label in repo.branchmap():
                 if label not in [p.branch() for p in repo[None].parents()]: