D3557: commit: add new close-branch command

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Wed May 30 21:03:07 EDT 2018


indygreg added a comment.


  I'm -0.25 on this.
  
  But I don't think we should add an argument to `hg heads` or `hg branch` because I don't like a) overloading commands to have multiple meanings b) making commands read-write and read-only. I think commands should do one thing and do them well. There should also be a set of //safe// commands that can be executed without meaningful side-effects.
  
  Following that logic, a dedicated command is justified.
  
  But I just don't feel like closing heads that aren't checked out is a frequent enough operation to justify a dedicated command.
  
  As a potential compromise, how about `hg commit --close-branch-rev <REV>` that does the branch closing without needing a working directory? But this seemingly violates the expectation of `hg commit`, which is that it operates on the working directory. Gah - now I think I talked myself into a dedicated command.
  
  Good UI design is hard.

REPOSITORY
  rHG Mercurial

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

To: joerg.sonnenberger, #hg-reviewers
Cc: indygreg, pulkit, mercurial-devel


More information about the Mercurial-devel mailing list