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

List:       dcms-dev
Subject:    [opencm-dev] switching branches?
From:       "Todd T. Fries" <todd () fries ! net>
Date:       2002-08-30 21:32:19
[Download RAW message or body]

Is there any faster method available than checking out a whole branch to
switch from one branch to another branch?

Aka I've done a full import of src/ (xxxmb) and I've create two branches,
each branch I plan to work in a different area .. src/etc in one and src/lib
in the other.  etc-src vs lib-src for example.

Now one thought is to just checkout the whole branch:

	cm -C etc-src checkout etc-src
	cm -C lib-src checkout lib-src

Then remove what I don't need:

	pd=`pwd`
	for d in etc lib; do
		cd $pd/$d-src
		rm -rf $(echo *|grep -v $d)
	done

.. all I have to do is avoid 'update' since it refuses to do so partially,
and just 'cm status' 'cm commit' 'cm diff' .. but avoiding update forever is
not really feasible.

todd:/cm/tmp:3$ du -sk src
425629  src

.. disk is cheap, but I'm not sure how many branches I can really afford in
terms of disk space.

Unfortunately I'm sure that my ideal world of allowing sub-directories of
a workspace to be part of different branches would not fly to well here.

I'd even settle for:

cm -C src update --tobranch src-lib [file(s)]

.. in which case I'd have to have one checkout of the full tree, and I would
have to have a fully updated and fully commit'ed workspace.  Then it could
(on the server-side) generate the diffs betwen the 'src' branch and the
'src-lib' branch, and transmit only those down the pipe to 'switch branches'.

I think this would be useful.

The reasoning behind the above thoughts comes from three reasons (in no
particular order):

 - the client <--> server interaction is very slow
 - having to checkout an entire project just to tweak a few files in another
   branch is slow
 - being accustomed to being able to switch branches on a per-file basis, or
   even update/commit .. is something I've been spoiled with while using cvs,
   but it sure does make things alot faster ..

-- 
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