-
Notifications
You must be signed in to change notification settings - Fork 62
Windows Support
Using git-cinnabar on Windows has been tested on the master
branch and
adjustments were done so that it works properly in all the tested environments.
Install git
, mercurial
, and python
:
$ pacman -S git mercurial python
Then put git-cinnabar's directory in the PATH
environment variable and you're
all set.
The setup is the same as for MSys2 64-bits, but doesn't work out of the box:
$ git clone hg::https://selenic.com/hg
Cloning into 'hg'...
5 [main] python2.7 1584 child_info_fork::abort: address space needed by 'cPickle.dll' (0x390000) is already occupied
(...)
Open an explorer window in the directory MSys2 is installed, and enter the
usr\bin
subdirectory. From there, open ash
. In the command prompt this
opens, run the following command:
$ /usr/bin/rebaseall
After that, using git-cinnabar should work.
Note: Git for Windows 32-bits already performs /usr/bin/rebaseall
as part of its
installation, therefore the MSys2 32-bits issue mentioned above does not apply.
Assuming MozillaBuild is installed in
c:\mozilla-build
and Git for Windows in
c:\Program Files\Git
:
When using the Git bash shell, set your PATH
environment variable as follows:
$ PATH="$PATH:/c/mozilla-build/python:/path/to/git-cinnabar"
Note that cloning mozilla-central requires a lot of memory. If you encounter MemoryError, try to upgrade git-cinnabar to version 0.5.0b1. If that is not enough, try to use a 64-bit python instead.
This will use python from MozillaBuild, since the MSys2 environment that comes with Git for Windows doesn't contain one. You can then use git-cinnabar normally.
When using the MozillaBuild shell, set your PATH
environment variable as
follows:
$ PATH="$PATH:/c/Program Files/Git/bin:/path/to/git-cinnabar"
Additionally, you'll need to set the GIT_SSH
environment variable:
$ export GIT_SSH=/bin/ssh
The latter is required because Git for Windows prepends its MSys2 directories
to the PATH
environment variable, and its ssh
then ends up being used.
Which is a problem because for some reason it fails to get to the terminal for
passphrases and password prompts. Setting GIT_SSH
as above forces to use
MozillaBuild's.
The MSys environment from MozillaBuild, however, will munge urls in the form
hg::proto://host/path
such that commands like git clone
will fail.
To allow such setups to still work, hg:// urls are supported. But since mercurial can be on many different protocols, we abuse the port in the given url to pass the protocol.
A hg:// url thus looks like:
hg://<host>[:[<port>.]<protocol>]/<path>
The default protocol is https, and the port can be omitted.
hg::https://hg.mozilla.org/mozilla-central
becomes
hg://hg.mozilla.org/mozilla-central
hg::http://hg.mozilla.org/mozilla-central
becomes
hg://hg.mozilla.org:http/mozilla-central
hg::ssh://hg.mozilla.org/mozilla-central
becomes
hg://hg.mozilla.org:ssh/mozilla-central
hg::file:///some/path
becomes (awkward)
hg://:file/some/path
hg::http://localhost:8080/foo
becomes
hg://localhost:8080.http/foo