Mercurial: multiline commit message on the command line?

前端 未结 7 926
走了就别回头了
走了就别回头了 2021-02-06 20:20

How can I specify a multiline commit message for mercurial on the command line?

hg commit -m \"* add foo\\n* fix bar\"

does not work. The log

7条回答
  •  天涯浪人
    2021-02-06 20:56

    Mercurial: multiline commit message on the command line?

    Hit enter.

    $ hg commit -m "Did some work
    > Now I'm done"
    

    One of the things is that only the first line shows up in hg log:

    $ hg log
    changeset:   0:d2dc019450a2
    tag:         tip
    user:        Aaron Maenpaa 
    date:        Sat Jan 24 07:46:23 2009 -0500
    summary:     Did some work
    

    ... but if you fire up "hg view" you can see that the whole message is there.

    Edited to add:

    ... but hg -v log shows the whole message:

    $ hg -v log
    changeset:   0:d2dc019450a2
    tag:         tip
    user:        Aaron Maenpaa 
    date:        Sat Jan 24 07:46:23 2009 -0500
    files:       work
    description:
    Did some work
    Now I'm done
    

提交回复
热议问题