I'm developing a ColdFusion website using Aptana. We're using SVN for version control.
I renamed a few files and am now trying to commit one of them, but I'm getting the following error:
'SVN Commit' has encountered a problem.
org.apache.subversion.javahl.ClientException: Illegal target for the requested operation
svn: Commit failed (details follow):
svn: Cannot commit 'R:\myPath\My-New-File-Name.cfm' because it was moved from 'R:\myPath\My-Old-File-Name.cfm' which is not part of the commit; both sides of the move must be committed together
This seems to indicate that I need to commit both the previous file (that was renamed) and the new renamed file together. How can I commit a file that no longer exists...?
If things really get messed up, the simplest solution is to delete the folder from the repository and then add it back in its current form.
SVN Wipe and Replace:
If you're using IntelliJ IDEA and make commit with TortoiseSVN, sometimes, it happens that the folder is not deleted by IDEA and Subversion make this error.
In that case, that means "please, don't commit a folder/file you marked as deleted"
TortiseSVN open the file in windows explorer. select the file,right click,use TortiseSVN->unversion and add to ignore list
then the file will get rid of the SVN,becomes normal file. thus you can do the operation to add the file to SVN,and submit it.
i use the solution solve to the issue.
Commit the directory, not the file.
Think of a directory as a text file containing the list of files it contains, then you can see that to commit successfully, you need to update the directory itself so it can remove the old entry and add the new entry. This will show up in SVN as deleting the old and adding the new file (ie 2 changes to the directory, not 1 change to the file)
If only want to commit the 1 file, you will need to add the other changed files to an ignore list temporarily.
svn commit 'R:\myPath\My-New-File-Name.cfm' 'R:\myPath\My-Old-File-Name.cfm' -m "message"
works for me. You just also need to include the deleted file.
There is a chance that one of the files is renamed.
Look at the file names in the error and see if this matches with your files.
If the file names don't match, rename your file to the one in the error and commit all the files you wanted to commit. After this you can rename your file and commit again.