Subclipse shows conflict on folder, no way to merge - eclipse

I'm using Juno SR2 on Windows, with Subclipse 1.8 (JavaHL 1.7.9), against a svn:// repository. Sometimes during synchronization I would see some folder is marked in red as having conflict, the files under the folder are all checked in without issue, just the folder itself having this problem. I don't want to revert, so I tried "Mark as Merged", but this pops up error " (Access is denied)", I have no idea what this means or how to resolve it.

I often get this problem after ignoring resources in subfolders of the folder in question. Simply updating the folder gets rid of the conflict.

I confirm that when you make a svn update to the folder it resolves the problem.

Related

What are these red X's on packages and files in Eclipse?

What is causing these red X's on my files? I accidentally moved my source folder into another folder in my project and when I moved the folder back and recorrected the location of the source folder I started seeing red X's on all my files in that folder. My project builds and runs fine, but svn seems to still believe I have deleted all these files if I try to commit. Is subclipse marking them? I do not see any errors under problems and cannot figure out how remove these.
That means files are deleted and you need to commit the folder/package that's being deleted to reflect the same in the repository.

Why does subversive sometimes try to add files under the bin directory of my project?

Every once in a while I get an error when committing code to our SVN repo, and this is what it says (I'd show a screenshot but I can't reproduce it):
SVN: '0x00400045: Collecting Properties' operation finished with error:
0x00000014: Resource is inaccessible or it is not under SVN control:
'C:/Users/blah/dev/big_project/bin/com/meh/package1'.
0x00000014: Resource is inaccessible or it is not under SVN control:
'C:/Users/blah/dev/big_project/bin/com/meh/package2'.
And my commit dialog which shows up after dismissing that shows some (but not all) class files under my bin directory:
If I do a Project>Clean, (and then it rebuilds automatically) the message goes away for a long while. It seems to happen only after I build the project via an ANT script (which uses javac instead of Eclipse's compiler), but it's not reproducible. As in it'll happen after an ANT build, but not always.
The bin directory is supposed to be ignored. What's going on?
I had the same error, among others. I don't know what's the cause. The only (desperate) way I could fix them was deleting the project from SVN repository (Delete project through the SNV Perspective in Eclipse and removing manually all the ".svn" hidden folders inside the real path of the project). After that, I was able to commit the project again without errors.
Whatever the cause adding bin to svn:ignore should fix it.

SVN in Eclipse: Cannot commit certain folders

I'm using SVN within Eclipse. Whenever I change a file I commit the changes. It works for everything except for three certain folders (which contain certain files) I cannot commit. When trying to commit them I receive the following error message:
workspace\yp\src\yp\forum\locale\cs is one of the three uncommitable folders. The folder definitely doesn't exist on the server yet, but I get the above error each time I'm trying to upload it.
How do I solve the problem?
EDIT: I've deleted the .svn folders from the problematic directories. I still get the same error when trying to commit and the problematic directories have no .svn folders.
EDIT: I'm still trying to fix the problem. Now I get another error message when trying to commit:
EDIT: Now I've tried to do Team --> Cleanup and got that error message:
Move the problematic folders out of the way, then do Team->Update which will recreate the folders from the repository.
Then you can copy your changed files back.
This problem can arise when there are files in a folder checked into the repository that only differ in case - which is not supported in Windows. So it might be worthwile to look at the repository with a repository browser - if it is http:// then the web browser will do.
try deleting .svn folder in your pc and try adding folder or file again.
Extract your project from SVN to a new folder.
Erase all sourcecode files ( something like any file but .svn ) and replace with the ones from your previous working folder.
Try Team/Cleanup in Eclipse (right click in Project explorer or Navigator)

SVN: Cannot commit 'x' and 'y' as they refer to the same URL?

I'm trying to do a commit on my project and am running into the following error. Pay close attention to the path:
Commit failed (details follow):
Cannot commit both
'C:\Development\Project\branches\nextver\project\bin\com\companyname\blah\Foo.java'
and
'C:\Development\Project\branches\nextver\project\src\com\companyname\blah\Foo.java'
as they refer to the same URL
How in the world did this happen? I never had my source files in the bin path in Eclipse! What can I do to fix it? Please tell me there's something better than checking it out again and replacing all of the files. I have 191 Java files alone, not to mention resources and Eclipse files.
I know it's over a year since you posted this, but this may help someone else. I've just gone through the same issue. I eventually traced it back to the project setup on Eclipse. In my case what happened is the build process within eclipse was "building"/copying ALL files in the source folder to the build folder. This caused the .svn directory from the source to be copied to the build folder and this is how Subversion gets mixed up. If you check the paths via RepoBrowser (I am using Tortoise in a Windows environment) the paths point to the correct directories (source and build), but if you run "svn info" from within the directory on your local machine you will find that the source and build directory point to the same URL (hence the message).
Once I realised the problem was within Eclipse and not specific to Subversion it was easy to search for a solution. You need to add "**/.svn/" to the source exclusions in the Java Build Path of the Source tab:
Project --> Properties --> Java Build Path.
Try this:
Go to C:\Development\Project\branches\nextver\project\bin\ and delete .svn if you see one. And then try committing.
I think somehow stuff in the src including the .svn got copied to bin making both of them seem like they are from the same url in the server. Of course you don't want that. You may want to correct your build settings.
The solution was to delete and ignore my bin dirs from my local copy. Again. Tortoise SVN seemed to forget that I had done that before and I didn't notice that the bin dirs had crept in, leading to this problem. After resolving several other problems it threw in my path (source trees in conflict, etc.), I managed to get it to commit.
I did first try deleting the .svn folder from the bin dirs, but all that did was cause it to complain that the bin dir was no longer under source control and halt.
In my case I had a config file that was shared between two projects but I had updated the file (with the same changes) in both projects.
SVN can't commit as it thinks there are two different sets of changes to be committed to the same file.
So I reverted one of the copies and then I was able to commit.

svn: Item <folder> is out of date

[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
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.
i think if you UPDATE before that it should work.. it did work for me
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
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.
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.
My solution to this was
Delete all items in folder
Commit to repository
Update folder to HEAD
Delete folder in Eclipse
Commit to repository
A bit cumbersome, maybe, but it always works
The only working way in same cases is via command line. The subclipse is still not perfect..