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.
|