OCamlPro/opam — pull request #333 by venator (2012-12-18 16:15:27+00:00)
Title: Darcs backend

A darcs backend for OPAM, very close to the Git one, except for a few workarounds, when darcs has no equivalent for git commands: there is no branch in darcs, only the local copy and the local `_darcs` repository; working with remote branches which haven't been merged yet is therefore very limited. In this module, the following operations (implemented in the git module) were not directly supported by darcs:

- setting a remote repository: there is no dedicated command with darcs. However, commands accessing a remote repository provide a '--set-default' option to remember the repository used.
- downloading changes without merging: `darcs fetch` can only download patch bundles, which we save to a temporary `opam_update.bundle` file, used later on by `darcs apply` to actually integrate them to the local copy and repository.
- producing a diff of changed files on a remote repository: this is not possible with darcs, due to previous limitations. The workaround used here is: tag the current local repository, pull changes, make a diff of changes since the tag, erase the tag and subsequent changes in order to recover the initial state.