aleix's blog

From GNU Arch to Mercurial

31 January 2008 2:51 pm (mercurial | python | version control)

gnuarch.pngOver the last two and a half years we (at work) have been using baz as our distributed version control system. Baz is based on tla, the original GNU arch implementation by Tom Lord. After all this time we have applied more than two thousand patches (distributed in various projects). xtla.pngWe also have been using Xtla (a wonderful Emacs front-end to GNU Arch) and lately DVC (its successor, which handles GNU Arch, Bazaar, git, Mercurial and Monotone). After some months thinking about it, I decided that it was time for a change, baz was too slow working with this magnitude of patches and even slower in my PowerBook. I also wanted a fast web interface and ArchZoom was not an option as it took ages to show changes between two revisions and mostly in any operation. So, I watched the Mercurial Google TechTalk and I also read some blog entries about git and Bazaar. dvc.png I decided to give Mercurial a try as it also had complete DVC support and a great web interface (like the darcs one).

One of the things I needed was a tool to convert our baz repositories to Mercurial. As far as I knew, there was no such a tool, so I thought I could use arch2darcs to convert the repositories to darcs and then use the Mercurial convert extension to convert them to Mercurial. I tried it but it didn't work. The Mercurial convert extension worked really well with darcs for my personal projects, so, why not write a GNU Arch converter?

After some days trying it, I have posted an issue to Mercurial BTS with a GNU Arch converter. It currently does not support directory renaming (fixed, see updates), but all other things I have tried work well. mercurial.png The converter is slow as I didn't know how to compute a complete changeset between patches easily (any help?... solved, see updates). The log files might not provide all the information needed (added, removed, modified files), so I decided to use the delta command which computes all this information, and this takes a bit of time.

To use the converter (in 0.9.5) copy it to the convert extension directory (hgext/convert) and edit the __init__.py file following, for example, the darcs converter (you'll easily see how to add it). Use the converter at your own risk, as I am sure it needs more work. I would appreciate any comments and bug reports until it is included in Mercurial (if ever).

Update 2008/04/28: The GNU Arch converter is available since Mercurial 1.0.

Update 2008/02/09: The converter does not use the delta command anymore to compute a changeset (the replay command used to merge already does it). This has increased speed drastically (in the order of hours).

Update 2008/02/06: The GNU Arch converter has been added to Mercurial development branch. Thanks!

Update 2008/02/04: Directory renaming is now supported. A bug related to link modifications has been fixed. The '--rev' option is also supported. You will need to download and install the development branch (hg clone http://hg.intevation.org/mercurial/crew) and apply the patch provided here.

Update 2008/02/01: Yesterday, I found this page (weird, as I didn't see it some days ago) which talks about GNU Arch conversions to Mercurial. None of the converters uses the convert extension, but I guess it would had been easier to reuse them.

11 responses

  1. australianwritingsaustralianwritings essay services says:

    Over the last two years technology changed in the field of science. That's the reason GNU institute take it over the time. It's good invent by them.

  2. Programming Project Help says:

    Really i appreciate the effort you made to share the knowledge. This is really a great stuff for sharing. Keep it up . Thanks for sharing.

  3. Essay Help says:

    The leading assignment help UK firm offers state of the art services to its clients with a promise of delivering all the required work well within the deadline.

  4. need help writing a dissertation says:

    Science Channel’s are giving a complete knowledge to its viewers about every thing students write done dissertation on this subjects and show its importance.

  5. robux generator says:

    hey friends if you want to generate lots of robux for free then must try my link to get it for free

  6. jurek334sc says:

    All the details are in this post is awesome

  7. roblox hack says:

    Hey friends if you are a gamer and want to hack roblox then must try my link its amazing

  8. aqoo maama says:

    dfsd

  9. Do my Essay says:

    The arch of the GNU has a few highlights that make it particularly helpful for open free software extends it's anything but difficult to learn it is reasonable and simple to oversee it is a dispersed framework so there is no compelling reason to give compose consent to every member of the undertaking it has great help for the kinds of progress and merger that can influence the free software to extend group sparkle.

  10. Case Study Writing Services says:

    I Appreciate Your Efforts In Preparing This Post. I Really Like Your Blog Articles.

  11. Assignment Help says:

    Many times students are tensed for their projects and assignments, so at that time they can take online assignment help to complete it on time. There are experts available online who prepare the perfect assignment for you. Assignment Help

Leave a Reply