Re: adding on branch

"Max Bowsher" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.bugs
Message-ID <005c01c322a2$e4450240$78d96f83@pomello>
Paul Edwards wrote:
> What is the logic behind the fact that when you have a project
> checked out on a branch, and then you go:
>
> cvs add filename.c
> cvs commit -m "." filename.c
>
> it gets put into the Attic directory instead of the normal directory?

When you add on a branch, the head revision is dead, therefore, Attic.

> Is this because a checkout on the "head" would otherwise pick
> up this branch "automatically"/"accidentally"?

Just following the normal rules about whether something is in the Attic or
not.

> But when a subsequent "cvs add" is done, not on a branch, then
> it is taken out of the Attic

Well, the head revision is now alive, so the RCS file no longer belongs in
the Attic.

> (but unfortunately Attic is not removed -

I guess that wasn't considered important. Having an empty Attic doesn't hurt
anything.

> Ok, but an import is another way of adding a "head" version.
> So the import should also go through the same logic, moving a
> file out of the Attic and putting it into the normal spot,

No, if you import on top of a dead head revision, you get a conflict, as
expected, and then you merge, and the commit after that commits and alive
revision, causing the RCS file to move out of the Attic.



Max.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.