info-cvs
[Top][All Lists]
Advanced

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

deleting branches


From: Stephen Cameron
Subject: deleting branches
Date: Thu, 31 May 2001 14:28:16 -0700 (PDT)

Donald Sharp wrote:

> I have a user who manged to delete a branch( it looks like
> with the cvs rtag -d command ).  When I went poking at 
> the ,v file it looks like the revisions for that branch
> are still around.
> 
> Is it ok to just put the branch name and revision back into the ,v
> files?

Yes, I think so, but you have to use the magic branch revision,(with a zero in
it in the next to last part of the rev number.)  This can be a little tricky to
figure out, conceivably impossible in some cases).

There was a thread some time ago on recovering a lost branch tag.  In the
general case, it is not possible, though in specific cases (possibly most
cases?) it can be done.  If you have a revision a.b.c.d, the branch revision
could be a.b.0.c, but, if the file has not been changed on that branch, it
would be something else, and that's where the trouble comes from.  (I think I
got that right...)

See:
http://groups.google.com/groups?hl=en&lr=&safe=off&ic=1&th=9c603ed65ed2e6a4,11&seekm=fa.olakjtv.dhsqp9%40ifi.uio.no#p
(go to groups.google.com and search for "Deleted Branch Tag" if you don't want
to type in that URL.)

If you created a non-branch tag initially when the branch was created to mark
the origin, you are in better shape than if you didn't.  (This would be an
argument _against_ my ".origin" patch 
http://www.geocities.com/dotslashstar/branch_patch.html)   However, you cannot
just do "cvs rtag -b -r my_branch_origin_tag lost_branch_tag everything" 

It might make sense to change CVS so that it balks at deleting a branch tag
unless you give it some option to let it know that you know that you're
deleting a branch tag, so that you don't inadvertently do so when you mean only
to delete a regular tag.  I say this because there is almost never a sane
reason to delete a branch tag.  Even if you create one by mistake, what harm is
there in leaving it lying around?  And if there are revisions on the branch,
then deleting the branch tag is almost certainly the wrong thing to do, and can
be catastrophic.

For the case where you have a tag which is non-branch in some files, and a
branch tag in others, skip deleting the branch tags...(with warnings about
skipping and about the fact that the same tag shows up sometimes as branch
sometimes as non-branch.)

Or are there people out there happily deleting branch tags willy-nilly as part
of normal every day operations?

-- steve


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



reply via email to

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