Differences between revisions 2 and 3
Revision 2 as of 2011-10-20 21:33:08
Size: 2174
Editor: mpm
Comment:
Revision 3 as of 2011-11-01 22:22:46
Size: 2199
Editor: mpm
Comment:
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
The package can be found [[http://mercurial.selenic.com/release/windows/hackable/|here]]. Simply download, unzip, and run the included hg.exe. Simply use `hg pull` and `hg update` to upgrade to the latest version. The package can be found [[http://mercurial.selenic.com/release/windows/hackable/|here]]. Simply download, unzip, and run the included hg.exe.
This package will not interfere with
your existing Mercurial or Python installation.
Line 23: Line 24:
This package will not interfere with your existing Mercurial or Python installation. <!> There is usually no need to download new copies between releases, simply pull and update.

Hackable Mercurial for Windows

An approach to easily hack on the Mercurial source on Windows.

1. What is the Hackable package?

Compiling Mercurial is a significant barrier to testing and developing Mercurial on Windows. This package attempts to minimize that barrier by including:

  • a private copy of Python (32-bit)
  • complete Mercurial history
  • pre-compiled extensions (32-bit MinGW GCC)
  • an hg.exe wrapper to add to your path
  • in-place editable source checked out and ready to go

2. Downloading and using

The package can be found here. Simply download, unzip, and run the included hg.exe. This package will not interfere with your existing Mercurial or Python installation.

<!> There is usually no need to download new copies between releases, simply pull and update.

/!\ This package includes no global configuration, so if you're not already using Mercurial, you will need to configure your username and merge tools.

3. How it's built and how to build your own from scratch

Needed components:

  • Python MSI installer, versions 2.4 - 2.7
  • Mercurial source release, see [Downloads]
  • MinGW mingw-get tool

  • The exemaker launcher

Steps:

  • Download all the needed components
  • Install Python with msiexec /i python-2.6.6.msi /qb

  • Unpack the mingw-get tool into c:\MinGW and add c:\MinGW\bin to your path

  • Install the gcc compiler with mingw-get gcc

  • Unpack Mercurial source into c:\hg

  • Copy the Python install from c:\Python26 to c:\hg\hg-python26

  • Edit c:\hg\hg-python26\Lib\distutils\cygwinccompiler.py to remove all references to -mno-cygwin (thanks, GCC!)

  • Build Mercurial extensions in c:\hg with hg-python26\python setup.py build_ext -i --compiler=mingw32

  • Copy the c:\hg\hg to c:\hg.py and change the #! line to '#!hg-python/python.exe'

  • Unpack exemaker and copy exemaker.exe to c:\hg\hg.exe

4. See also


CategoryDeveloper

HackableMercurial (last edited 2018-12-05 04:34:18 by MattHarbison)