Roy Miller wrote:

> --- In [EMAIL PROTECTED], Shane Turner <[EMAIL PROTECTED]> wrote:
> > One way to work around the problem is to put the ",v" file in the
> repository into the Attic.
> >
> > Shane
>
> This is really not the way to operate cvs - try getting used to using
> cvs commands.  Otherwise, you might as well just be your own revision
> control system, using rm, cp, mv, diff, etc.
>

I think you missed the point.  CVS has gotten into a bad state.  After
the merge, the file is marked as being added.  Upon attempting to commit,
CVS is failing out because the RCS file in the repository is not in the
Attic.  The RCS file in the repository should be in the Attic if the top
revision on the main line of development is dead.  So.  Given the top
revision is dead and the RCS file in the repository is NOT in the Attic
where it should be, we have to put it there in order to make CVS happy.
Then when the commit is made, CVS moves the RCS file back out of the
Attic.

How CVS ended up with the RCS file in the wrong place hasn't been
determined.  It might be a bug.

>
> >
> > "Kevin C. Castner" wrote:
> >
> > > I have files that were created on a branch
> > >
> > > (Create the file)
> > > cvs co -r branch_name doc
> > > cd doc
> > > touch index.htm
>
> Here you imply the file index.htm already exists and is checked out
> in
> the doc directory.
>

No.  He's demonstrating how he added a file on a branch instead of on the
trunk.  If your working directory is on a branch, any file created in
that working directory and added is created on the trunk as a dead
revision, and a regular revision on the branch. For example, in the case
above, revision 1.1 of index.htm is dead and 1.1.2.1 is not.

>
> > > cvs add index.htm
>
> Then there is no need to "cvs add" the file - it already exists under
> cvs control
>

See above.  It did not exist and did require adding.

>
> > > cvs commit index.htm
> > >
> > > Now I try to merge the file back to the main trunk.
> > >
> > > cd ..
> > > rm -rf doc
> > > cvs co doc
> > > cd doc
>
> It isn't necessary to remove your working directory and checkout a
> "new" copy of project.  You can revert to the main trunk simply by:
>
>   cvs update -A

> from within the doc directory
>

Valid point.

>
> > > cvs update -j branch_name
> > > cvs commit index.htm
> > >
> > > CVS then gives me the following error:
> > >
> > > cvs server: cannot add file `index.htm' when RCS file
> `/export/home/cvs/netops/doc/index.htm,v' already exists
> > > cvs [server aborted]: correct above errors first!
>
> This part appears to be complaining about the scheduled addition of
> an
> already existing file (see comments above).
>
> Good luck,
> Henry

Nope.  This is where the problem is being demonstrated.  The RCS file
isn't in the correct place in the repository.  My guess (and I haven't
tested this yet) is that when the file is added on the branch, the RCS
file is not created in the Attic although the revision on the trunk is
dead, which implies that the RCS file should be in the Attic.

Shane Turner

Reply via email to