Clone wiki

thg-winbuild / Home

TortoiseHg and Mercurial installer builder for Windows

The thg-winbuild scripts build against Python 2.6 and PyQt 4.7 or later. All C and C++ code is compiled with the VC9 compiler that comes with the gratis Microsoft Windows SDK for Windows 7 or Microsoft Visual C++ Compiler for Python 2.7.

MinGW is not used anymore.

Pre-built packages are available from the Downloads tab.

Package Naming Conventions

package nameexplanation
mercurial-A.B.C.exeMercurial release version A.B.C, InnoSetup based installer
mercurial-A.B.C.msiMercurial release version A.B.C, WiX based MSI installer
mercurial-x.y.x.win32-py2.N.exeMercurial Python package for Python 2.N
mercurial-stable-A.B.C.msiMercurial stable branch nightly build
mercurial-dev-A.B.C.msiMercurial 'default' branch nightly build
tortoisehg-A.B.C-x86.msiTortoiseHg release version A.B.C for x86 arch PCs
tortoisehg-A.B.C-x64.msiTortoiseHg release version A.B.C for x64 arch PCs
tortoisehg-stable-A.B.C.D-x86-{bhash}.msiTortoiseHg stable branch nightly build, for x86
tortoisehg-stable-A.B.C.D-x64-{bhash}.msiTortoiseHg stable branch nightly build, for x64
tortoisehg-dev-A.B.C.D-x86-{bhash}.msiTortoiseHg 'default' branch nightly build, for x86
tortoisehg-dev-A.B.C.D-x64-{bhash}.msiTortoiseHg 'default' branch nightly build, for x64

The {bhash} is a unique hash for the build run. This string isn't particularly interesting to the end-user, but it helps us to generate unique filenames every time we run the auto build scripts.

Nightly build version numbers

For nightly build packages, the 'C' and 'D' terms of the version is encoded as: VMMM

  • V - most recent minor release number (may be missing, if zero)
  • MMM - count of new changesets since last tagged release plus 100 for the stable branch nightlies or plus 500 for default branch (aka "unstable") nightlies (see 1122c0037f29 )

Whereas for TortoiseHg nightlies, the 'C' term encodes the exact TortoiseHg version used and the 'D' term encodes the Mercurial version that was included.



  187 -> thg detail version: stable branch, 87 changesets since last tag (2.0.3) in TortoiseHg
  128 -> hg detail version: stable branch, 28 changesets since last tag (1.8.2) in Mercurial


  683 -> thg detail version: default branch, 183 changesets since last tag (2.0.3) in TortoiseHg
  639 -> hg detail version: default branch, 139 changesets since last tag (1.8.2) in Mercurial

If you download an MSI package and look at its properties, you should see the actual changeset hashes that were used to build that particular package (look for the "Comments" property in the "Details" tab, which for example reads "Installs TortoiseHg 2.0.3+183-774d4419f199, Mercurial 1.8.2+139-98f79a5c3086 on x64"). Once installed, entering 'thg version' and/or 'hg version' on the command line will also tell you the exact tag or changeset hashes.

Building your own packages

To use thg-winbuild to build your own Mercurial or TortoiseHg packages or to simply build the THG docs, hg clone to your Windows machine, cd into the winbuild subrepo and carefully follow the instructions in README.txt.