CS-300 Project Requirements
Instructor: Supreeth Venkataraman
Summer 2008
A “revision control system” (rcs) is a program that manages files. The rcs required by this document is hereafter referred to as “Vers”.
Vers users expect to work as follows:
Users will issue commands to “Vers” at the “Vers shell”. This prompt will be displayed after the completion of each command unless the user types “exit” or “logoff.” Users look at versions of the file with the “Get” command, and in case something goes badly wrong, one of these versions might be renamed and put under control as the start of a new version sequence. Users “Check-out” the current version, edit locally, and then “Check-in” the edited version. If there is a conflict because two users wish to “Check-out” the same file, then the user who performs a “Check-out” on the file first has priority and the second user must wait until the first user does a “Check-in”. Then the second user may perform a “Check-out” on the file.
An initial version of a file is put under control with the “New” command. Any user should be able to run this command to add a new file in Vers, and this file will be visible to all users allowed to access Vers.
OR1. Vers is to see to it that files can be checked in and checked out of Vers by users.
OR2. All files are assumed to be be in the ASCII text format.
OR3. The version checked out is called the “Most Recent Version” of the outstanding file.
OR4. When files are checked out, it is not possible for other users to check out the same file. This is to avoid a conflict between changes different people may make to the same version.
OR5. Whatever file mechanisms Vers uses, it is assumed that internal files in its repository will not be modified by any other program or command outside Vers itself.
OR6. A file is 'under control' of Vers from when a user uses the "new" command until the user uses the "kill" command to remove all versions of the file from the repository.
OR7. In the command description, text represents itself, except that names in angle brackets "<>" represent required parameters. "<file>" is the name of a file, and "<version>" is the version number.
OR8. Square brackets "[]" indicate an optional parameter. If the optional parameter is not used in the command, Vers uses the "default" parameter value.
OR9.
The names of files are alphanumeric, and
can have a maximum length of 30 characters including the file extension. The
'.' character is allowed for the purposes of
file extensions. The ‘.’ character can also be used to name files like “.cshrc”, “.config”, “.htaccess” etc.
OR10. Version numbers are positive integers and start with the number 1.
OR11. The number of files that can be stored by vers
is limited to 100. However, each file can potentially have 2^32 number of
versions.
OR12. Vers will
issue error messages for every instance of unexpected behavior. It is not
required of vers to issue success messages.
OR13. A “<file>” must
always be under control (an exception is made for the “update” command), and a “<version>” must be one of the
existing versions. If not, an appropriate error message will be issued.
OR14. All “Vers” commands will be in lowercase
AR1.
Users must have identification information
that allows them to access “Vers.” The identification
information consists of a username and a password.
AR2.
The username shall be 1-8 characters and
will use the alphabet [a-z].
AR3.
The password will be 1-8 characters long
and can be made up of any printable ASCII character.
AR4.
All users have the same rights
AR5.
“Vers” can
handle a maximum of 5 users.
AR6.
The user can execute all the commands in “Vers”. These are “new”, “kill”, ”get”, “check-out”, “check-in”,
“update”, “status”, “revert”, and “help.”
User
Interface Features
UI1.
Vers will be started by typing "vers"
at the command shell
UI2.
Users will need to be authenticated in
order to access "vers"
UI3.
The password will not be echoed on the
screen when the user types it in. Three incorrect attempts at logging in causes
“vers” to terminate.
UI4.
Once the authentication is completed,
"vers" will display a prompt for users to
issue commands. This prompt will be repeatedly displayed until the user wishes
to exit "vers".
UI5.
The "exit" command is used to
exit "vers" completely.
UI6.
It
is assumed that only one user will be allowed to be logged into "vers" at any point in time, and other users will have
to wait until the current user is done.
File
Operation Commands
1.
new <file>
<file> is to be placed under control for the first time. <file> must exist in the current directory of the
user, and must not already be under control.
The contents of <file>
become the MRV of that name. The <file>
is copied into the system using this command. When a file is added to the
repository using the "new" command, the MRV of the file is 1. Empty files can
be created.
2.
kill <file>
<file> must be under control,and not checked
out. All of its versions must be wiped out.
3.
get <file> [<version>]
The <version> must
be copied into the current working directory. If a version is not specified, then the MRV of the
file is copied into the current working directory of the user.If
<file> exists there, it is
overwritten unless the user already has checked out the MRV of the file. In
this case, issue an error message and deny the action. This is not a check-out. The file must not be locked as a result of
this command. If a user tries to check
in a file that has been retrieved using the get command, the action has to be
denied.
4.
check-out <file>
The MRV V of <file>
is checked out. This means that version
V of <file> is copied to the
current working directory, overwriting a file by that name there (if any). Only the MRV can be checked out. The checkout
command also will implicitly pin the file being withdrawn for modification, and
thus prevents further checkouts until the pinned file is checked back in.
5.
check-in <file>
The <file> must
exist in the current directory. If the
MRV of <file> is V, then <file> from the current directory
becomes the MRV, assigned number V + 1. The checkin
command will also implicitly unpin the file that is checked back in thereby
allowing for checkouts. If the current version is V, then the MRV of the
checked in file will be V + 1. Empty files, and files
that have been checked out, but not modified are allowed to be checked in. In
either case, the MRV is incremented.
6.
update <file1> <file2>
The update command allows a user to append <file1> in the repository. The contents to be added to <file1> are present in <file2>. <file1> must not be checked-out. The MRV is updated to V+1. <file 2>
will be external to Vers and not under control.
7.
status [<file>]
The current status information about [<file>] must be displayed. This would include the filename, MRV,
the time of last modification, and if the file is currently checked out, the
identity of the user that did the check out. If the user did not specify
a file name, then a brief summary (filename, MRV, time of modification) of all
the files currently under control of 'Vers'
must be displayed.
8. revert <file>
<version>
Vers will roll back the MRV of <file> to <version>. This command is provided should the user feel the
need to roll back to a previous stable version of the file.
9. help
Vers will display a list of all available commands
with a brief description of each.
UI7.
exit
The exit command exits
“vers” and takes the user back to the UNIX prompt