w3reference home
CVS Tutorial


Bookmark and Share

Update Command

After you have invoked checkout command and already created a copy of that file in your working directory, you might want to get an updated copy of that file in your working directory. This is when the update command comes in handy. The syntax of the update command is:
cvs update filename
Options of the update command 1) -D date
Uses the latest version of the file not later than the date. There are various ways to specify date many of which are given below:
    2 months ago
    2 hours ago
    8000 seconds ago
    last year
    last Tuesday
    yesterday
    a fortnight ago
    3/31/92 10:00:07 PST (the format is month/date/year)
    February 28, 1990 01:00pm
    20:00 GMT
Here, the date is a sticky option. Here is an example:
cvs update -D last Wednesday test/basics/LearnCvs
2) -r tag
Revision tag, tag is implemented.
3) -f
This option is used mostly with -D date option or -r tag option. If the specified version of the file is not found then the latest version of the file is retrieved from the repository instead of ignoring the command.
4) -l
This option causes the update command to retieve the files in the specified folder only and not in the sub-folders.
5) -P
This option tells the update command to avoid copying any empty directory or empty sub-directory.
6) -p
The file is copied to the console only. It will not be saved to the disk.
7) -A
Resets any sticky keys, dates or ktags option. The sticky options of all the updated files will be restored to their repository values. Below is a demonstration:
cvs update -A
8) -k kflag
It is a sticky option that processes the keywords according to the kflag. Updates to this file in the working directory will use kflag.
9) -R
The directory will be updated along with all the files and sub-directories within it.
10) -B bug
Marks updated files as belonging to bug, bug.
11) -C
Overwrite locally modified file with the original file in the repository.
12) -c
If the file is edited, update the base revision copy to the latest revision. If this option is not used an unedit will always revert to the same revision that is edited, not the latest revision in the repository.
13) -d
Normally, update does not create new directories in the working directory. It updates only in the directories that already exist in the working directory. This option creates any directories that are not in the working directory but exist in the repository. Suppose, the folder named test does not exist already in the working folder but exists in the repository. To update test to your working directory, the CVS command is:
cvs update -d test
14) -I filename
This option updates all the files of the directory except the file named, filename. For example, to update all the files in the directory, my_project, except new.txt, the command is:
cvs update –I new.txt my_project
15) -t
Update using the last checkin time of the file and not the current time.
16) -W spec
This option causes the file named, spec to be filtered during update.
17) -j
Merges changes from the first specified revision to the second specified revision of the same file in the current working directory.
Code Validator
Learn FTP
Color finder
Link Checker
Free web designs
Coming soon!
Interview Questions...
'w3reference : Learn by examples ... Advanced to beginner's tutorials ...'
Ajax: AJAX tutorial1 | Apache: Apache HTTP Server | Restarting Apache | CSS: CSS Border | CSS Syntax | CSS Selector | CSS Comment | CVS: CVS Release | CVS Login | CVS Logout | CVS Annotate | Databases: Rolap Tutorial | OLAP Tutorial | OLTP Tutorial | data warehousing | Expect: HTML: html | Linux: Dot (.) conf files | Linux Mount Point | Linux Filesystem | SSH Tutorial | Linux Commands: cal | cat | cfdisk | chroot | MySQL: MySQL Commands | PHP: PHP Basics | PHP Variables | PHP Output (echo/print) | PHP String Concat | PL/SQL: PL/SQL Data Types | PL/SQL Control Structures | PL/SQL File Extensions | PL/SQL DBMS_OUTPUT package | Python: My first Python program | Shell: Starting Bash | Bash Redirection | Bash Pipes | Bash Variables | SQL: SQL Transactions | SQL Constraints | SQL Drop | SQL Union & Union All | SVN: svn architecture | SVN Repository | SVN Import | SVN Checkout | Tech: soap | Web Designing: Web Hosting | HTML/XHTML/CSS code validator | Learn FTP | Search Engine Optimization Tips | www: XML: XML vs HTML | XML Syntax | XML Tags, Elements and Attributes | XML Namespaces |
Sitemap | Disclaim | Privacy Policy | Contact | ©2007-2009 w3reference.com All Rights Reserved.