D3557: commit: add new close-branch command

2018-05-30 Thread indygreg (Gregory Szorc)
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

D3557: commit: add new close-branch command

2018-05-25 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger added a comment. If we want to go with a `--close` flag, I think the most natural place would actually be `hg heads`. This is not really a branch operation after all, but about cutting off heads. At the same time, none of those options would allow specifying a commit

D3557: commit: add new close-branch command

2018-05-25 Thread pulkit (Pulkit Goyal)
pulkit added a comment. In https://phab.mercurial-scm.org/D3557#57279, @joerg.sonnenberger wrote: > It doesn't seem to fit the argument schema for `hg branch` at all. I'm open for better places, but I couldn't think of a consistent place. The branch command has a `--rev` flag

D3557: commit: add new close-branch command

2018-05-25 Thread pulkit (Pulkit Goyal)
pulkit added a comment. The code looks mostly good to me. Needs tests for following cases: - when working directory is dirty - when we are in an uncommitted merge state - there is some bookmark movement code, tests for that INLINE COMMENTS > commands.py:1508 > +if not message: >

D3557: commit: add new close-branch command

2018-05-21 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger added a comment. It doesn't seem to fit the argument schema for `hg branch` at all. I'm open for better places, but I couldn't think of a consistent place. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3557 To: joerg.sonnenberger,

D3557: commit: add new close-branch command

2018-05-20 Thread pulkit (Pulkit Goyal)
pulkit added a comment. > `hg close-branch` allows closing arbitrary heads. It is equivalent to > checking out the given revisions and commit an empty change with > `hg commit --close-branch`. I am -1 on having a new command for this. How about adding this as a `--close` flag to

D3557: commit: add new close-branch command

2018-05-13 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY ``hg close-branch`` allows closing arbitrary heads. It is equivalent to checking out the given revisions and commit an empty change with ``hg commit