svn: Item <folder> is out of date
Asked Answered
D

7

14

[answer auto-selected by bounty system against my will]

I'm using subclipse, and always when delete a folder in Eclipse, and try to commit it, the following errors raise:

svn: Item <folder> is out of date
svn: DELETE of <folder>: 409 Conflict (http://myintranet)

Deleting and commiting via command line works fine, but what's wrong with doing it via subclipse? Is anyone more experiencing this problem?

(I experienced this problem in Ubuntu 9.10 and 10.04; last Eclipse version; and subclipse 1.4 - as the next versions of subclipse have much more bugs)

--updated: Its when I delete folders, not files

Diplopod answered 10/5, 2010 at 18:52 Comment(0)
R
2

Subclipse has many problems like this. It works 90% of time, and then it just DOES NOT work as it should! I am using subclipse, since it is very well integrated into eclipse, and when I have problem or some bigger moves needed in svn (like merging some branch) I use Tortoisse.

I had the thing with directory like you. Then I just run the TortoiseSVN like @luiscolorado suggests, and it helped. Tortoise is so great tool (it has many great features for diffing, applying patches, getting patches and so on.).

Today I had a problem when I have removed a file, and someone had changed the same file! Then subclipse shows conflict (up to this point everything is ok), so I wanted to revert! But then the revert button is missing (disappears when inconflict mode!) so I have to do merge, and merge does not work, throws some kind of error. I didn't bother to read (maybe I should read and file it as a bug to subclipse maintainers ;-(), I knew the tortoisse will work, and you know what, it worked. There was a REVERT option.

So @Tom Brito, try command line, try Tortoisse, and then you can look at the subclipse changelog and file a bug. I think that subclipse just forgets to show us some directory changes and updates (or it is designed not to do it?), but I may be wrong.

Righthanded answered 30/11, 2010 at 15:12 Comment(2)
I'm using most command line (what is not productive, but works..)Diplopod
My friend uses command line for svn and hg almost all the time, and he says it is the only productive way of using it ;D. But that probably depends on the workflow, that one is using.Righthanded
S
39

Isn't that addressed by the Subclipse FAQ?

Whenever you see "out of date" in an error message it means that the revision of the item in the repository is newer than the copy in your local working copy.
The solution is always going to be to run an update, so that your working copy is up to date with the repository, and then do the commit again (assuming that the update did not generate any conflicts).

  • For files, this is usually pretty easy to understand how and why this happens.
  • However, Subversion also versions folders, and it is usually with folders that this problem most often happens.
    Subversion does not allow you to delete/rename a folder OR change its versioned properties, UNLESS the local copy of the folder is at the HEAD revision of the folder in the repository.

Your next question might be:
"OK, I can maybe understand that, but why is my folder out of date? I am the only person working in this repository."

That is a valid question, the answer lies in the way that Subversion works.
When you commit a change to a file, the revision of the file in your working copy is updated to that new revision when the commit completes, however the version of the parent folder(s) of that file is not updated.
This is because there may have been adds/deletes to other files in that folder and until you have run an update, the folder is not really at that new revision.
This is called "mixed revision working copies".

In summary, the answer is always to do an update so that the folder or file is updated to its HEAD revision.


About "Mixed Revision Working Copies":

One special kind of flexibility is the ability to have a working copy containing files and directories with a mix of different working revision numbers.

One of the fundamental rules of Subversion is that a “push” action does not cause a “pull,” nor vice versa.
Just because you're ready to submit new changes to the repository doesn't mean you're ready to receive changes from other people.

The fact is, every time you run svn commit your working copy ends up with some mixture of revisions.
The things you just committed are marked as having larger working revisions than everything else. After several commits (with no updates in between), your working copy will contain a whole mixture of revisions

(and that is why, I believe, you cannot reproduce your "out of date" message on subsequent commits with folder deleted: your update did solve the "mixed revision" state.)

Mixed revisions have limitations

You cannot commit the deletion of a file or directory that isn't fully up to date.
If a newer version of the item exists in the repository, your attempt to delete will be rejected to prevent you from accidentally destroying changes you've not yet seen.

Senghor answered 20/5, 2010 at 20:42 Comment(5)
ok, but as already commented in praksant's similar answer, do an update does not work for me.Diplopod
@Tom there nothing to update now. but at one time, they must have a mixed revision, which may have solve itself through the command-line. And now you cannot reproduce the issue. Because there is no more mixed revisions.Senghor
I could't reproduce when I wanted to, but right now I'd deleted a file and a directory, commited the file, and the directory cannot be commited, as a fail occur. And I cannot update (the update buttons is disabled because there is no update to do. Even if I re-synchronize). So the update tip does not help me. The only workaround is still use svn command line. Looks like a Subclipse unrecognized bug.Diplopod
Is anyone else confused that the solution to this problem is to update the local code to match the version in SVN, but won't that erase the changes to the code that you're trying to commit?Liederkranz
In my case it was a folder that needed an update -- but the update had to be performed on the next folder up....NOT on the folder that needed the update. Hope this helps someone.Beetner
K
6

i think if you UPDATE before that it should work.. it did work for me

Kalevala answered 10/5, 2010 at 18:53 Comment(6)
You mean update before commit, not update subclipse version, I hope. There's nothing to update (so, the update button is disabled), I'm the only one in this svn branch.Diplopod
yes, i have this same problem in eclipse, that somehow deleted files didn't want to commit with the same error. I googled than, that i should UPDATE to HEAD in team submenu, so svn will detect those changes - deleting files. it looks like bug to me.Kalevala
sorry, i say it wrong, its not files, its folders. By the way, I'll try, I'm not getting to reproduce it now, i don't now why. Maybe is something date related.. i dont know.Diplopod
as luiscolorado wrote, that error looked like file was deleted through operating system, subclipse wasn't somehow informed about that, and there was some kind of a mismatch between filesystem and subversion, maybe it thinks it was changed outside your session, so it needs to be updated.. it shouldn't make any problems, as files are not changed, so no manual merges aren't needed.Kalevala
I had problems deleting from the OS some time ago, but its not the case now. It looks like a bug to me, too.Diplopod
No no, i didn't say i had problems deleting from OS. I tried to say it looks like eclipse deleted it in some OS way, and it should tell svn but it didn't, so you have your working copy out of sync. Maybe you have different problem, but it sounds very similar to me.Kalevala
C
4

There's a simple solution without installing some extra software. I also had this "problem" and what you can do is the following:

  1. open the SVN Repository view
  2. there go to the folder you want to get rid of and delete it
  3. go back to the java view
  4. update the folder in your project you actually deleted / update your project should also work

That solved the problem in my case, as updating only retrieved the files I deleted.

Correct answered 13/7, 2011 at 11:13 Comment(0)
S
2

Tom,

You might want to try TortoiseSVN, and manually update the project workspace. Find the location of your project directory in your hard drive, and then try TortoiseSVN (or the command line if it's your preference) to do the update.

A frequent cause of this problem is to delete the directory without "informing" SVN. For instance, if you manually delete the directory using the operating system instead of using SVN, you will have this problem.

If you removed the directory before you installed the subversion plug-in, but the project already existed in the repository, you will experiment this problem. A solution, in this case, would be to recreate the directory, updating/committing, and then delete again the directory.

Good luck.

Standfast answered 10/5, 2010 at 19:7 Comment(2)
I'd deleted from eclise. This Tortoise is a svn command line? cause it works fine in command line, now I want it to work in subclipse.Diplopod
No, it's a graphic tool that integrates to Windows Explorer. It is pretty cool. Look at tortoisesvn.tigris.org. Download and install. The instructions come in a Windows help file, and are pretty clear. If you right click on any file or directory controlled by svn at Windows Explorer, you will notice options like check out, clean up, update, etc. Both Subclipse and Tortoise are visual interfaces for SVN. Subclipse is in Eclipse, and Tortoise in Windows. Subclipse has some bugs, bug I think that Tortoise is more dependable. If in trouble, close Eclipse and use Tortoise.Standfast
R
2

Subclipse has many problems like this. It works 90% of time, and then it just DOES NOT work as it should! I am using subclipse, since it is very well integrated into eclipse, and when I have problem or some bigger moves needed in svn (like merging some branch) I use Tortoisse.

I had the thing with directory like you. Then I just run the TortoiseSVN like @luiscolorado suggests, and it helped. Tortoise is so great tool (it has many great features for diffing, applying patches, getting patches and so on.).

Today I had a problem when I have removed a file, and someone had changed the same file! Then subclipse shows conflict (up to this point everything is ok), so I wanted to revert! But then the revert button is missing (disappears when inconflict mode!) so I have to do merge, and merge does not work, throws some kind of error. I didn't bother to read (maybe I should read and file it as a bug to subclipse maintainers ;-(), I knew the tortoisse will work, and you know what, it worked. There was a REVERT option.

So @Tom Brito, try command line, try Tortoisse, and then you can look at the subclipse changelog and file a bug. I think that subclipse just forgets to show us some directory changes and updates (or it is designed not to do it?), but I may be wrong.

Righthanded answered 30/11, 2010 at 15:12 Comment(2)
I'm using most command line (what is not productive, but works..)Diplopod
My friend uses command line for svn and hg almost all the time, and he says it is the only productive way of using it ;D. But that probably depends on the workflow, that one is using.Righthanded
M
2

My solution to this was

  1. Delete all items in folder
  2. Commit to repository
  3. Update folder to HEAD
  4. Delete folder in Eclipse
  5. Commit to repository

A bit cumbersome, maybe, but it always works

Mispickel answered 22/2, 2011 at 20:39 Comment(0)
D
0

The only working way in same cases is via command line. The subclipse is still not perfect..

Diplopod answered 10/5, 2010 at 18:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.