info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS Introduction slides


From: Gianni Mariani
Subject: CVS Introduction slides
Date: Fri, 13 Feb 2004 10:06:13 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529


Hi info-cvs guys, I just recieved an email from Reg. Charney with a pointer to slides on CVS that was presented recently at the accu meeting in San Jose. I thought you'all might be interested.


Reg. Charney wrote:

I have now posted a slightly improved version of the CVS slides that I used on Tuesday. You can find them at http://www.accu-usa.org/Slides.html . Enjoy and any comments appreciated.

Reg.

Thanks Reg for making this available.

I have some questions/comments that might helped by a braoder discussion.

#1 - slide 7 says:

Important in multi-user case: With this option set (CVSREAD), CVS defaults to setting the permissions for files in your sandbox to Read-Only. To edit the files in your sandbox, you must first check them out. This ensures that you get the latest version from the repository. Otherwise, you may be working on files that are already out of date which will lead to conflicts later.

I thought there was nothing that special about CVSREAD mode and I believed that you should allways do cvs "update" on files before you edit them to make sure you have the most current version. In other words, the comment above is really not specific to CVSREAD as is implied.

At one time, I also thought that if you wanted to edit a read only file, you were supposed to "cvs edit " the file but various other versions of CVS (sourceforge) broke that functionality so now I simply do "chmod u+w file".


#2 - slide 24 says

cd ~/wd
rm aNewFile # remove file from working dir
cvs remove aNewFile # remove file from the repository

a short-cut would be -
cvs remove -f Afile

cd ~/wd
rm myF aNewFile # remove all files except CVS
cd ..
cvs remove wd # remove working directory
rm -rf wd # physically remove working directory

There is nothing in the above commands that change the repository - this is the same as
rm -rf wd

If you were using perforce, you would need to do the cvs remove wd equivalent because perforce (and others) store working directory meta-data in the repository, all the CVS meta data is in the working directory which means if you blow away your working directory, you don't have to worry about inconsistant meta-data.


#3 - slide 25 says

cd ~/wd
cvs diff myF # diff working directory with cvs version

cvs diff -r12 -r15 myF # diff two cvs versions

Graphical diff's are much better. This is a script I use all the time.
http://mariani.ws/~gianni/cvsgdiff

- you'll need a graphical diff program to make it work.

#4 - slide 28 says:

This hidden file (cvswrappers) tells CVS how to treat different types of files in the working direcory. It uses sh-like wild card syntax to define file patterns – only ? and * are supported. Each pattern is followed by a -k or a -m option.
Only -m COPY and -m MERGE are valid.
COPY stops CVS merging differences
MERGE lets CVS merge differences (default)


For the last 3 years, this has been my default cvswrappers file (in CVSROOT) and I have not ever had one problem with corrupted binary files. YMMV.

Lastly, I think it's important to note that some people (Mr Woods) don't like "cvswrappers" - see an old thread about it here:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=fa.khhilqv.50qcql%40ifi.uio.no

Here is my latest cvswrappers file (for all to enjoy)
http://mariani.ws/~gianni/cvswrappers



#5 - slide 29 says

A branch is created with the tag command and a branch option. Branching allows for parallel development on different branches: the original code branch and the new one.

Well, this is the biggest area of confusion for new CVS users. The concept of a "sticky tag" is very powerful but it has caused many new CVS converts much pain. I've seen people totally blow away their work with a few choice "cvs update -r branch" commands.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]