How do I know if all my changes are committed?

By Alvin J. Alexander, devdaily.com

Move to the directory just above the module you have checked out, then run the command cvs release [mymodule].



Can you give me an example?



Here is an example on a Unix system:

  /home/nansen> cvs co DevDailyMondo
  /home/nansen> cd DevDailyMondo
  /home/nansen/DevDailyMondo> _

  (do some stuff here)

  /home/nansen/DevDailyMondo> cd
  /home/nansen> cvs release DevDailyMondo

At this point cvs will let you know which files in your local copy of the module are different than those in the repository.



NOTE: I've recently found that cvs up is a better way to do this. (I'm guessing something has changed with cvs release, because it isn't working like it used to.)

Here's an example of how this works. Go to the root directory of your local sandbox, and issue this command:

cvs up

The cvs client will compare itself to the repository. If you have any files that have changed, or have never been added to the repository, they will stand out, like this:

prompt> cvs up

? dist/classes
cvs update: Updating .
cvs update: Updating WEB-INF
cvs update: Updating WEB-INF/classes
cvs update: Updating build
cvs update: Updating dist
cvs update: Updating doc
cvs update: Updating doc/client
cvs update: Updating lib
cvs update: Updating resources
cvs update: Updating sql
M sql/populate.sql
cvs update: Updating src
cvs update: Updating src/com
cvs update: Updating src/com/devdaily
cvs update: Updating src/com/devdaily/app
cvs update: Updating src/com/devdaily/app/subdir

The line that begins with the question mark (?) shows the CVS way of telling you that it doesn't know what this file or directory is -- it's never been checked into cvs. The line that begins with the letter "M" is the cvs way of showing that this file has been modified, and needs to be committed back to the repository.

As you can see this seems like a pretty good way of telling what is different between your sandbox and the cvs repository.


devdaily logo