[Haskell-cafe] Heads Up: code.haskell.org is upgrading to darcs 2

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Sep 10 18:17:00 EDT 2008

This email is for darcs users in general and in particular for people
who host a project on code.haskell.org.

What we are doing

We are upgrading /usr/bin/darcs to version 2 on the machine that hosts

That means it will be used by everyone who uses ssh to push or pull from
a darcs repository on code.haskell.org. Pulling via http is completely

Do I have to do anything?

No. You do not have to change anything.

darcs v2 can talk to darcs v1 clients perfectly well so you do not need
to upgrade your local version of darcs.

You do not need to change the format of your local or server-side
repositories. Darcs v2 works fine with darcs v1 format repositories.

Should I change anything?

We recommend that you upgrade your local darcs to version 2.

This will allow you to take advantage of substantially faster push/pull
operations over ssh (darcs 2 makes far fewer ssh connections).

As noted above however it is not necessary for you to upgrade or for you
to synchronise your upgrading with anyone else who uses the same

It is also possible to use a darcs "v1.5" hashed format locally
and continue to use darcs v1 format on the server side. This has some
performance and reliability advantages. Again this is something you can
decide yourself without coordinating with other users of the repository.

If your development style means that you bump into the infamous merging
problems with darcs v1 format then you may consider converting your
repository to the darcs v2 format. Remember that using darcs 2 with
darcs v1 format repositories does not eliminate the merging issue. To
banish the merging problems you have to use the darcs v2 format. This is
however a more substantial change and has to be synchronised between
users of the repository because it involves converting the server side
repository to v2 format and all users getting the repository again. So
if merging is an issue for you then you should discuss it with other
users of your repository.

Is this change safe?


Darcs 2 has a substantial test suite. It has unit tests covering the
core patch operations and also over 100 scripts doing functional
testing, including network tests. The darcs build-bots run all these
tests on all the popular platforms.

Additionally, the code in darcs 2 for handling the v1 format is mostly
the same as in darcs 1, so there are no big risks in using darcs 2 while
continuing to use darcs v1 format repositories. The main change in the
v1 format code is bug fixes, instrumentation code for
debugging/introspection and more cunning types in the patch handling
code that enforces some of the patch invariants.

Furthermore, we have done real world tests using copies of all the 153
repositories on code.haskell.org which comes to around 2GB.

We wanted to verify a couple things:
     1. that using darcs 1 on the client and darcs 2 on the server works
        fine to pull and push patches. This corresponds to a project
        where all the users are still using darcs 1.
     2. that using a mixture of darcs 1 and darcs 2 clients works when
        pushing and pulling patches between the clients via the server.
        This corresponds to a project where some users have upgraded but
        others have not yet.

We tested with darcs 1.0.9 and 2.0.2 in three combinations:
  client darcs 1, server darcs 1
  client darcs 1, server darcs 2
  client darcs 2, server darcs 2

The test consisted of obliterating a significant number of patches from
each repository and pushing them back. In a separate experiment each
repository was converted to darcs v2 format which worked without problem
in every case.

What if I have problems?

Contact support at community.haskell.org. We have made backups of all the
repositories in case there are any critical problems.

Thanks to the darcs hackers Eric Kow and Jason Dagit for doing all the
hard testing work.

Duncan, Ian and Malcolm
(part of the community server admin team)

More information about the Haskell-Cafe mailing list