CVS importing

Published: Wednesday, Dec 26, 2007 Last modified: Monday, May 27, 2024

I never remember how to do this, and I always do something STUPID like:

hendry@bogrund-14:~$ cvs import datastructuresproject/ vendor_1_0 rev_1_0
L datastructuresproject//.inputrc
L datastructuresproject//.DCOPserver_bogrund-14
L datastructuresproject//.muttrc
L datastructuresproject//.vimrc
L datastructuresproject//.kde/tmp-bogrund-14
L datastructuresproject//.kde/socket-bogrund-14
cvs [import aborted]: received interrupt signal
Killed by signal 2.
cvs [import aborted]: received broken pipe signal


Change directory is a must:

bash$ cd $HOME/somedir/anotherdir/directory/my_source_code_dir

Must give vendor tag and revision tag:

cvs import somedir/anotherdir/directory/my_source_code_dir vendor_1_0 rev_1_0

Not to forget:

export CVSEDITOR=vim



Now on my home machine, I can develop:

hendry@bilbo:~$ cvs co datastructuresproject
cvs server: Updating datastructuresproject
U datastructuresproject/
U datastructuresproject/
U datastructuresproject/
hendry@bilbo:~$ cd datastructuresproject/
hendry@bilbo:~/datastructuresproject$ ll
total 752K
drwxr-sr-x    3 hendry   hendry       4.0K 2003-04-13 12:19 .
drwxr-sr-x  148 hendry   hendry       8.0K 2003-04-13 11:45 ..
drwxr-sr-x    2 hendry   hendry       4.0K 2003-04-13 12:19 CVS
-rwxr-xr-x    1 hendry   hendry       1.2K 2003-04-13 12:16
-rwxr-xr-x    1 hendry   hendry        569 2003-04-13 12:16
-rw-r--r--    1 hendry   hendry        127 2003-04-13 12:16

CVS should take care of any conflicts and help me syncing my source between my school and home computer. Basically I can now work from home and from school without any major hassles like editing older versions of the source, or overwriting some code!