khanchi97 added a comment.

  In D6490#95355 <https://phab.mercurial-scm.org/D6490#95355>, @markand wrote:
  
  > In D6490#95328 <https://phab.mercurial-scm.org/D6490#95328>, @mharbison72 
wrote:
  >
  >> In D6490#95305 <https://phab.mercurial-scm.org/D6490#95305>, @pulkit wrote:
  >>
  >>> I think adding a `--force` flag to `hg commit` is not a nice option. 
force can mean a lot of things and here except in closing the non-head 
changeset, it is no-op. 
  >>> For example, I am in middle of a rebase, tried to commit, it says rebase 
in progress. I see there is a --force flag, I try to use that to force the 
commit.
  >>> We can do one of the following:
  >>>
  >>> 1. maybe a more specific flag name like `--allow-close-branch` or 
something like that
  >>> 2. a config option instead of a flag name
  >>
  >> Fair point.  Specific is better.
  >> I'd suggest `--force-close-branch` as a standalone flag (i.e. you don't 
need to also use `--close-branch`; it wasn't clear to me if that's what you 
meant).  `--allow-close-branch` and `--close-branch` don't seem different 
enough to remember the difference.
  >
  > Just my $0.02.
  > I think that `hg commit` already has many options that do not even belong 
to committing (such as -A, --close-branch). Let's not add an option that is not 
related to commit. To my opinion closing a branch should be done with `hg 
branch` not commit (unfortunately this was never the case). Anyway if you 
really want to do it with commit, I would suggest that `--close-branch` takes 
an optional argument rather than adding a new option. This makes UX a bit more 
convenient
  > e.g.
  >
  >   hg commit --close-branch --force-close-branch (not that)
  >   hg commit --close-branch forced (or force or something like that)
  
  I think it's a little hard to make user understand (by providing a hint like 
"use `force` arg with `--close-branch`") that you need to provide an argument 
as compared to just providing a standalone flag `--force-close-branch` as 
@mharbison72 suggested. I do agree with you that it would make +1 in the no. of 
flags which don't make sense with `hg commit`. What do you say?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6490/new/

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

To: khanchi97, #hg-reviewers, mharbison72
Cc: martinvonz, markand, pulkit, mharbison72, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to