[prog] CVS travails, and strategies

Michelle Murrain tech at murrain.net
Tue Sep 9 10:59:46 EST 2003


Hi there,

I've got a particular issue, a couple of questions, and a big picture
question.

OK, first the sordid story, at risk of exposing my lameness as a CVS
user:

I have been using CVS for my web programming project for about 6 months
now, and I can't quite even believe I used to live without it. That
said, I'm still a relative CVS newbie. 

At one point, I decided I wanted to create an "unstable" branch to my
CVS tree, for new and exciting features, and leave the trunk for
bugfixes. I realize now that I probably should have done the reverse,
but whatever, that question is for later. 

Last night, I decided I wanted to merge my bugfixes in the trunk to the
branch that has the new features. Sounds good. I followed the excellent
instructions in Essential CVS, and, then, stupidly, committed the
changes before I checked to make sure that they were truly what I
wanted. They weren't. Somehow, they nicely had wiped out all the nice
new branch features. :-(

OK, so all isn't lost. I have backups, etc. But I decided to use this
screw-up as an opportunity to merge the branch back into the trunk, and
move forward from there, since I had just about been ready to do that
anyway. So I made a new head sandbox, and used the command cvs update -j
branchname -D some_time_ago, which merged my branch features with my
trunk in the new sandbox. Worked almost perfectly, although it wiped out
some of the trunk bugfixes. Obviously, I don't grok merging yet - this
isn't making sense to me. 

Anway, we're almost there. I've done some manual diffing and futzing,
checked to make sure that everything is fine, and now I'm ready to
commit this to the trunk - it's got everything I need. 

Now here's the problem. The changed files all have sticky dates (I guess
because of the cvs update I'd done earlier). I cleared those sticky
dates using cvs update -A. Then tried to commit the files to the
repository. There are still two files that are stubbornly keeping their
sticky dates, so I can't do the commit. There is no reason I can see why
they should still have them. 

So how do I clear sticky dates that don't want to be cleared? These are
files that were in the branch, but not in the trunk. I did do a cvs add
on those file already, so I thought I should be all set. But I guess
not. Ideas?

Now to the philosophy question - Is it better (easier) to use the trunk
for bugfixes, or the branch? I'm getting the impression that merging
files isn't anywhere near as automagically nice as I must have thought,
because I don't get why features that weren't part of the areas of
bugfixes would get wiped out, instead of merged. And files that I'd
added to the branch got removed. I think I'm missing something in what a
branch is vs what the trunk is.

Anyway, any comments/help/advice is appreciated.

-- 
.Michelle
---------------------------
Michelle Murrain
tech at murrain.net
http://www.murrain.net
ph:413-253-2874
cell:413-222-6350
AIM:pearlbear0 Y!:pearlbear9 ICQ:129250575

"Windows is not ready for the Internet" - comment on security blog



More information about the Programming mailing list