Search code examples
mercurialnotepad++dvcs

Getting mercurial "hg commit" to work with Notepad++


I just replaced notepad with notepad++ using NotepadReplacer and now my hg commit isn't working correctly.

Before replacing Notepad, hg commit would launch a new text file for me to enter my commit message into. With Notepad++, I'm prompted to create the file, and mercurial aborts the commit because of an empty commit message.

I know I can enter the message inline with the hg commit with the -m option, but I'd like to have the option of entering the commit message in the text file. I like having the status displayed in the text file as context for the commit message without having to type hg stat before hg commit.

How can I get this to work?


Solution

  • Try placing in your %USERPROFILE%\.hgrc (or %USERPROFILE%\mercurial.ini) something along the lines of:

    [ui]
    editor = path/to/notepad++ -multiInst -nosession
    

    Perhaps adding a -notabbar after -nosession could prove useful, too.