Unit - 5: Software Development
Unit - 5: Software Development
Unit - 5: Software Development
SOFTWARE
DEVELOPMENT
SCMs
Repository
Centralized SCMs
A master Repository
Ex :CVS, Subversion,Perforce
Decentralized/Distributed
SCMs
Ex : git,Bazaar,Mercurial
RCS
- Repository
- The Working copy
- Versioning models
The problem of file sharing
The lock-modify-unlock solution
The copy-modify-merge solution
The Repository
The repository usually stores information in the form of a filesystem treea hierarchy
of files and directories.
Any number of clients connect to the repository, and then read or write to these files.
By writing data, a client makes the information available to others; by reading data,
the client receives information from others.
Versioning models
Problems
Copy-modify-merge solution
To create
ci newfile.ext
When you have completed this action, check the
names in the current directory. You will find
that your file has disappeared, but a new file
with the same name followed by the characters
',v' has appeared. For example, the new file
resulting from the ci newfile.ext command
would be newfile.ext,v. These *,v files are
the RCS files.
To Edit
To work on a file, first you must check it out:
co -l filename.ext
The -l puts a lock on it, meaning that no one
else can modify it while you are working with it.
This also allows you to check it back in when
you are finished:
ci filename.ext
To Read
If you just wish to read the file, you may check
out the files without locks:
co filename.ext
However if you make any changes to the file, the
system will not let you check it back in.
Keywords
Keywords
$Author$
Username of person who checked in the revision.
$Date$
Date and time of check-in.
$Header$
A title that includes the RCS file's full pathname, revision number, date, author, state,
and (if locked) the person who locked the file.
$Id$
Same as $Header$, but exclude the full pathname of the RCS file.
$Locker$
Username of person who locked the revision. If the file isn't locked, this value is empty.
$Log$
The message that was typed during ...
Environment variables
CVSROOT variables
CVS options
-a
Authenticate all network traffic. Without this option, the initial connection for the
command is authenticated, but later traffic along the same data stream is
assumed to be from the same source.
This option is available only with GSS-API connections, but if you use ssh as
your rsh replacement in the ext connection mode, ssh authenticates the data
stream.
This option is supported if it is listed in cvs --help-options. The commandline client can be compiled to support it by using the --enableclient option to the configure script.
--allow-root= directory
Used as part of the inetd command string for the server, kserver,
and pserverconnection methods. The directory is the repository root directory
that the server allows connections to. Using --allow-root more than once in
a command allows users to connect to any of the specified repositories.
-d repository_path ...
Dot files
Dot Files
In client/server mode, all the dot files other than .rhosts should be
on the client computer. The .rhosts file should be in the user's
home directory on the server computer.
.cvsignore
Contains a list of files CVS should not process. The format is one or
more lines, with whitespace-separated filenames or shell wildcard
patterns matching files that CVS should ignore when producing
informational messages, and duringcommit, update,
or status operations. A single ! causes CVS to empty out its
ignore list and start over again with subsequent filenames or
patterns. The file may be checked into CVS.
Dot files
.cvsignore
Contains a list of files CVS should not process. See the earlier description.
.cvspass
Used in pserver remote-access mode. This file contains the user's password
for each repository the user is logged into, stored in a simple form of encoding.
Be aware that the file is human-readable and that the passwords are easy to
decrypt.
.cvsrc
Contains a list of CVS commands and the options the user wants as default
options for those commands.
.cvswrappers
Contains a list of wrappers that affect how a file is stored. The wrappers include a
pattern that CVS matches ...
Environment variables
CVS_CLIENT_LOG
Used for debugging CVS in client/server mode. If
set, everything sent to the server is stored in
the $CVS_CLIENT_LOG.in file, and
everything received by the client is stored
in $CVS_CLIENT_LOG.out.
CVS_CLIENT_PORT
Used to set the port the client uses to connect to
the CVS server in kserver,gserver,
and pserver modes. By default, the client
uses port 2401 (gserver andpserver) or
port 1999 (kserver) to connect to the server.
CVSIGNORE
A whitespace-separated list of filename patterns
that should be ignored. See the description of
the .cvsignore file, earlier in this chapter.
CVSEDITOR, EDITOR, VISUAL
Used to set the editor CVS calls when it opens
an editor for log messages. On Unix and
GNU/Linux systems, the default editor is vi.
Using CVSEDITOR is preferred over EDITOR
and VISUAL, as other variables may be used
by other programs.
CVS_PASSFILE
Used to change the file CVS uses to store and
retrieve the password in pserverremoteaccess mode. The default file
is $HOME/.cvspass.
CVSREAD
If set to 1, CVS tries to check out your sandbox
in read-only mode