Setup Darcs
Darcs is a great distributed version control system written in Haskell. I setted up a darcs server this morning. I feel it necessary to write down something about the process of making it work, due to the unclear document on the web.
setting up the darcs server:
- require darcs
- require darcs-server (including 2 perl script and 1 config)
- require web server supporting cgi
- exporting the PATH to darcs
- copy darcs-server.pl to cgi-bin directory of the web server. Configure the web server if necessary, say, to specify the cgi-bin dir, and to specify the interpretor for perl script, etc.
- modify the darcs-server.pl, set the following line : "my $darcs_server_home = the directory containing the darcs-server"
- modify the config file in darcs-server directory, add repositories at the end of file.
- well done.
setting up the darcs client:
- require darcs
- require darcs-client
- export (DARCS_APPLY_HTTP,darcs-client apply) to ENV. NOTE that the downloaded the executable file in darcs-client package is named darcs-client-version, you can either rename it with darcs-client or change the value with "darcs-client-version apply" in the env pair above.
- editing the darcs-client config file. it can be found either in the ~/.darcs/server.config(global) or in the _darcs/prefs/server.config of the checked-out repos(local). If you pay no attention to authentication, this config file can be simple, following is a good example:
verbose = yes # see what darcs-client is doing
verify = yes # verify the server identity
repo http://url-to-your-repository
server = http://repos-server/cgi-bin/darcs-server.pl
sign-read = no # don't sign reads (pull and get)
sign-write = yes # but do sign writes (push)
verify = no # and don't verify this specific server
page_revision: 1, last_edited: 1208753802|%e %b %Y, %H:%M %Z (%O ago)





