CVS Utility Scripts
The following suite of utilities are designed to assist you with verifying your CVS submission builds and runs. Note that these commands are not part of CVS and are only available on the UMBC Linux servers (e.g. linux1.gl.edu).
Students are strongly encouraged to verify the accuracy of each project submission using these utilities.
SetupThe CVS utilites are located in the directory
/afs/umbc.edu/users/y/p/ypeng/pub/341/bin/To use the commands you may specifiy the complete pathname.
linux1% /afs/umbc.edu/users/y/p/ypeng/pub/341/bin/the-commandOr, you may change your Unix PATH to incude that directory by editting your .cshrc file found in your home directory (notice the leading "dot".) In your favorite editor, add the following line somewhere near the bottom of your file.
set path = ( $path /afs/umbc.edu/users/y/p/ypeng/pub/341/bin )The next time you login, the directory which contain the utilities will be searched when these commands are executed. You can verify the change to your PATH using the following command. You should see the directory at the end of the your path.
linux1% echo $PATH
If you choose to edit your .cshrc file, do so with extreme care. The smallest mistake can have dire consequences.
cvsbuild utility allows you to checkout and build what you
have submitted in a single command making it easy to verify your submission.
It is highly recommended that you run this command from the same directory that you originally ran cvs checkout so that the temporary project directory that this command builds and your original project directory are under the same parent directory.
cvsbuild command should be invoked with the path to the CVS
repository for the given assignment. For example (if you have not
set your PATH)…
linux2% /afs/umbc.edu/users/y/p/ypeng/pub/341/bin/cvsbuild /afs/umbc.edu/users/y/p/ypeng/pub/cs341f12/Proj0/ Attempting CVS Checkout ----------------------- cvs checkout: Updating dhood2-cvs-checkout U dhood2-cvs-checkout/.classpath U dhood2-cvs-checkout/.project U dhood2-cvs-checkout/build.xml U dhood2-cvs-checkout/hello.txt cvs checkout: Updating dhood2-cvs-checkout/.settings U dhood2-cvs-checkout/.settings/org.eclipse.jdt.core.prefs cvs checkout: Updating dhood2-cvs-checkout/src cvs checkout: Updating dhood2-cvs-checkout/src/proj0 U dhood2-cvs-checkout/src/proj0/HelloWorld.java Attempting Build ---------------- Buildfile: build.xml init: [mkdir] Created dir: /afs/umbc.edu/users/d/h/dhood2/home/dhood2-cvs-checkout/bin [mkdir] Created dir: /afs/umbc.edu/users/d/h/dhood2/home/dhood2-cvs-checkout/doc compile: [javac] Compiling 1 source file to /afs/umbc.edu/users/d/h/dhood2/home/dhood2-cvs-checkout/bin BUILD SUCCESSFUL Total time: 1 second linux2%
Running this script will attempt to checkout your code into a directory
<username>-cvs-checkout. If everything is
submitted correctly, you should see the
message as shown above. If not, something is either missing from your
submission or files are not submitted correctly.
- Every time you change something in the repository you are encouraged to re-run this command.
Upon re-running the script, if you already have a
<username>-cvs-checkoutdirectory the script will notify you that it needs to remove the contents to perform the checkout/build.
If you wish to avoid the prompt on subsequent runs of the
cvsbuildcommand, simply add a
-yflag on the command line (e.g.
cvsbuild -y /path/to/repository).
cvsrun utility allows you to test your program like the
graders do. In order to use the
cvsrun command you will first
need to check-out and build your code using
cvsrun command should be invoked with any necessary command
line arguments for your main. For example (assuming you have
set your PATH)…
linux2% cvsrun arg1 arg2 arg3 Buildfile: build.xml run: [java] Hello World! [java] args: [java] arg1 [java] arg2 [java] arg3 BUILD SUCCESSFUL Total time: 0 seconds linux2%
If all goes well, you should see your project run with the arguments you've provided.
If you get an “Exception in thread "main"
java.lang.NoClassDefFoundError” error the likely cause is that your
main.classproperty value doesn't point to a valid class (either the name is wrong, or its location doesn't match its package hierarchy).
Once you're satisfied you can safely remove the
<username>-cvs-checkoutdirectory created by
cvsbuildand used by
Sometimes students experience issues with their CVS repository. If you're running into problems that you believe to be an issue with your repository (e.g. your files are "locked") you may reset it to the initial state for a given project.
The effects of the
cvsreset are irreversible!
Running this command will delete everything you've submitted via CVS
for a given project. Ensure that you have a local copy of your
source code before running this command.
Once you've ensured you have a local copy of your code, you can reset the repository like so (again, assuming you have set your PATH)…
linux2% cvsreset /afs/umbc.edu/users/y/p/ypeng/pub/cs341f12/Proj0 This script will reset your CVS repository to its original condition. This operation is irreversible - anything submitted will be removed. Ensure that you have a local copy of your code before continuing. Enter "y" to continue or "n" to exit: y Resetting CVS repository ------------------------ Done linux2%Now complete the process with the following steps
- From the parent directory of your project directory, check out your project into a new project directory.
- Recreate your directory structure and copy your saved files to the new project directory.
- Rerun the cvs add and cvs commit commands for your directories and files in your new project.