Using mercurial on windows.

Ludovic Chabant ludovic at chabant.com
Wed Jan 9 16:55:25 EST 2019


> After sometime of fighting with windows, here I am looking for suggestions on how one can use mercurial on windows smoothly and what are the recommended ways. Like shall I use MYSYS, did things will work in cmd.exe?
> 
> If anyone can shed some light on their experiences and tips and tricks on how to use mercurial on windows, that will be great!


Do you mean "using Mercurial on Windows" as a user, or did you really mean "working with the Mercurial code on Windows"?

As a plain user, Mercurial is a breeze to use cross-platform, there's not much to do. I personally use it in a normal cmd.exe shell (albeit inside a ConsoleZ UI so I get resizable/tabbed terminals). Nothing fancy.

Checking my dotfiles (https://bitbucket.org/ludovicchabant/dotfiles), the only tricks I have are:

1. Include an OS-specific config file from your .hgrc with:

%include hgrc-${OS}

(where $OS is a valid environment variable... I don't remember if I set it myself or if it's set by default by most OSes, but for me on Windows 10 this means it includes a config file named "hgrc-Windows_NT" in the same directory as the main hgrc file)

2. In that OS-specific file, set the ui.ssh config to "plink.exe -ssh -2 -batch -C" to make SSH pull/push work.

3. Set Windows-specific editor/extdiff/merge-tools configs if necessary.

That's it.

--
l u d o .
. 8 0 17 80


More information about the Mercurial-devel mailing list