140 likes | 260 Views
CMSC 345 Fall 2000. Software Configuration Management. What is SCM. Software configuration management (SCM) is the art of identifying, organizing, and controlling modifications to the software being built by a programming team. SCM is needed because change can occur any time
E N D
CMSC 345 Fall 2000 Software Configuration Management
What is SCM • Software configuration management (SCM) is the art of identifying, organizing, and controlling modifications to the software being built by a programming team. • SCM is needed because change can occur any time • SCM can also be described as a set of tracking and control activities to manage change throughout the software life cycle.
Version Control • In (large) team projects, many programmers may need to modify the same source file, perhaps at the same time • Without proper procedures, changes cannot be tracked and may actually be lost • Version Control Systems provide a repository and procedures for managing (source) files
Version Control Systems • PC/Windows based systems • Mircosoft Visual Source Safe • Merant’s PVCS • Unix Version Control • SCCS – Source Code Control System • RCS – Revision Control System
RCS Repository • Repository -- A directory called RCS • Each team has an RCS directory under/afs/umbc.edu/users/d/e/dennis/pub/cs345/RCS • Create a symbolic link (ln –s) to your team’s repository • ln -s /afs/umbc.edu/users/d/e/dennis/pub/cs345/RCS/TEAM1 RCS
RCS -- Checking Out • CO – the RCS checkout command • co retrieves a revision from each RCS file and stores it into the corresponding working file. • co filename (no parameters) • retrieve the latest version – READ ONLY • co –l filename • Retrieve the latest version and LOCK IT
RCS – Checking In • CI – the RCS check-in command • ci filename • check in this revision and make it the latest version • Ci –l filename • Check in this version, but keep it locked • ci prompts for a log message which should summarize your changes • Creates filename,v in the repository
RCS - $Log$ • Insert $Log$ into file header comment • RCS will write a log into your file with each checkin consisting of • The log message supplied during checkin, preceded by a header containing the RCS filename, the revision number, the author, and the date and time. • Existing log messages are not replaced. • The new log message is inserted after $Log:...$. This is useful for accumulating a complete change log in a source file.
RCS -- $Log$ (cont’d) • Each inserted line is prefixed by the string that prefixes the $Log$ line. • For example, the initial log comment of a C program conventionally is of the following form: /* * $Log$ */
Versions and Branches • Initial version is designated 1.1 • # before decimal is the release number • # after decimal is the level number • New versions are created when files are checked in by automatically incrementing the level number • New release numbers may be created manually • “Branches” (e.g. 1.3.1.1) are also possible
RCS Deltas • Only the most recent version is saved in its entirety. • Older versions are stored as deltas • Only the changes are saved • Changes are applied in reverse order to create old versions as required • DO NOT edit RCS files (,v ) directly
Other RCS commands • rcs – change RCS file attributes • rcs –l filename --- lock filename • rcs –u filename – unlock filename • rcsdiff – compares RCS revisions • rcsdiff filename – compares current working file with latest revision • rlog – prints log messages and other information about RCS file
RCS and make • make file entries can be used to automatically checkout needed source files. • For example main.c: main.h co main.c
RCS Resources • Tutorial --http://www.jodypaul.com/SWE/RCSTutorial/RCSTutorial.html • Unix man pages • Books available