tags:

views:

351

answers:

5

I'm getting a strange error while trying to add a file to CVS.

The problem started because the case was wrong, and causing issues (i.e. MyFile.js was in CVS as myfile.js)

I tried deleting the file, and adding it back in, and now I'm getting the following error:

cvs server: could not find parsed rcsfile MyFile.js

Is there any way for me to permanently delete this file and start new?

Deleting the file in Windows Explorer (on the server) did not solve the issue. When I delete the file in Windows Explorer, it allows me to add it back in, but tells me that it has been removed as soon as I update again.

EDIT:

I've tried the following:

  • Removing the versioned file via windows explorer on the cvs server and adding it back via cvs add and commit. This allows me to add it, but then deletes it from my sandbox upon the first update.
  • Adding the file as another name (i.e. MyFile2.js), and using cvs rename to rename to the correct name (MyFile.js). This will keep the file in my sandbox, but all other users get the other name (MyFile2.js). If I delete the file from my sandbox, then it comes back as the other name (MyFile2.js).
  • Removing the versioned file via windows explorer on the cvs server and adding it via cvs add and commit, then trying to remove it via CVS. This results in an out of sync message from CVS. An update removes the file from my sandbox.
A: 

You also need to delete the file from the Attic folder, in the repository itself.

Martin v. Löwis
There is no attic. We're using CVSNT
Jesse
A: 

Does "cvs remove " followed by "cvs commit" not work?

quanticle
When I try to delete the file, I get an error saying that it is out of sync with the repository. An update causes the file to be deleted from my sandbox, but the file on the server remains (and I still can't check in)
Jesse
+1  A: 

The NT filesystem is more than a bit wacked when it comes to capitalization: it remembers the initial capitalization, but thereafter ignores any changes.

All of which means that you're going to have to take some drastic steps in the repository. Make a backup first, and if you're not comfortable doing this, find someone who knows CVS.

First step is to find your repository. If you go into the working directory and look at the contents of the file CVS/Root, you'll see a string like the following:

:ext:rivendell:/tera/cvs

This says that my CVS repository is served from host "rivendell", in directory "/tera/cvs". Under that directory you'll find the individual projects, and eventually you'll drill down through directories until you get to the one you want.

At this point, either you'll see the version file -- so named because it has a ",v" on the end, or you won't. If you don't, look for a directory named Attic (and although you said that CVSNT doesn't have an Attic, I'm not believing you).

Here you have two choices. The easiest is to delete the version file. You could also rename it to some innocuous name, like "ix,v", then name it back with the correct capitalization. Regardless, the next step does not change.

Now go back to your workstation, and delete your working directory. Completely. Don't try to delete the CVS sub-directory, or anything fancy. If you have files that you need to preserve (because they haven't been checked in yet), copy them somewhere safe.

Check out a fresh copy of your project from the repository, and create the file with the correct capitalization. Again, since NTFS is wonky about captialization, you can't simply copy the saved version into the directory and rename it.

kdgregory
I've done exactly this, and still have the issue. The issue isn't the case of the file, it is that it deletes itself from my sandbox, but remains on the server. Note: when I say "delted via windows explorer" I mean "deleted the versioned file from the server via windows explorer". Also, as per the CVSNT docs, there is no attic.
Jesse
Can't comment on what the CVSNT docs say, because it's a pay product and I couldn't (with 30 seconds of searching) find access to any public docs. If they've truly gotten rid of the Attic (and aren't simply hiding it in their repository browser), then it's definitely something "other than CVS", and you'll need someone who has experience with the CVSNT server (ie, I recommend editing your topic).
kdgregory
A: 

CVS is becoming an abandonware : it still has a lot of bugs and they won't be patched. If you can switch to SVN it would be for the better. There are even some tools to do the import (used one myself and it worked perfectly). They import everything including the history of each files. And then you will be able to easily solve your problem.

CVS has been known to be a pain when it comes to renaming (amongst other operations). So you would spend less time fighting your versioning software in the future if you change to SVN.

If you can't switch to SVN :

  • it you REALLY need to solve this, the ultimate solution would be to reinstall CVS. It's the last resort but it will work.

Edit : I found this. Maybe you could delete the revision where the file was messed up ? With the -0range command. Beware : The command is said to be dangerous. So you might want to back up your cvs first.

Silence
I agree that SVN is the better option, but I'm not the decision maker in this case. What do you mean by a clean up of the directory?
Jesse
My mermory could be playing tricks on me, but I think cvs has the same command as svn which is simply named : clean up. It removes locks, unfinished operations and so on.
Silence
Can't find any references to it. Sorry. I edited my answer. But I also found something else. Check it out, it might work.
Silence
the OP referred to CVSNT which is many things, but not abandonware.
Tim Williscroft
There were no update to CVS(even not minors one) from more than a year now... Maybe the term abandonware is a bit strong, but the community is shrinking and it still contains a lot more bugs than SVN which was last updated a less than a month ago.
Silence
Jesse ? Have you tried the -0range command ?
Silence
CVSNT is still actively maintained. It's lightyears better than CVS, and in a (very) few ways still superior to SVN.
Eric Nicholson
A: 

Did you try to issue "cvs remove" command to remove the file from your sandbox and mark it delete on the server, commit the delete and the re-adding it? I guess what you've been experiencing was that your sandbox and the server got out of sync. Once files are under cvs control, you should not delete/rename/etc. using shell commands, you should work on the using only CVS commands. Also note that CVSNT requires a rename to be followed by a "directory" commit - committing the file only won't register the rename on the server side - anyway there was some issues with renaming, some solved in recent releases.

ldsandon