File: switching.tex

package info (click to toggle)
darcs 1.0.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,796 kB
  • ctags: 321
  • sloc: haskell: 14,370; sh: 941; ansic: 893; perl: 810; makefile: 49; xml: 14
file content (102 lines) | stat: -rw-r--r-- 5,137 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
\section{Switching from CVS}

Darcs is refreshingly different from CVS.

CVS keeps version controlled data in a central repository, and
requires that users check out a working directory whenever they wish
to access the version-controlled sources.  In order to modify the
central repository, a user needs to have write access to the central
repository; if he doesn't, CVS merely becomes a tool to get the latest
sources.

In darcs there is no distinction between working directories and
repositories.  In order to work on a project, a user makes a local
copy of the repository he wants to work in; he may then harness the
full power of version control locally.  In order to distribute his
changes, a user who has write access can {\em push\/} them to the
remote repository; one who doesn't can simply send them by e-mail in a
format that makes them easy to apply on the remote system.

\paragraph{Darcs commands for CVS users}
Because of the different models used by cvs and darcs, it is
difficult to provide a complete equivalence between cvs and darcs.
A rough correspondence for the everyday commands follows:\\
\begin{tabular}{lll}
{\tt cvs checkout} & {\tt darcs get} \\
{\tt cvs update} & {\tt darcs pull} \\
{\tt cvs -n update} & {\tt darcs pull \verb!--dry-run!} & (summarize remote changes) \\
{\tt cvs -n update} & {\tt darcs whatsnew \verb!--summary!} & (summarize local changes) \\
{\tt cvs -n update | grep '?'} & {\tt darcs whatsnew -ls | grep \verb!^a! } & (list potential files to add) \\
{\tt rm foo.txt; cvs update foo.txt} & {\tt darcs revert foo.txt} & (revert to foo.txt from repo) \\
{\tt cvs diff} & {\tt darcs whatsnew} & (if checking local changes) \\
{\tt cvs diff} & {\tt darcs diff} & (if checking recorded changes) \\
{\tt cvs commit} & {\tt darcs record} & (if committing locally) \\
{\tt cvs commit} & {\tt darcs tag} & (if marking a version for later use) \\
{\tt cvs commit} & {\tt darcs push} or {\tt darcs send} &
                                        (if committing remotely) \\
{\tt cvs diff | mail} & {\tt darcs send} \\
{\tt cvs add} & {\tt darcs add} \\
{\tt cvs tag -b} & {\tt darcs get} \\
{\tt cvs tag} & {\tt darcs tag}
\end{tabular}

\paragraph{Migrating CVS repositories to darcs}

Tools and instructions for migrating CVS repositories to darcs are provided
on the darcs community website: 
\htmladdnormallinkfoot{http://www.scannedinavian.org/DarcsWiki/ConvertingFromCvs}{http://www.scannedinavian.org/DarcsWiki/ConvertingFromCvs}


\section{Switching from arch}

Although arch, like darcs, is a distributed system, and the two systems
have many similarities (both require no special server, for example), their
essential organization is very different.

Like CVS, arch keeps data in two types of data structures:
repositories (called ``archives'') and working directories.  In order
to modify a repository, one must first check out a corresponding
working directory. This requires that users remember a number of
different ways of pushing data around --- \verb|tla| \verb|get|,
\verb|update|, \verb|commit|, \verb|archive-mirror| and so on.

In darcs, on the other hand, there is no distinction between working
directories and repositories, and just checking out your sources
creates a local copy of a repository.  This allows you to harness the
full power of version control in any scratch copy of your sources, and
also means that there are just two ways to push data around:
\verb|darcs| \verb|record|, which stores edits into your local
repository, and \verb|pull|, which moves data between repositories.
(\verb|darcs| \verb|push| is merely the opposite of \verb|pull|;
\verb|send| and \verb|apply| are just the two halves of \verb|push|).

\paragraph{Darcs commands for arch users}

Because of the different models used by arch and darcs, it is
difficult to provide a complete equivalence between arch and darcs.
A rough correspondence for the everyday commands follows:\\
\begin{tabular}{lll}
{\tt tla init-tree} & {\tt darcs initialize} \\
{\tt tla get} & {\tt darcs get} \\
{\tt tla update} & {\tt darcs pull} \\
{\tt tla file-diffs f | patch -R } & {\tt darcs revert} \\
{\tt tla changes --diffs} & {\tt darcs whatsnew} \\
{\tt tla logs} & {\tt darcs changes} \\
{\tt tla file-diffs} & {\tt darcs diff -u} \\
{\tt tla add} & {\tt darcs add} \\
{\tt tla mv} & {\tt darcs mv} & (not {\tt tla move}) \\
{\tt tla commit} & {\tt darcs record} & (if committing locally)\\
{\tt tla commit} & {\tt darcs tag} & (if marking a version for later use)\\
{\tt tla commit} & {\tt darcs push} or {\tt darcs send} & 
                                                  (if committing remotely)\\
{\tt tla archive-mirror} & {\tt darcs pull} or {\tt darcs push} \\
{\tt tla tag} & {\tt darcs get} & (if creating a branch) \\
{\tt tla tag} & {\tt darcs tag} & (if creating a tag).
\end{tabular}

\paragraph{Migrating arch repositories to darcs}

Tools and instructions for migrating arch repositories to darcs are provided
on the darcs community website: 
\htmladdnormallinkfoot{http://www.scannedinavian.org/DarcsWiki/ConvertingFromArch}{http://www.scannedinavian.org/DarcsWiki/ConvertingFromArch}