Problems committing deleted directory to SVN repository - eclipse

I'm using Eclipse Europa with Subversive SVN plugin.
When try to commit deleted directory SVN returns this message:
Some of selected resources were not committed.
Item is out of date
svn: Commit failed (details follow):
svn: Item '/myProject/trunk/src/test/config' is out of date
Content of the folder has been already deleted and committed.
What can I do to commit it?

Try updating first, then delete and commit.

Had this issue too. What solved it for me was the following
Update
Delete contents of folder
Commit
Update
Delete folder
Commit
Frustrating to have to do this in 2 stages!

Just delete the folder using Svn repository exploring, then update the project.

Just right click on the Update to Head and then commit its works for me

I could see that this ticket is old but the below steps might help someone who is facing the issue.
1. Update the parent folder.
2. Delete the folder you want to delete from the working repository.
3. Commit the parent folder.
I use Subclipse plugin in eclipse which has very user-friendly GUI to support Subversion. May be try if interested - https://marketplace.eclipse.org/content/subclipse
Thanks

I ran into this too, but I had already deleted the folder. Neither update nor commit would work, so I had to manually recreate the folder with the files in it, then follow the steps Kurru suggested.

Related

Commiting new files to SVN through eclipse

I'm working on a project for which I'm using the plugin Subeclipse in Eclipse to commit changes to our SVN repository. It is the first time I'm using SVN and I was trying to create a branch when I accidentally got a commit in which all my files were deleted.
So I went back to a working revision and I want to commit it. However, because all the files are deleted the commit fails with a File not found and path not found error.
svn: File not found: transaction '5148-475', path '/ndeklein/MS/PyMS/pyMS/rPlots.py'
svn: '/svn/test/!svn/ver/5147/ndeklein/MS/PyMS/pyMS/rPlots.py' path not found: 404 Not Found (https://test.ac.uk)
I tried importing the whole project to SVN through the commandline with svn import, but this gives the following error:
svn: MKCOL of '/svn/barton/!svn/wrk/be218e50-2605-479e-af1c-ebd8b08b8164/ndeklein/MS/PyMS': 405 Method Not Allowed (https://test.ac.uk)
Doing an update removes all the files again (since the revision it is at now still has all the files removed)
So how can I commit a bunch of new files with SVN?
Subversion (inside and outside Eclipse) has no option to work on previous revisions. So you can do the following steps:
Ensure that your are current by doing an update.
Then copy the files you want to commit (again) in your working copy. You will of course loose the history of these items then.
Add them to your working copy (svn add).
Commit them at the end.
Alternatively, you could copy the files on the server into the HEAD. By doing this, the history of the files is continued. Then you are able to do an update first, change what you want to change and commit your changes.

Eclipse Git plugin - remove file from repo without deleting local

Using the Egit plugin, is it possible to permanently remove a file from source control without deleting the local copy?
I.e., is there a GUI action equivalent to running "git rm --cached"?
(Edited to simplify question)
I have found the answer. Team->Untrack is indeed the equivalent of "rm --cached". However there is a known bug which produces weird behaviour when you untrack and then try to commit.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=363405
Team -> Advanced -> Untrack
did the job (git rm --cached) for me.
I had the same problem, after not initially including directories and files in .ignore. I also tried "Untrack" and "Remove from index" possibility, non of which helped(due to the still unresolved Egit issue).
So, in the end I deleted files locally (leaving the project all in bugs), committed and pushed it to the github, and then undid the delete locally and added files to .ignore.
Very unelegant, but it worked.
I lost a lot of time and nerves on it, and I hope this helps someone.
Another option, similar to what Sri Sankaran suggests in the comments, is to update the index in order to assume no modification to your config file:
On the preferences, in Egit, you can list "assumed unchanged" files
:
The file remains versioned and on the disk, but no modification will be detected on it.
If you need to delete invisible folder(or file) from eclipse project:
Add folder(or file) to .gitignore file;
Replace folder to another directory
Team add to index, commit and push
Replace folder(or file) to the project folder

Commit Operation Failed in SVN in eclipse

I am trying to checkin the project in to SVN repository. So I right click on the project then selected Team then Commit. And when I do commit I get--
Some of selected resources were not committed.
svn: Commit failed (details follow):
svn: Working copy 'C:\workspace\crawler4j\target' is missing or not locked
Any suggestions how to overcome this will be appreciated,
Sometimes, it's simply easier to open a Subversion command line client and take a look at that. I suggest that you install a command line client, go to the directory, and do a svn status. I would also look at svn info on the various directories and files and make sure they're all on the same working directory. (You can do a svn status -v to get that information).
My feeling is that the target directory should not be added or have been added to your project. This directory in Maven is used for built objects which should not be committed into your Subversion repository. Even many Ant build scripts follow Maven in this.
So, what is the status of the target directory? What happens when you do an update on the directory before committing your changes? (I believe it's Team->Update).
http://subclipse.tigris.org/wiki/PluginFAQ#head-73584410a8d4fbad6781c7b16be39f6518410a61 here you can find the solution
In Eclipse Kepler try to run Team>cleanup

SVN: Problems with tag creation in Eclipse with Subversive

I'm trying to create to create a tag in svn repo for my project. I use Eclipse and Subversive plugin. Every time I try tagging, I get the following error:
Tag operation for some of selected resources failed.
svn: Commit failed (details follow):
svn: No write-lock in '/home/project/directory'
Where /home/directory is a directory in my project. I'm pretty sure that if I would delete the project and re-checkout it, then all will work.
Does anybody know what is the source of the problem and if there is a workaround to get it working without delete-checkout cycle?
Thanks for raising this issue! I just ran into this with Subversive 2.2.2 on Eclipse Indigo (3.7).
Cleaning up repository didn't work, but I noticed that the local copy has an old revision number (like 2, where the current is 37), although I am sure I committed before tagging.
So I ended up replacing the local code with the latest from repository, which updated the revision number. After that tagging worked like charm.
You find that error popping up from time (2008) (to time (2009)) to time (2010).
Since there isn't any answer, that usually means the problem got away (like relaunching Eclipse was enough to pass that ordeal).
It could be a permission issue, or a resource (like a file or directory) blocked by a process.
But if it is more complicated, you still have the command-line alternative (a svn copy)
VJ. reports in the comments:
I eventually tried svn update which explained me that the write lock is present in another path of SVN.
So I issued a svn clean for the from the root tree. Which cleared the issue.
Post that, svn update worked as well as svn switch.
You need to delete the File called 'lock' in the .svn Directory, then svn should work again.
regards.
You need to Clean up your project.
Right Click > Team > Cleanup
Then you can Switch to any branch you want
same issue here(just tried to create a branch instead of a tag in this case). check out the ultimate solution :
1) commit the code.
2) disconnect the project from SVN.
3) delete the project from the workspace.
4) check out the project.
5) try again.
voila!
its a bit overkill, but this works 100%
For me the solution was a simple "svn up" at the top of the project directory.

