author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 22 Feb 2016 12:41:52 +0200 | |
changeset 1903 | 901e7394849f |
parent 1830 | b4a5c76521df |
child 1905 | fba288d59662 |
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 |
||
1829
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
97 |
Working with CVS branches. |
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
98 |
========================== |
1436
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
99 |
|
1830 | 100 |
There are no direct command to list symbolic names for branches but this command |
101 |
allow extract such info:: |
|
1436
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
102 |
|
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
103 |
$ cd $CVS_PROJ |
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
104 |
$ cvs rlog -l -h -b $(cat CVS/Repository) |
b069e5cd5e90
List of CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
105 |
|
1830 | 106 |
Switch to branch:: |
1829
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
107 |
|
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
108 |
$ cvs up -r $BRANCH |
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
109 |
|
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
110 |
Update to HEAD:: |
1437 | 111 |
|
112 |
$ cvs up -A |
|
113 |
||
1829
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
114 |
Replace head:: |
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
115 |
|
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
116 |
$ cvs up -j$HEAD -j $NEWBRANCH |
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
117 |
|
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
118 |
Replace branch:: |
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
119 |
|
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
120 |
$ cvs up -j$OLD -j $NEW |
f001ff60c027
Working with CVS branches.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1437
diff
changeset
|
121 |