Perform an empty commit with mercurial

后端 未结 3 1222
灰色年华
灰色年华 2021-01-04 02:29

With with Mercurial queues extension, I can make an empty commit with some commit message like so:

hg qnew patch_name -m \"message\"

Is the

3条回答
  •  梦谈多话
    2021-01-04 03:19

    You can make commit that's closing the branch:

    hg commit --close-branch -m "message"
    

    Update:

    You can close branch once, but it can be reopened with another commit. Simplest way to reopen branch without changing files is to tag some revision. So you can use hg commit --close-branch for empty commit and then hg tag for reopening.

    Update v2

    Actually you can create new empty commits with just hg tag command. It has -m parameter for setting a commit message. If you don't really care about correctness of this tags, you can use just one tag name by calling hg tag with -f parameter:

    hg tag t1 -f -m "message"
    

提交回复
热议问题