How can we customize the default commit message used by the fetch extension?
Asked Answered
S

2

8

The default commit message that fetch uses, "Automated merge with ...." is long, ugly and litters the history with local directory paths. I'd like to replace it with a simple "Automated merge" or just "Merge".

Steiermark answered 18/2, 2011 at 5:49 Comment(0)
C
8

By default the message is not customizable (check out "library.zip" under your Mercurial install folder, you'll see the message in plain text under hgext\fetch.pyc).

So the only way is to update source code of "fetch" - try this version, I just changed the message to "Fetch merge" and it works like a blast :)

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

Carob answered 10/3, 2011 at 16:36 Comment(1)
Excellent - those commit messages were bugging me, too.Scholz
T
7

Instead of using a custom built fetch extension like suggested earlier, you can also overwrite the comment message using an alias:

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

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

Turku answered 17/10, 2012 at 1:13 Comment(1)
fetch seems deprecated. is there an alternative to the fetch -m command ?Mathematical

© 2022 - 2024 — McMap. All rights reserved.