|
UpdatingUpdating, one of two widely used CVS commands, is vital to any cvs project. It makes sure your local copy is up to date with the remote repository.First lets picture a scenario: You successfully checked out the project and have used it successfully for a couple of days. You then get a message from your friend telling you that a new super cool feature has been committed to the project. And of course you're interested in getting it. Well the solution is simple, what you need to do is to perform a CVS action called updating, this is done with the CVS command update. To do the update you first need to change the current directory to wherever you have the project locally, then you do a
When you execute the command you will notice that it lists a couple of files with some letters in front of them. The letter in front gives you a clue on the status of the file. For instance U means the file was brought up to date. P means the file has been patched with the repository version. A the file was added by you but not committed yet. R the file was removed by you but not committed yet. M the file has been modified by you but not committed yet. C the file has been committed by you locally and in the repository so a conflict has occurred, more information on conflicts follows in the next part. ? the file is not part of the CVS project. One thing to notice when you update is that you only get the changes in the files you already have locally. Any new files or directories will not be downloaded. To make sure you get those too you have to add an update specific option -d.
Another option, which can be useful, is to stop the CVS program from recursing trough subdirectories. Sometimes you just want to perform an action in the local directory. To perform a non-recursive update you do
One other handy trick you can do with the update command is to get a simple status report on the repository. Sometimes you're just curious if the CVS repository has changed in any way but don't want to do an actual update to find out. To do this you have to specify the global -n option. This option tells the CVS program not to perform any changes to the local files. We can then do
Comment ListThere are no comments. |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||