Git commit - equivalent in mercury?

In git, I can do "git commit --verbose" to show me diff in the message editor. I do not see in him any choice in mercury. Is there a mercury plugin to show me diff in a message editor or something similar?

+6
source share
3 answers

Short answer: there is no equivalent to git commit --verbose in mercury, but it can be hacked.

The edit text is hardcoded to mercurial source , so no plugin or configuration can directly change it.

The best you can do is hack the ui.editor setting in hgrc to directly add text to the editor. I created a hg-commit-editor script:

 #!/bin/sh echo "HG: " >> $1 hg diff | sed -e 's|^|HG: |' >> $1 editor $1 

and then install it as my commit editor in my hgrc:

 [ui] editor = hg-commit-editor 

This adds the output of “hg diff” to the end of the edit text file, adding each line with “HG:”, so it is not included as part of the commit message.

+4
source

Not directly, but you can combine:

So: creating a file with the correct information in it (a list of files to click) as a commit message.

+1
source

Not exactly the same result, but the closest iteration:

before committing you can hg diff see diff in WC, using the alias extension you can create an alias for a pair of hg diff and hg commit "

0
source

All Articles