Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion, renaming, Wha?

So i have a funny problem.

Subversion, you are not allowed to rename items with the same name if the only difference is capitalization. Netbeans has subversion. Netbeans allows you to rename files if the capitalization changes.

I renamed something called eventCreator.php to EventCreator.php in subversion and uploaded (it is a class). Everything went fine in Netbeans. In fact, I made about 10 more commits. I tried to download it on another computer, and this is the error that happens
"Can't open file
C:\xampp\htdocs\MyProject\scripts.svn\tmp\text-base\eventCreator.php.svn-base':
The system cannot find the file specified."

My repository is located at DreamHost. So i go to dreamhost and i am able to go into the scripts folder and see both eventCreator.php and EventCreator.php in the repository, yet i cannot download it with either netbeans or tortoiseSVN.
Any Help?

like image 981
ThePrimeagen Avatar asked Dec 14 '10 04:12

ThePrimeagen


3 Answers

Delete not necessary file with

svn del http://domain/path/to/eventCreator.php

Or you can even open repo browser (from subversion context menu) and delete the file there, without using boring console commands ;-)

like image 155
zerkms Avatar answered Nov 15 '22 07:11

zerkms


Subversion 1.7 now appears to handle case only renames on Windows.

like image 38
jpierson Avatar answered Nov 15 '22 08:11

jpierson


Subversion is case sensitive. If you tell it store 20 files all with different combination of case, it'll store it. Now, when you check those files out of the repository, the platform you're on may either warn you, refuse to check out (as it did in your case), or just overwrite the content of the first file written with the second, third, you get the idea.

To resolve this, zerkms' answer is right on track. Delete the rendition of the file you don't want with a repo browser or some tool (command line if need be) that works directly with the repository on the server.

To keep this from happening again, use the case-insensitive.py script from the Subversion project in your pre-commit hook script. It'll do a check to see if there is already file in the repository with a different case when the commit is adding a file. If there is, it'll allow you to reject the commit until it's resolved.

Since you have a third party hosting your Subversion repository, contact them about getting this hook applied if you cannot do with their management tools.

like image 25
jgifford25 Avatar answered Nov 15 '22 08:11

jgifford25