wiki:Notes/RCSUsage

Version 15 (modified by MarkWieringa, 16 years ago) (diff)

--

Notes/RCSUsage

Quick notes on use of the repository

Basic Usage

  • use the mirtree tool to set up a workspace.
       unix% cd /data/DISK/somewhere
       unix% mkdir miriad_cabb
       unix% cd miriad_cabb
       unix% /nfs/atapplic/miriad/linux/bin/mirtree #creates a "miriad" subdirectory
    
  • set the RCSINIT environment variable so it forces use of the CABB branch by default.
       unix% setenv RCSINIT "-rcabb"   # see ci(1) manpage for syntax
    
  • make your edits, and check in the changes
       unix% cd prog
       unix% co -l atlod.for
       unix% vi atlod.for
       unix% ci -u -m"support frobznagling mode" atlod.for
    
  • When you want to work with RCS files for a different project, you will need to unset RCSINIT
       unix% unsetenv RCSINIT
    

Adding a new file

To create a new file in the CABB branch it is first necessary to check in an empty file on the trunk as revision 1.0 (remove RCSINIT definition first):

   unix% unsetenv RCSINIT
   unix% mv mynewprog.for mynewprog.for.tmp
   unix% touch mynewprog.for
   unix% ci -r1.0 -m"Empty revision." mynewprog.for

enter an appropriate description for the new file as ci requests. Then create symbolic revision names:

   unix% rcs -ncabb_branchpoint:1.0 -ncabb:1.0.1 mynewprog.for

Finally, create the initial revision on the branch:

   unix% mv mynewprog.for.tmp mynewprog.for
   unix% ci -u -rcabb.1 -m"Initial cabb branch checkin" mynewprog.for

Background

  • The miriad master tree lives in /nfs/atapplic/miriad
  • There is a branch point on the "trunk", with the symbolic name "cabb_branchpoint"
  • The CABB tree branches off from there. The current latest version in the branch is denoted by the symbolic name "cabb".
    Example:
    % rlog -h /nfs/atapplic/miriad/prog/atlod.for
    
    RCS file: /nfs/atapplic/miriad/prog/RCS/atlod.for,v
    Working file: /nfs/atapplic/miriad/prog/atlod.for
    head: 1.6
    branch:
    locks: strict
    access list:
    symbolic names:
       cabb: 1.6.1
       cabb_branchpoint: 1.6
    keyword substitution: kv
    total revisions: 53; selected revisions: 53
    description:
    Convert an RPFITS file into Miriad uv format.
    
    
  • Make sure to use symbolic revision names, in general use.
  • You can use revision numbers in special cases (e.g. you are trying to reverse a checked-in change).
    But note that the correspondence of symbolic name and revision number is different for every RCS file.
  • The RCS revision numbers have four parts: L.U.B.S, being Level, Update, Branch, Sequence
    Without branches, you only get only L.U type numbers, e.g. 1.6.
    When you make a branch, the branch point is marked by the .B part of the number, e.g. 1.6.1. for the first branch off revision 1.6.
    When you change a file on a branch, the Sequence number is incremented, e.g. 1.6.1.1, 1.6.1.2, etc.
  • You may find cvsgraph useful to visualise the branch structure of a particular file
       unix% cvsgraph -r. RCS/atlod.for,v >atlod.png
    

See also

Notes Home