author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 19 Oct 2015 17:04:52 +0300 | |
changeset 1769 | cadd23f8127f |
parent 1437 | caeb534c6e59 |
child 1829 | f001ff60c027 |
permissions | -rw-r--r-- |
1334
9bf0d5a1f0cf
Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1029
diff
changeset
|
1 |
.. -*- coding: utf-8; -*- |
9bf0d5a1f0cf
Include common header with quick links.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1029
diff
changeset
|
2 |
.. include:: HEADER.rst |
1028 | 3 |
|
4 |
====== |
|
5 |
CVS. |
|
6 |
====== |
|
1029 | 7 |
.. contents:: |
1028 | 8 |
|
9 |
CVS via proxy server. |
|
10 |
===================== |
|
11 |
:: |
|
12 |
||
13 |
$ cvs -d:pserver;proxy=$proxyhost;proxyport=$proxyport:$cvsuser@$cvsdomain:/$repo |
|
14 |
||
15 |
Create CVS Repository. |
|
16 |
====================== |
|
17 |
:: |
|
18 |
||
19 |
$ export CVSROOT=/srv/cvsroot |
|
20 |
$ cvs init |
|
21 |
||
22 |
$ groupadd cvs |
|
23 |
$ useradd -m -g cvs -s /bin/sh -c "CVS Repository" cvs |
|
24 |
||
25 |
$ chown -R cvs $CVSROOT |
|
26 |
$ chgrp -R cvs $CVSROOT |
|
27 |
$ chmod -R g+s $CVSROOT |
|
28 |
||
29 |
$ grep cvs /etc/services && echo OK |
|
30 |
cvspserver 2401/tcp # CVS client/server operations |
|
31 |
cvspserver 2401/udp # CVS client/server operations |
|
32 |
$ echo '# CVS server |
|
33 |
cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/usr/local/src/cvsroot pserver' \ |
|
34 |
>/etc/inetd.conf |
|
35 |
$ killall -HUP inetd # signal inetd daemon to re-read the config file |
|
36 |
||
37 |
$ ls $CVSROOT/CVSROOT |
|
38 |
readers # list of pseudo usernames that can read via cvspserver |
|
39 |
writers # list of pseudo usernames can write via cvspserver |
|
40 |
passwd # encrypted passwd string with (htpasswd from apache) |
|
41 |
||
42 |
CVS workflow. |
|
43 |
============= |
|
44 |
||
45 |
Check out sources:: |
|
46 |
||
47 |
$ cvs co -P $proj |
|
48 |
||
49 |
Status of changes:: |
|
50 |
||
51 |
$ cvs status |
|
52 |
||
53 |
Compare local changes:: |
|
54 |
||
55 |
$ cvs diff -u $path |
|
56 |
||
57 |
Creating patch:: |
|
58 |
||
59 |
$ cvs diff -N -u -r >$patch |
|
60 |
||
61 |
History of changes:: |
|
62 |
||
63 |
$ cvs log $file |
|
64 |
||
65 |
Remove a file:: |
|
66 |
||
67 |
$ rm $file # must first remove it locally |
|
68 |
$ cvs rm $file # schedules it for removal |
|
69 |
||
70 |
Add a file:: |
|
71 |
||
72 |
$ cvs add $file |
|
73 |
||
74 |
Check in local changes:: |
|
75 |
||
76 |
$ cvs ci |
|
77 |
||
78 |
Update local sources:: |
|
79 |
||
80 |
$ cvs update |
|
81 |
||
82 |
Move a file can not be done cleanly at the local level. The best way to do this |
|
83 |
with CVS is to go to the cvsroot repository and move the file or directory |
|
84 |
within the repository there. The cvsroot repository keeps all files in their RCS |
|
85 |
form of filename,v . The next cvs update will manifest the file move. |
|
86 |
||
87 |
Tagging sources:: |
|
88 |
||
89 |
$ cvs tag $name |
|
90 |
$ cvs rtag $name |
|
91 |
||
92 |
Revert file:: |
|
93 |
||
94 |
$ rm $file # remove it from local sources |
|
95 |
$ cvs update $file # get a new copy from the repository |
|
96 |
||
1436
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
97 |
List of CVS branches. |
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
98 |
===================== |
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
99 |
|
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
100 |
There are no such command but this command allow extract such info:: |
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
101 |
|
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
102 |
$ cd $CVS_PROJ |
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
103 |
$ cvs rlog -l -h -b $(cat CVS/Repository) |
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
104 |
|
1437 | 105 |
Update to HEAD. |
106 |
=============== |
|
107 |
:: |
|
108 |
||
109 |
$ cvs up -A |
|
110 |