CS-300 Project Requirements

Instructor: Supreeth Venkataraman

Summer 2008

 

Requirements Version 2: Revision 07/03/2008

 

Objectives and Background

 

A “revision control system” (rcs) is a program that manages files. The rcs required by this document is hereafter referred to as “Vers”. 

 

Expected Operation

 

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.

 

Functional Requirements

 

Operation Features

1.      Vers is to see to it that files can be checked in and checked out of Vers by users. 

2.      All files are assumed to be be in the ASCII text format.

3.      The version checked out is called the “Most Recent Version” of the outstanding file.

4.      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.

5.      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.

6.      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.

7.      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.

8.      Square brackets "[]" indicate an optional parameter. If the optional parameter is not used in the command, Vers uses the "default" parameter value.

9.      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.

10.  Version numbers are positive integers and start with the number 1.

11.  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.

12.  Vers will issue error messages for every instance of unexpected behavior. It is not required of vers to issue success messages.

13.  A “<file>” must always be under control, and a “<version>” must be one of the existing versions. If not, an appropriate error message will be issued.

14.  All “Vers” commands will be in lowercase

 

Authorization Features

1.      Users must have identification information that allows them to access “Vers.”

2.      All users have the same rights

3.      Vers” can handle a maximum of 5 users.

4.      The user can execute all the commands in “Vers”. These are “new”, “kill”, ”get”, “checkout”, “checkin”, “update”, “status”, “revert”, and “help.”

 

User Interface Features

 

1.      Vers will be started by typing "vers" at the command shell

2.      Users will need to be authenticated in order to access "vers"

3.      The authentication information required from the users will be a username, and a password. 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.

4.      The username shall be 1-8 characters and will use the alphabet [a-z].

5.      The password will be 1-8 characters long and can be made up of any printable ASCII character.

6.      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 logout or exit "vers".

7.      The "exit" command is used to exit "vers" completely.

8.       The "logout" command is used to log out the current user and allow another user to log in.

9.       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 implicitly pinned 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.

 

7.      status [<file>]

 

The current status information about [<file>] must be displayed. This would include the MRV, whether the file is frozen, 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 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.

 

10. logout

 

The logout command logs the user out of vers, and redisplays the login prompt so that the next user may log in.  Logout will succeed regardless of whether the user logging out has a file checked out or not.

 

11.  exit

 

      The exit command exits “vers” and takes the user back to the UNIX prompt