views:

873

answers:

5

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

+1  A: 

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
A: 

Did you ever figure this problem out? 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.

Nathan Feger
idrosid
@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
A: 

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
A: 

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
A: 

bump

I am also having the same problem... if somebody knows its answer ... please share it here

thetna