Posts Tagged for: rPath

managing sources with hg convert

One of the things I do at rPath is hack on Anaconda. We have decided to mostly standardize on Mercurial for our SCM. Since Anaconda, at the time, was managed in CVS, this meant that I needed to find a tool to convert a publically accessible CVS repository to a Mercurial repository. The only tool that I could find that was capable of doing this without having local access to the CVS repository was tailor. Tailor takes pretty much any SCM repository an converts it to darcs and then converts the darcs repository to another SCM repository format. Darcs is yet another SCM.

A couple of weeks ago the Fedora Project converted Anaconda from CVS to GIT. This meant that I needed to reconfigure tailor to handle the change. Through some help from the maintainer of tailor over IRC I was able to get tailor configured to deal with the switch. Over the next week or so I noticed that tailor had some issues handling branches in GIT and decided to find a new way to maintain my Anaconda Mercurial repository.

With a bit of searching I found the Mercurial convert extension. Which allowed me to switch away from tailor to something that would be at least somewhat supported by the Mercurial project. Getting the convert extension to pick up where tailor had left off took a bit of figuring out. The convert extension uses a map file that maps IDs for each GIT commit to a Mercurial commit ID. I had to manually create this file by extracting all of the commit IDs from the GIT repository and filling in null values for the the Mercurial ID side of the map. As the last entry I included the commit ID for the tip of the Mercurial repository that matched the point at which tailor had stopped being able to convert the GIT repository. With all of this in place hg convert could now handle converting the upstream Anaconda GIT repository to Mercurial. The Mercurial repository is now updated nightly (around 4am EST) from the upstream GIT repository.

You can find the converted upstream Anaconda Mercurial repository on rPath’s public Mercurial along side rPath’s custom Anaconda Mercurial repository, that includes support for both the Conary based installer and tar archive based installer.