info-cvs
[Top][All Lists]
Advanced

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

Re: Branch Tag Deleted, Can it be Re-created?


From: Larry Jones
Subject: Re: Branch Tag Deleted, Can it be Re-created?
Date: Fri, 20 Feb 2004 15:12:22 -0500 (EST)

Jenny Lowe writes:
>
> MIME-Version: 1.0
> Content-Type: multipart/mixed; boundary="===============2034807914=="

Please do not send MIME and/or HTML encrypted messages to the list.
Plain text only, PLEASE!

> Awhile ago I branched the code. I made a non-branch tag (cvs tag
> nbTag) and a branch tag (cvs tag -b branch10). Development continued on
> both the mainline code and the branched code. Then I accidentally
> deleted the branch tag (cvs -d branch10). I can no longer move to my
> branch (cvs update -r branch10) and check files in. Is there a way to
> get my branch tag back so development can continue in the branch?

Yes, but not easily.  To start, you'll probably want to checkout the
base revision of your project:

        cvs co -rnbTag

Then, for each file where there were revisions checked in on the branch,
you'll have to determine the branch number and use cvs admin -n to
recreate the branch tag appropriately.  For example, if you do "cvs log"
on a file and see that your non-branch tag is attached to revision 1.6,
you'll want to look for revisions that branch from 1.6 (e.g., 1.6.2.1 or
1.6.4.8; CVS branch numbers are always even).  If there are any, then
you need to see if any symbolic name points to that branch.  CVS branch
tags use magic numbers: the base revision number, a zero, then the
branch number.  So, if you had a revision 1.6.4.8, 1.6 is the base
revision, 4 is the branch number, and 8 is the revision on the branch,
so you'd want to look for a tag attached to 1.6.0.4.  If there's no tag,
that's probably the branch you want (if there are multiple branches
without tags, you'll have to figure out some way to decide which is the
one you want).  Once you know the correct magic number, you can use cvs
admin -n to recreate your branch tag:

        cvs admin -nbranch10:1.6.0.4 testfile

After you've recreated the tag in all the files that had revisions
checked in on the branch, you can then use cvs tag to recreate it in all
the other files:

        cvs tag -b branch10

You'll get warnings about the tag already existing in the files where
you recreated it; you can ignore them.

-Larry Jones

When I want an editorial, I'll ASK for it! -- Calvin




reply via email to

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