WiX source code using Mercurial and TortoiseHg, Part 1

Now that Rob moved the WiX source repository and releases to Codeplex, how you interact with the WiX source code changes. Before the move to Codeplex, we published a .zip file that contains most—but not all—of the files needed to rebuild WiX. (Some large binary files were omitted because of space limitations at SourceForge.) For example, http://wix.sourceforge.net/releases/3.5.1811.0/wix35-sources.zip contains the source code as of the 11-June-2010 release of WiX v3.5. For now, we’re continuing to publish those files but the move to Codeplex makes them pretty much obsolete.

I’m writing a couple of posts that talk about how to use the WiX source repository to view, modify, and patch the WiX source code.

Getting WiX source code

Getting WiX source code out of Mercurial is straightforward using TortoiseHg:

  1. Install TortoiseHg.
  2. Use Explorer to create a directory where you want to store the source code. I used “wix” in the root of my X: drive.
  3. Right-click the directory you created in step 2 and choose TortoiseHg|Clone.
  4. In Source path, enter https://hg01.codeplex.com/wix. That’s the Mercurial clone URL, provided by Codeplex. You can see it for your self by going to https://wix.codeplex.com/ then clicking the Source Code tab and clicking Mercurial in the Source Control Setup box in the right bar.

    TortoiseHg Clone

  5. Click Clone. TortoiseHg will fetch many “chunks” from Codeplex. It’ll take a while, depending on your Internet connection speed.

Your patience is rewarded with a directory that contains one subdirectory and two files (at least as of today). Huh? All you’ve done so far is cloned the WiX Mercurial repository. Next up is updating your working directory with a particular revision of that repository. (The default branch in the WiX repository contains no interesting files; all past and active development is happening on the named branches wix20, wix30, and wix35, shown below in green.)

  1. Right-click the directory you created in step 2 and choose Hg Repository Explorer. You’ll get a window that contains the changes that have been committed to the Mercurial repository.

    wix - Repository Explorer

  2. Right-click the line representing the version you’re interested in and choose Update. To get the latest version, look toward the top for the version with the yellow “tip” box.
  3. Click Update to get the version you selected.

    Update - wix

The directory now contains a WiX source enlistment. Up next: creating patches against a clone of the official repository.

4 thoughts on “WiX source code using Mercurial and TortoiseHg, Part 1”

  1. Please continue publishing the source .ZIPs. We have scripts that consume these.

  2. I fail to understand why the CodePlex team requires you to be a contributor(+) to connect using Team Explorer. I know they host mulltiple projects on a server but it should be trivial to create a web form that adds the project to your view with read/only permissions.

    I really shouldn’t have to load yet another source control client when I’ve already have a full blown TFS system at home.

Comments are closed.