SVN Merge conflict during commit

Eclipse + Subversive plugin
On commiting a directory which is out of sync with the SVN a message pops up:
Merge conflict during commit
svn: Commit failed (details follow):
svn: File or directory '.' is out of date; try updating
svn: resource out of date; try updating
Tried to update the whole project from Eclipse Navigator view (right click>Refresh or F5) and the problem still persists.
Is there something that can be done in this case?
You are mixing up two different operation in Eclipse:
Update (from version control)
and
Refresh
"update" means retrieve the most recent version of a file(s) from the version control system. "Refresh" just means that Eclipse will update its view of the local filesystem, in case a file was changed outside Eclipse.
You need to do an update (Team->Update).
You should update, resolve conflicts, then commit again.
See this link for help on resolving conflicts in eclipse.
Sometimes eclipse+subversion gets a bit lost and a more robust solution is called for:
Copy the code with changes to a different location (preferably via copy and paste).
Replace with latest from repo (or revert) on the directory giving the problem
Copy the changes back (via cut and paste again) and check in.
try to delete .svn/all-wcprops. maybe it will help
Someone else has modified this directory on you.
You need to do a svn update to get the latest version before commiting.
svn update
or
right click > Team > Update
Refresh or F5 will only re-read what's currently checked out and check for local changes, i.e. changes made outside of eclipse.
The svn update command pulls any changes made remotely (commits) down to your workspace.
You need to do an svn update to make sure you are completely up-to-date before committing.
svn update
If the update does not work, you may need to do a cleanup.
svn cleanup
You should be able to find both of these commands in your SVN client outside of Eclipse if you are using one.