Forum OpenACS Q&A: Help on CVS

Collapse
Posted by Jun Yamog on
Hi,

I have just basically touch the surface of CVS.  I would like to do
more with it.  I would like to ask help on this.

Basic problem is.  OpenACS makes changes to its code.  I make changes
to my code.  Normally what i do is just do a cvs import and probably
resolve the conflicts if needed.  This has worked for me with no
problems.  But this time I am developing on a tree wherein OpenACS is
imported plus I need to import another vendor's package.
So cvs import project OpenACS cvscopy, then cvs import -b 1.1.3
project VendorX custom.  Now I have 1.1.1.1 (cvscopy) and 1.1.3.1
(custom).  If I do a cvs checkout/udpate -jcvscopy -jcustom.  I get
the custom copy only.  cvs checkout/update -jcustom -jcvscopy I get
cvscopy only.  custom is an OpenACS package only but this package was
developed on a copy of OpenACS cvs about a couple of months ago.

I would like to merge cvscopy with custom to create my own copy.  I
think its ok to run in conflicts.  An alternative solution to my
problem is to cvs checkout, cp -a custom cvscopy, cvs commit.  But I
would overwrite the files of cvscopy not merge them.  I am sure most
of the custom files are almost the same as cvscopy and CVS can handle
the merge.  I will have to manually merge some of the conflicts but
that would better than doing a diff on cvscopy and custom, cut and
paste.  I could import latest OpenACS cvs code to custom tree then
just work from this copy but that will break the custom code base.
This code base is already in production.

Please help.  Thanks.

Collapse
2: Response to Help on CVS (response to 1)
Posted by Dave Bauer on
Read this article [1] which is specific to CVS and ACS.Also, the CVS book is a great reference [2].

[1] http://www.arsdigita.com/asj/version-control/
[2] http://cvsbook.red-bean.com/

Collapse
3: Response to Help on CVS (response to 1)
Posted by Cynthia Kiser on
I have read those references and I can't think that there is anything in them that would directly help Jun (if there is a shot at it, I would bet on the book at red-bean.com). Another great reference is the CVS FAQ-O-Matic - but I don't see anything directly relavent. Your best bet is the import section: http://www.loria.fr/~molli/fom-serve/cache/157.html

The FAQ claims that you can merge between any 2 branches (http://www.loria.fr/~molli/fom-serve/cache/10.html) but I have never been able to merge from one branch to another without merging to the trunk and then back out to the second branch. CVS just seems to ignore the changed files when I try it. I think that is the cause of the problem you are having - cvs update -jA -jB just gives you the B files rather than the merge you want.

Please post back to the list if you crack this one. I would love to know how one could do this.

Collapse
4: Response to Help on CVS (response to 1)
Posted by Jun Yamog on
Hi Cynthia,

I was never able to crack this.  After a few days of cvs import, checkout and rm of the repository I kinda gave up.  What happened in the end was.

I did a cvs import cvscopy of OpenACS.  On the other tree I did a cvs status custom, the packages files that was customized I then cvs exported.  I manually merged them with some grep and diff.

But from my experiment I think I was a little successful.  But when I applied my experiment to the real thing it just failed several times.

Here is what I did in my experiment.

Create vendor_a/file.txt, vendor_b/file.txt, mytree/file.txt.  cvs add mytree/file.txt, cvs import vendor_a/file.txt, cvs import -b [blah] vendor_b/file.txt, cd to mytree, cvs update you will get nothing.  Then do a cvs update -j vendor_a, then cvs update -j vendor_b.  It merges.  I did the same process on the real thing over and over again and variying some stuff.  It failed.

But then again I dont consider myself good in CVS.  I only work on a single trunk tree most of the time with 1 vendor imported.  I just to cvs tag occasionally to mark milestones.

I hope somebody that is good in CVS can help us. Basic problem is OpenACS files merged with customized OpenACS files that was based on some older code of OpenACS.  This must be on a new tree since a new project will be started.