Using Zeus Lite with CVS

Find Tips and tricks on how to better use the Zeus IDE. Feel free to post your own tips but please do not post bug reports, feature requests or questions here.
Post Reply
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Using Zeus Lite with CVS

Post by jussij »

IMPORTANT: These instructions only apply to the 32 bit version of Zeus and in particular the only installer that contains the CSV module is the Zeus Lite installer.

Zeus Lite ships with Zeus SCC-CVS module which allows the IDE to work with the Concurrent Versions System (CVS).

Configuring Zeus SCC-CVS
Start the Zeus IDE and use the Options, Source Control Options menu and select the Zeus SCC-CVS module from the list of installed SCC modules.

Also make sure the Enable SCC Version Control option is selected and use the Advanced SCC Options button to be further customize the features of the plug-in.

Importing a Project into CVS
With the Zeus SCC-CVS enabled it's time to tackle the task of adding something into a CVS archive. Assuming a directory structure that looks something like this:

Code: Select all

  c:\projects\
        +--- cvsroot
  c:\work\
        +--- example
               +--- example.c
               +--- example.h
In the example above the cvsroot directory defines the location of the CVS archive and the example directory is some other directory that contains the files to be imported into the CVS archive.

At the DOS command line change to the c:\work\example directory and run the following command line:

Code: Select all

cvs.exe -d:local:c:\projects\cvsroot init
This command will initialize the CVS system. If this command fails to run then most likely the cvs.exe is not in the system path.

The -d:local:c:\projects\cvsroot option tells CVS the location of the CVS archive and this name matches the archive directory that was created earlier.

Another way to tell CVS the location of the archive would be to use the following environment variable:

Code: Select all

SET CVSROOT=c:\projects\cvsroot
With the CVS system successfully initialized, the next step is to import the project files into the archive so again, at the DOS command line type in the following command line:

Code: Select all

cvs -d:local:c:\projects\cvsroot import -m "Importing Example" example Vendor Release
The -m "Importing Example" is a comment string that will be attached to newly created project.

The example command line option specifies the name of the imported project.

The Vendor and Release options are two string values that for historical reasons need to be supplied.

If all went well the following output should have been produced:

Code: Select all

  C:\projects\example>cvs -d:local:c:\projects\cvsroot import -m "Importing Example" example Vendor Release
  N example/example.c
  N example/example.h

  No conflicts created by this import

  C:\projects\example>
The CVS archive directory structure should now look something like this:

Code: Select all

  c:\projects\
        +--- cvsroot
               +--- CVSROOT
               +--- example
                   +--- example.c,v
                   +--- example.h,v
Using Zeus SCC-CVS with a Existing Local Archive

With the project successfully imported into the archive, the next step is to use the Zeus SCC-CVS module to interface with this project.

For this to happen a user workspace will be needed so the first step in this process is the creation of the following empty working directory structure:

Code: Select all

  c:\work\
        +--- example
The next step is to create a Zeus workspace, so with the Zeus editor running use the Workspace, New menu, change to the c:\work\example directory and create a new example workspace:

Code: Select all

c:\work\example\example.zws
Add the example.c and example.h files to the workspace.

Finally use the Workspace Options menu, select the Source Control panel and type in the following Version Control Configuration details:

Code: Select all

  Project Name: example
      Aux Path: :local:c:\projects\cvsroot
    Local Path: c:\work
     Check Box: Workspace to use SCC source control interface
The Project Name in this case is example.

This name is vital as it represents the module name as it is know to the CVS archive.

This name must match <I>exactly</I> the name used to import the project into archive. If Zeus SCC-CVS ever has problems opening a CVS project the first thing to check would be the spelling and case of the project name.

The Aux Path defines the location of the CVS archive for this project. Note how this information makes it possible to define the location of the CVS archive on a workspace basis. But it could have just as easily been left blank and the the archive location could have been defined using the following environment variable:

Code: Select all

SET CVSROOT=c:\projects\cvsroot 
The Local Path defines the user home or working directory and once again this field could have been left blank if the work directory had been specified using the following environment variable:

Code: Select all

SET HOME=c:\work 
Make sure the Local Path points to the location of the project directory and not to the project directory itself. To better explain this consider the case where the following local path was used:

Code: Select all

Local Path: c:\work\example 
With the workspace created, just apply the changes and Zeus will then force a CVS module update. This update is done by default whenever a Zeus workspace is opened.

If all goes well all the files will now be in the version control system. To test this use the Workspace, Source Control, History menu to display the file history for each of the files listed in the Zeus workspace.

To change a file, it will first need to be checked out, changed and then checked back in to the version control with a suitable comment. If the Zeus SCC-CVS is meant to work more like the real CVS (i.e. without imposing the file-locking paradigm) use the Advanced SCC Options button located in the Zeus Version Control configuration screen.

Using Zeus SCC-CVS with a Remote Archive

As an example of using CVS with a remote archive consider the remote RegExplorer project that is hosted on Source Forge. The web page for this project is:

Code: Select all

http://sourceforge.net/projects/regexplorer/
As before a working directory will be required for this project, so create a working directory structure as shown below:

Code: Select all

c:\work\
        +-- regexplorer
Using the information contained on the Source Forge page, once again create a new Zeus workspace for the RegExplorer project using the following details version control details:

Code: Select all

  Project Name: regexplorer
      Aux Path: :pserver:anonymous@cvs.RegExplorer.sourceforge.net:/cvsroot/regexplorer
    Local Path: c:\work\regexplorer
     Check Box: Workspace to use SCC source control interface
Post Reply