[prog] CVS travails, and strategies
Jenn Vesperman
jenn at anthill.echidna.id.au
Wed Sep 17 12:43:48 EST 2003
On Wed, 2003-09-10 at 00:59, Michelle Murrain wrote:
> 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.
Using -j -D doesn't make any sense to me. What I -think- you managed to
accomplish was:
* Replace the head sandbox with sticky files as of -D some_time_ago.
* Merge the branch to the files as of -D some_time_ago.
I think. I've never used -j -D.
What I think you wanted to accomplish was:
* Merge the head sandbox files with the files that were on the branch
some_time_ago.
How I think you could do that:
* Use cvs tag on a branch sandbox, or cvs rtag, to tag the branch with
-D some_time_ago.
* Get into a head sandbox.
* Use cvs update -j my_new_tag on the head sandbox.
Does that help clarify what went wrong?
> 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.
They're there because the sandbox is a -D, sticky-date sandbox. See
'Retrieving a static file' on page 46 for a procedure for clearing this
on those files.
> Now to the philosophy question - Is it better (easier) to use the trunk
> for bugfixes, or the branch?
'Yes'.
Chapter 4, 'Branching Philosophies', has my ideas on this. Since you
already have the book....
> 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.
No, you used the -D and confused CVS. It did what it thought you wanted,
and you wound up at cross purposes with each other.
Jenn V.
--
"Do you ever wonder if there's a whole section of geek culture
you miss out on by being a geek?" - Dancer.
My book 'Essential CVS': published by O'Reilly in June 2003.
jenn at anthill.echidna.id.au http://anthill.echidna.id.au/~jenn/
More information about the Programming
mailing list