How can we customize the default commit message used by the select extension?

The default commit message that fetch uses, "Automatically merge with ...." is long, ugly, and puts the history in the local directory path. I would like to replace it with a simple "automatic merge" or just "merge".

+8
mercurial fetch hgrc
source share
2 answers

By default, the message is not configured (check "library.zip" in your Mercurial installation folder, you will see the message in text format under hgext\fetch.pyc ).

So, the only way is to update the source code for โ€œfetchโ€ - try this version , I just changed the message to โ€œFetch mergeโ€ and it works like an explosion :)

You need to remove library.zip\hgext\fetch.pyc and put fetch.py there (a simple python file) with the content from the link above.

+8
source share

Instead of using the custom built-in selection extension as suggested earlier, you can also overwrite the comment comment with an alias:

 [alias] fetch = fetch -m "automated merge" 

Just put the above code in your local .hgrc (mercurial.ini on Windows).

+7
source share

All Articles