[Top] [Prev] [Next]

3. Detailed Design

This system will initialy only provide enough of the interface to the SCCS commands to provide us with add, get, checkout, and checkin. This subset is all that is needed for most projects, and it is what is requed for building a project level versioning system on top of this system.

The system will be designed and coded so that the acutal process that is used to do the file level source control on the server [SCCS] is abstracted into the basic operations. This will allow us to swap (with as few changes as possible) in a different file level versioning system.

3.1 Basic Functionality

The source code control system will need to provide a core set of functions. Any given implementation for the underlying source control system will need to also provide this core functionality.

3.1.1 add

This functionality must be the first to be implemented. All that this command will be designed to do is add a file to the source archive and give it an initial version number. It should fail if the file already exists in the archive.

Add will take three arguments, the path the file is to be stored under, the name of the file, and an optional comment. A new file will be set up in the archive, and set to the initial version number.

Example:

  net_sccs add rc_classloader.java /jvision/cross_platform/front_end/src


3.1.2 get

This is the simpelest of all the commands, but cannot be implemented first. If you can't add files to the repository, how can you retreive them? This command must support the ability to retreive any version of the file, or by default the latest version of the file.

Get must support specification of: the file name, the path the file is to be retreived from, and an optional version number for the retreived file.

Example:

  net_sccs get rc_classloader.java /jvision/cross_platform/front_end/src

  net_sccs get -v 1.0 rc_classloader.java /jvision/cross_platform/front_end/src


3.1.3 checkout

Checkout must provide the user with the ability to check out the most recent version of a file by default, or to check out any pervious version of a file. It must also prevent other users from checking out the same file untill the original user has checked it back in.

3.1.4 checkin

Checkin should place the new version of the soruce file into the archive, with the version number incremented. This command, as well as the add command should provide the ability to choose the version number. To keep the behavior of this command as simple as possible, it will only know how to increment the last set of digits in a source file version.

3.2 Object Heirarchy

To facilitate the abstractoin of the underlying source control system, a base class rc_scs has been created. This base class defines members basic to the concept of scs.

                                  ------------
                                 |   rc_scs   |
                                  ------------
                                 | add()      |
                                 | get()      |
                                 | checkin()  |
                                 | checkout() |
                                  ------------
                                       |
                                       |
                               -----------------
                              |                 |
                              |                 |
                         ------------      ------------
                        | rc_rcs     |    | rc_sccs    |
                         ------------      ------------
                        | add()      |    | add()      |
                        | get()      |    | get()      |
                        | checkin()  |    | checkin()  |
                        | checkout() |    | checkout() |
                         ------------      ------------

This design should allow the source system to dymicly choose the underlying source control system at runtime. It should also allow for the ability to include new source control systems to be added in the future.



[Top] [Prev] [Next]