Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cvs - cannot add to HEAD

 
John Farrel
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic