NunoNunes.org

Loading
Entries by year
Entries by month
November
Sun Mon Tue Wed Thu Fri Sat
 
19
       
Powered by Blosxom
Creative Commons License

darcs

darcs is a version control system touted by it’s author as “a replacement for CVS”.

From the project’s page:

darcs is decentralized, based on a “theory of patches” with roots in quantum mechanics.

Groovy!

It includes a CGI interface that allows browsing of the repository via the Internet.

Resources

My notes on darcs

These notes where taken either through the documentation reading process or through its usage.

Off-line operation and branch philosophy

Each copy of the source is a fully functional branch or every copy of your source code is a full repository. This allows for developing off-line and totally experimental branches with full darcs functionality available and later, if so desired these changes are then merged in with the other repositories.

The contrast with CVS is very clear in that in CVS there is only one master repository and each local copy is check-out once and all check-ins and so on must be performed with on-line access to the repository.

The theory of patches behind darcs

The philosophy behind darcs is that of patches. Each patch has some meta-information associated with it and this enables some advanced manipulation of the repository and the patches. The basic premisses behind the patches formalism are the following:

  1. Every patch is invertible;
  2. Sequential patches may be re-ordered but there may be dependencies between patches which may affect this re-ordering property;
  3. Parallel patches (in different parallel trees) can be merged, and the result of a set of merges is independent of the order in which the merges are performed.

Layers of a versioning tool

  1. The ability to manipulate changes. This one is central and fundamental do darcs;
  2. A database system to keep track of the changes. In darcs this consists of an ordered list of patches (and the patches themselves), one per file;
  3. A distribution system for the changes. the system for achieving this depends on a dumb server (Apache or some sort of NetworkFileSystem) for pulling patches but uses a more reliable/secure mechanism (scp or GPG-signed email messages) when pushing patches in.

Feature short-list

  • Local record changes: A record is equivalent to a CVS checkin and it is always done locally obviating the need for network access or even a special disconnected mode;

CVS to darcs command correspondence

cvs checkout darcs get
cvs update darcs pull
cvs -n update darcs pull —dry-runsummarize remote changes
cvs -n update darcs whatsnew —summarysummarize local changes
cvs -n update | grep ‘?’ darcs whatsnew -ls | grep ^a list potential files to add
rm; cvs update darcs revert
cvs diff darcs whatsnew checking local changes
cvs diff darcs diff checking recorded changes
cvs commit darcs record commiting locally
cvs commit darcs tagmarking a version for later use
cvs commit darcs push or darcs send commiting remotely
cvs diff | mail darcs send
cvs add darcs add
cvs tag -b darcs get
cvs tag darcs tag

About this entry

Originally written on Nov 19, 2004 @ 11:53
Read article on it's own page (permalink)

The content of this site is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.