aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes cvs - cannot add to HEAD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "cvs - cannot add to HEAD" Watch "cvs - cannot add to HEAD" New topic
Author

cvs - cannot add to HEAD

John Farrel
Ranch Hand

Joined: May 24, 2010
Posts: 84
I have checked out a module from CVS using cvs checkout -r "HEAD" MODULENAME

I have added some files to the directory that was created.

When I attempt to add, I get this error on new directories:

cvs [add aborted]: Directory sticky tag 'HEAD' is not a branch

and on files:

cvs add: cannot add file on non-branch tag HEAD

How can HEAD not be a branch tag?

Note that I can't leave it off... this is scripted to run either on the HEAD or on another branch.

John Farrel
Ranch Hand

Joined: May 24, 2010
Posts: 84

A bit of experimentation shows:

checking out with -r HEAD will not allow a file to be added
checking out without -r HEAD will allow a file to be added
checking out with -r <other branch> will allow a file to be added

so it looks like cvs(nt) doesn't treat HEAD like a branch if it's explicitly set via -r, rather it thinks it's a sticky tag.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: cvs - cannot add to HEAD