info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delete a branch


From: Max Bowsher
Subject: Re: Delete a branch
Date: Tue, 8 Jul 2003 00:03:26 +0100

Sanjay Bhatia wrote:
> Thanks Max and Larry for your replies.
>
> I am convinced that our server is too old to deal with the -B flag.
>
> Here's the situation I am trying to fix.  I have a testing branch that was
> created many changes ago from the dev. branch.  I need to sync them up.
> I was thinking of deleting the test branch and then re-creating it.

Sounds simple, really isn't. One simple possibility is to create a new
(differently-named) test branch.

> Is there a way to do this with a join instead?  Will the join take care of
> files that are deleted from the dev. branch but exist in the test branch?

Yes, you can join (cvs up -jrev1 -jrev2). I haven't personally worked with
joining file deletions, but I think it should.

Joining can be troublesome unless you keep certain tags:
If B is a branch from A, and joins take place from A to B:

Tag the branchpoint. If this was not done at the time, you will need to
investigate and reconstruct it by examining cvs logs to find the time of
branching, and then using applying a tag by date. If you need to do this,
google for "cvs2cl", which will produce a unified log of an entire directory
tree.

Also, tag the point in A up to which you have merged into B. Since merging
may involve manual conflict resolution, use this procedure:

1) Tag (as merging-A-B, or similar) the point you will merge up to (usually
the tip of A).
2) Do the merge, commit the resultant changes to B.
3) Tag (as merged-A-B, or similar) the position of the merging-A-B tag.

You may choose to not explicitly tag the branchpoint as B-branchpoint or
similar, but to just tag it as "merged-A-B" immediately on creation.

The point of this is that you then always have a pair of tags to give to the
join command.

There is a useful set of scripts at http://devel.squid-cache.org/CVS.html
which implement this scheme.
It is quite complex, but if you can dedicate an hour to figuring out how the
scripts work, they are very useful.

Whilst I am recommending them, I must mention that the cvsclosebranch script
attempts to delete a branch tag without -B - so it won't work on current
clients - but I consider this a good thing, since I think deleting the
branch tag is an excessively destructive thing to do.


Max.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]