How to migrate from darcs to Mercurial or git

Posted in haskell, mercurial, open source
7 comments on “How to migrate from darcs to Mercurial or git
  1. Malcolm Wallace says:

    There have been other darcs-to-git converters for a long time.
    What you don’t say, but which is hinted at ever so subtly, is that, at long last, darcs-fastconvert can also translate repos the other way. Hurrah! Now I can get stuff out of git and into darcs, something I have been wanting for ages. So thanks for the pointer…

  2. Johan Tibell says:

    Just tried to convert the network darcs repo. Unfortunately, that failed with this error message:

    fatal: mark :44 not declared

    Perhaps the darcs repo is borked somehow.

  3. Eric Kow says:

    Yep, I certainly don’t want anybody to feel locked into using Darcs, technically or culturally. The ideal is that if you use Darcs, use it because you want to, not because you have to.

    Whether you use tailor, darcs-fastconvert or some other mechanism, we hope you find it actually quite easy to transition from one to other.

    As Malcolm points out, it also goes both ways, so you could use this to try Darcs out if you’re curious about it. (We use darcs-fastconvert for benchmarking against other DVCS).

    See also http://bugs.darcs.net/issue1979 which proposes adding marksfile support to darcs-fastconvert. This would allow for incremental 2-way bridges.

    @Johan, that may be one for our BTS

  4. Petr Rockai says:

    Hi,

    Johan — your bug is fixed now. It’s just that tags have been wrongly counted in as marked (which they originally were, until I realised that’s not allowed by the stream format). I have tried to convert the network repo and didn’t run into any other issues.

    Yours,
    Petr.

    PS: darcs-fastconvert 0.1.1

  5. David Hess says:

    Thanks for the great post! Trying to follow your directions with “cabal install darcs-fastconvert” but get the following error when attempting to install atto-parsec dependency:

    [3 of 6] Compiling Data.Attoparsec.Internal ( Data/Attoparsec/Internal.hs, dist/build/Data/Attoparsec/Internal.o )

    Data/Attoparsec/Internal.hs:174:4:
    `*>’ is not a (visible) method of class `Applicative’

    Data/Attoparsec/Internal.hs:175:6:
    `<*' is not a (visible) method of class `Applicative'

    Any suggestions on how to handle this? This is on a Snow Leopard Mac with ghc-6.10.4 via mac ports and hs-cabal package.

    Thanks.

  6. David Hess says:

    Turns out darcs-fastconvert needs a more recent version of GHC. I removed the mac ports version and downloaded the latest installer from haskell.org – everything installed fine.

  7. Robin says:

    Explicitly enabling the ‘convert’ Mercurial extension was also required for me. I simply added “convert =” to the “[extensions]” section of my ~/.hgrc and everything worked.

    Thanks for this great post, Bryan.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>