cvs.rst
changeset 1010 c7352d68c95e
parent 1009 be52d3742472
child 1011 c006c2f27f51
equal deleted inserted replaced
1009:be52d3742472 1010:c7352d68c95e
     1 -*- coding: utf-8 -*-
       
     2 
       
     3 ======
       
     4  CVS.
       
     5 ======
       
     6 
       
     7 CVS via proxy server.
       
     8 =====================
       
     9 ::
       
    10 
       
    11   $ cvs -d:pserver;proxy=$proxyhost;proxyport=$proxyport:$cvsuser@$cvsdomain:/$repo
       
    12 
       
    13 Create CVS Repository.
       
    14 ======================
       
    15 ::
       
    16 
       
    17   $ export CVSROOT=/srv/cvsroot
       
    18   $ cvs init
       
    19 
       
    20   $ groupadd cvs
       
    21   $ useradd -m -g cvs -s /bin/sh -c "CVS Repository"  cvs
       
    22 
       
    23   $ chown -R cvs $CVSROOT
       
    24   $ chgrp -R cvs $CVSROOT
       
    25   $ chmod -R g+s $CVSROOT
       
    26 
       
    27   $ grep cvs /etc/services && echo OK
       
    28   cvspserver      2401/tcp              # CVS client/server operations
       
    29   cvspserver      2401/udp              # CVS client/server operations
       
    30   $ echo '# CVS server
       
    31   cvspserver  stream  tcp  nowait  root  /usr/bin/cvs cvs --allow-root=/usr/local/src/cvsroot pserver' \
       
    32       >/etc/inetd.conf
       
    33   $ killall -HUP inetd                  # signal inetd daemon to re-read the config file
       
    34 
       
    35   $ ls $CVSROOT/CVSROOT
       
    36   readers                   # list of pseudo usernames that can read via cvspserver
       
    37   writers                   # list of pseudo usernames can write via cvspserver
       
    38   passwd                    # encrypted passwd string with (htpasswd from apache)
       
    39 
       
    40 CVS workflow.
       
    41 =============
       
    42 
       
    43 Check out sources::
       
    44 
       
    45   $ cvs co -P $proj
       
    46 
       
    47 Status of changes::
       
    48 
       
    49   $ cvs status
       
    50 
       
    51 Compare local changes::
       
    52 
       
    53   $ cvs diff -u $path
       
    54 
       
    55 Creating patch::
       
    56 
       
    57   $ cvs diff -N -u -r >$patch
       
    58 
       
    59 History of changes::
       
    60 
       
    61   $ cvs log $file
       
    62 
       
    63 Remove a file::
       
    64 
       
    65   $ rm $file            # must first remove it locally
       
    66   $ cvs rm $file        # schedules it for removal
       
    67 
       
    68 Add a file::
       
    69 
       
    70   $ cvs add $file
       
    71 
       
    72 Check in local changes::
       
    73 
       
    74   $ cvs ci
       
    75 
       
    76 Update local sources::
       
    77 
       
    78   $ cvs update
       
    79 
       
    80 Move a file can not be done cleanly at the local level. The best way to do this
       
    81 with CVS is to go to the cvsroot repository and move the file or directory
       
    82 within the repository there. The cvsroot repository keeps all files in their RCS
       
    83 form of filename,v . The next cvs update will manifest the file move.
       
    84 
       
    85 Tagging sources::
       
    86 
       
    87   $ cvs tag $name
       
    88   $ cvs rtag $name
       
    89 
       
    90 Revert file::
       
    91 
       
    92   $ rm $file            # remove it from local sources
       
    93   $ cvs update $file    # get a new copy from the repository
       
    94