D6490: branch: add --force flag to close branch from a not-head changeset

khanchi97 (Sushil khanchi) phabricator at mercurial-scm.org
Mon Jun 10 09:02:42 EDT 2019


khanchi97 marked an inline comment as done.
khanchi97 added inline comments.

INLINE COMMENTS

> mharbison72 wrote in commands.py:1680
> I didn't realize that `--force` wasn't already an option for commit, because it is an option to internal commit functions.  I still like this idea, but maybe you need to remove this from `opts` after completing the check here (and also in the `--no-close-branch` case).  Otherwise, it risks bypassing existing safeguards.
> 
> https://www.mercurial-scm.org/repo/hg/file/tip/mercurial/localrepo.py#l2498
> 
> (I have no idea why that's allowed at all.  MQ maybe?)

Updated as per suggested changes. Also added a hint to use --force while aborting the user.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6490

To: khanchi97, #hg-reviewers, mharbison72
Cc: mharbison72, mercurial-devel


More information about the Mercurial-devel mailing list