“darcs put” is very slow, it works by initalizing a repository, then pushing all patches of the current repo to the new repo (darcs push –all).

However, “darcs put” is useful to deploy repostories on ssh-accessible machines, with a single command. Users want to keep it.

One way to make it faster is to make it rely on “darcs get”, ie, to make it get the remote repo. As in the normal use case there is only one, forward, ssh connexion, this is not possible unless one sends the repo to the remote machine and does a “darcs get” on it.

Sending the repo may use a lot of bandwidth, so one idea is to enable “darcs get” to get from tarballs (darcs get project.tar.gz, containing a _darcs).

What would happen with “darcs put user@machine:repos/”:

  1. do a local get –complete
  2. do a tar.gz of the _darcs
  3. scp the tar.gz
  4. do a remote “darcs get” on the tar.gz
  5. remove the .tar.gz archives and local repo

the assumption is that “darcs get zzzz.tar.gz” is always done on complete repositories (no lazy) tarballs

How darcs get repo.tar.gz works

Do a decompress then a darcs revert -a

UI and flags

darcs put --no-keep-tarball (default)
darcs put --keep-tarball (create a mirror of the current repository and leave the .tar.gz)
darcs put --tarball-only (creates a .tar.gz of the repository)

( –tarball-only, –keep-tarball and –no-keep-tarball* should be mutually exclusive )


darcs get
Getting the remote tarball ""...
Uncompressing "oldproject.tar.gz"...
Rebuilding working copy...
Deleting "oldproject.tar.gz"...

Possible flags:

darcs get --no-keep-tarball (default)
darcs get --keep-tarball
darcs get --tarball-only


darcs get --tarball-only url/repo.tgz
Getting the remote tarball " "...
Not doing anything more, as asked.

darcs get --keep-tarball url/repo.tgz
Getting the remote tarball " "...
Uncompressing "repo.tar.gz"...
Rebuilding working copy...
Not deleting " ", as asked.

darcs put ui:

darcs put user@machine:www/repos/
darcs put --tarball-only user@machine:www/repos/

Refuse to do any local put without –tarball-only


Faster darcs put. Ability to deploy .tar.gz repositories (for archiving purpose, for instance)

When to do that

Wait for Petr’s command flag refactoring to go in.

Related work