1

I am trying to use cvs annotate. This is the what I run:

cvs -d /mycvs/cvsroot/ annotate "projects/dg/SomeClass.java"

However, I get the following error:

cvs annotate: failed to create lock directory for `/mycvs/cvsroot/projects/dg^M' (/mycvs/cvsroot/projects/dg^M/#cvs.lock): No such file or directory
cvs annotate: failed to obtain dir lock in repository `/mycvs/cvsroot/projects/dg^M'
cvs [annotate aborted]: read lock failed - giving up

What does this mean? How can I overcome this problem? Could it be related to the ^M character I see at the error message?

When I use eclipse to do the annotation it works. I checked and the directory `/mycvs/cvsroot/projects/dg' exists. The error also occurs when I'm logged in as root, so probably it's not a permissions issue either.

I am using CentOS

idrosid
  • 7,983
  • 5
  • 44
  • 41

4 Answers4

1

From your description, I would guess that you've got it right with the stray ^M. What OS are you using? If Windows, are you using cygwin? I see you're using direct filesystem access to the repository. Might you consider setting up a server access mechanism like pserver to see if that helps?

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
0

You might want to try using the 'local' repository:

cvs -d :local:/mycvs/cvsroot/ annotate "projects/dg/SomeClass.java"

and see if that solves the issue.

I use cygwin and cvs regularly, and while I sometimes get this error message: "cvs [checkout aborted]: cannot rename file CVS/Entries.Backup to CVS/Entries: Permission denied" I just re-run the checkout and it seems fine. I looked into this error and it was related to contention for the filesystem in windows (antivirus stuff, IIRC).

mooreds
  • 4,932
  • 2
  • 32
  • 40
0

It appears that you are using CygWin for CVS, but touched your CVS/Root file with a text editor that uses Windows line ends, or did the initial checkout with a CVS client that uses Windows line ends. Although you can mix and match clients to the same repository, it is sometimes bad to mix and match clients (CygWin/WinCVS) with the same working copy.

Grant Johnson
  • 1,224
  • 10
  • 12
0

I too am experiencing this problem with cygwin. In fact, I am able to authenticate against a pserver using eclipse cvs tools. However, cygwin... not so much.

Here are a couple of posts that might be related: http://www.sat-industry.net/forums/dreambox-development/19893-checkout-failed-create-lock-directory.html

summary: add an environment variable: CVS_RSH=ssh

http://www.mooreds.com/wordpress/archives/000234 summary: you may have a config problem with the permissions of the CVS server.

Neither of these worked for me btw.

Mr.Wizard
  • 24,179
  • 5
  • 44
  • 125
Nathan Feger
  • 19,122
  • 11
  • 62
  • 71
  • I didn't find a solution. However, here's a link that might be related to the problem: http://www.korayguclu.de/index.php?&file=linux.cvs.pserver.xml – idrosid Mar 18 '09 at 17:24
  • @idrosid -- I ended up switching to SVN, which was in line with what th ecompany was doing, at an accellerated schedule. Good luck. – Nathan Feger Mar 18 '09 at 17:52