[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dcms-dev
Subject:    [opencm-dev] fast checkout
From:       "Todd T. Fries" <todd () fries ! net>
Date:       2002-11-01 15:38:05
[Download RAW message or body]

I am not certain if this belongs in the documentation, but I've just
realized something from a comment from Jonathan a week or two ago.

If you do a 'cm checkout branch' it will not mind if you have existing
files and subdirs in '.' .. infact, it likes it!

Mind you, if they are not exactly what you're checking out, it will warn
you and tell you to remove them since they are in the way.

It is a wonderful way to take an existing source tree (whether it came
from cvs or another branch) and 'switch' it to a specific branch.

I've been keeping multiple trees for multiple branches checked out
because of the time of a checkout.  I believe this technique can
save me both disk space and time.

For example, if you have a cvs tree that is 'like' the cm branch, here is
a fast way to do a 'cm checkout':

	cvs export src
	cm -C src checkout srcbranch | awk '/Remove/{print $3}' | xargs rm
	cm -C src checkout srcbranch

The point of the '/Remove/{print $3}' | xargs rm .. is to remove files
that are different than that which is being checked out.

So, you only transfer files which end up not matching the sha1 hash
of the intended checkout.

This was by no means formally stated in the documentation, and perhaps there
are ways to avoid two issuances of 'cm checkout' but I do not know them, but
this seems like a nice 'speedup'.  Thanks to Alexander Yurchenko
<grange@rt.mipt.ru> for having a slow connection to our test opencm
server that caused me to realize this.

Hopefully others will find this useful.
-- 
Todd Fries .. todd@fries.net

(last updated $ToddFries: signature.p,v 1.2 2002/03/19 15:10:18 todd Exp $)

_______________________________________________
opencm-dev mailing list
opencm-dev@smtp.opencm.org
http://www.opencm.org/mailman/listinfo/opencm-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic