info-cvs
[Top][All Lists]
Advanced

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

Re: branch deleted but still needed


From: Kaz Kylheku
Subject: Re: branch deleted but still needed
Date: Wed, 06 Feb 2002 00:12:31 GMT
User-agent: slrn/0.9.6.3 (Linux)

In article <address@hidden>, Daniels, David wrote:
>We had a developer accidentally delete a branch from our repository today.
>Using WinCVS, we're able to produce a graph that shows the branch apparently
>still exists, but is not named. Is there a way to restore the branch (i.e.,
>restoring the name) so we can continue to reference it as before?

That depends on what was actually deleted. It looks like you just lost a branch
tag. The branch is still there,  but there is no tag pointing to it.

Now you have a problem, because the branch has a different version number
in every file. For example, it may be 1.1.0.4 in one file, (where it
was based on version 1.1) or 1.2.0.2 in another, in which it is
shooting from version 1.1.

To reconstruct the branch tag, you have to go into every file, and
based on your understanding of the graph, or whatever tool you are using
to view the lost branch, to recover the branch tag.

Some files may not have had any commit to the branch, so you will have
to guess what version they were, and branch them accordingly.

One way to do it would be to guess about the date when the branch was
made. Make a new branch of the same name for that date. Then 
for all files which had an actual commit done to the old branch
whose tag was deleted, simply edit this newly created tag to point
to the correct branch number. The ones that had no commit, just leave
those alone with their newly created tag, which hopefully points to
approximately the right version by date.

I would do this surgery on the repository directly, with a text editor
rather than go through any clumsy interface. When doing surgery on the
respository, you must manually create lock files, so you have assured
excusive access. This is done using

        mkdir #cvs.lock

in every directory you are operating on. If the mkdir fails because
#cvs.lock exists, wait a few seconds and try again; someone else
has the lock. When you have all the locks you want, you can mess
with the ,v files. Have backups, and be extremely careful. In fact,
find someone who knows CVS well and do it in a pair.


reply via email to

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