Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN commit error after deleting files locally

I have a project that I am building with Netbeans 6.1 and I am using SVN. I deleted some files on the local machine then attempted to commit my changes to th SVN repository. The commit fails with the error message

Entry for 'C:\path\to\project\myfile' has no URL

Where myfile is the deleted file.

Is there some way to tell SVN that the file was deleted from the project and that it should be deleted from the repository?

like image 201
Vincent Ramdhanie Avatar asked Oct 28 '08 06:10

Vincent Ramdhanie


People also ask

How remove file from SVN commit?

To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…

What will happen if some versioned file or directory is removed from working copy by SVN delete command?

Using svn to delete a file from your working copy deletes your local copy of the file, but it merely schedules the file to be deleted from the repository. When you commit, the file is deleted in the repository.

How do I commit local changes in SVN?

Select any file and/or folders you want to commit, then TortoiseSVN → Commit.... The commit dialog will show you every changed file, including added, deleted and unversioned files. If you don't want a changed file to be committed, just uncheck that file.

Does SVN allow removing commits from history?

The simple answer is "no", because Subversion doesn't know how to resolve the case when you add a commit, someone else updates their checkout, and then you remove the commit from history. There might or might not be a complex answer involving surgery on the Subversion storage.


2 Answers

If you are comitting a folder with the deleted file in it and supposing that you use the latest versions of Tortoise SVN (SVN GUI Client), it recognizes the particular file as missing and tries to delete from the SVN repo.

like image 22
Azlam Avatar answered Sep 22 '22 17:09

Azlam


An svn update will bring the file back, fixing your local repo.

You should then be able to do an "svn delete" on the file, which tells your local repo that the file is to be deleted, and also deletes it from the file system.

You should then be able to commit the changes back to the repo.

like image 90
BenB Avatar answered Sep 21 '22 17:09

BenB