Eclipse, SVN trouble - eclipse

A have copied a folder from one project, which is generated by system to another. Now I want to commit all stuff from the project, the folder was copied to.
What I get is (that copied folder is in folder /webapp):
org.tigris.subversion.javahl.ClientException: Attempted to lock an already-locked dir
svn: Working copy '/home/user/webshop/webshop-impl/src/main/webapp' locked
Ok, I tried to Team->Cleanup and got:
org.tigris.subversion.javahl.ClientException: Path is not a working copy directory
svn: '/home/user/webshop/webshop-impl/src/main/webapp/gwtmodules' is not a working copy directory
org.tigris.subversion.javahl.ClientException: Path is not a working copy directory
svn: '/home/user/webshop/webshop-impl/src/main/webapp/gwtmodules' is not a working copy directory
This eclipse SVN client is messing with me long time with this darn tigris exceptions =)
Please, help with advice :) What am I doing wrong?

This had me baffled as well when I got this error. This happens if we have some pending sessions on committing our changes so we’ll need to do some clean up before we’ll have another try on a commit.
This is the fix:
In STS or eclipse, right click on the offending project, click Team and then select Refresh/Cleanup. SVN gets the offending .lock files and deletes them. You can also do this from the command line.

You should delete .svn folders which contains repo info after you copy a directory to another place.
You are probably seeing it because the copied directory has some svn file which points to some place that does not match to the new location.

I would do an svn export from the first project. This will give you a clean copy of the code without any of the associated svn metadata. You can then add the exported code into the second repository.

It is very likely that your folder is lack of svn info(my case). To fix it, you can copy svn info from other folders, and then modify the snv file(all-wcpropc,entries) to the correct one.
I am not sure it is the recommended way, but it works for me!

Related

.so files are not committing to SVN

Possible duplicate
I fail to commit a .so library file using subclipse
I am developing an android application and in that I am trying to add some .so files from UlraliteJ framework. When I googled, I could see that .so files are ignored by SVN by default. So, I uncomment the line global-ignores in the config file of /.subversion folder as per this example
http://blog.keksrolle.de/2010/03/01/svn-ignores-file-extension-so-by-default-which-corrupted-my-build.html.
But, even then I was not able to commit them.
After that, I found the above post, so following that, I manually added .so files to version control and they have been added now.
But, now my problem is that they are not getting committed to SVN still. It fails with the following message,
svn: Commit failed (details follow):
svn: File not found: transaction '1635-1c5', path '/SVNfolder/trunk/OS_Android/SVNProject/libs/armeabi/libmlcrsa12.so'
If any body knows the answer, can you please share it with me
Here is my solution to this annoying problem using Eclipse and SVN
select the "SVN Repository Exploring" perspective.
choose the right folder where the .so files should be in the "SVN Repositories" view.
right click and choose the "import" menu
in the pop out dialog, choose a local path which containing the .so files, input the commit comment and hit OK button.
now the .so file are at the correct position.
Finally, I am able to commit after a day of effort. Thanks to this guy,
SVN: Folder already under version control but not comitting?
All you need to do is, take a back up of your project. Go to the problematic folder. In my case it was armeabi folder inside /lib of my project. View hidden files. There will be a .svn folder. Delete that.
Then revert back the .so files, clean the project. Add them back to the version control. Now along with the files, one more file named svn-commit.tmp.save is also created. Don't worry. Just commit the whole folder. Thus it is committed now.
How ever, I din't exactly know the need for deleting .svn folder.

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.

Get eclipse CVS to forget about removed directory

I'm looking for a way to convince Eclipse that a directory has indeed been removed from the CVS repository, permanently?
With regular command line CVS I would just edit CVS/Entries in the directory's former parent. With Eclipse, I've tried removing the directory from the Project Explorer view, removing the appropriate line in CVS/Entries, recreating the directory in PE so that it might be removed on update or synchronization, synchronize without recreating the directory, and probably other things that I've since forgotten, and nothing worked.
The directory has been entirely removed from the CVS repository, so I'm not talking about just pruning empty directories here. The error I am seeing is:
The server reported an error while performing the "cvs update" command.
Project: cvs update: cannot open directory /usr/local/cvsroot/one/two/three/removed_directory: No such file or directory
My project contains all of the contents from /usr/local/cvsroot/one/two. I do not get this error when I navigate to "three" and update from there. I only get it when I update from the project root.
One (quite imperfect) solution for this problem is, beside to check-out the project again, to remove CVS information stored by Eclipse.
Go in the right-menu under the project > Team > Disconnect, and check the radiobutton "Also delete the CVS meta information from the file system". Now your project is unshared and has no more CVS information into it. Then you just have to do Team > Share project, select the previous repository location, and you're done (CVS will detect by itself that the project is up-to-date and won't update nor commit anything, of course).
A folder that has been deleted in the cvs repository by hand won't then be proposed anymore by CVS under Eclipse to be commited.
Beware that on a big project with many files, depending on the speed of your network, the re-share may take some time.
Sometimes it may indeed be easier to delete the project and pull it off again from CVS.
I fought this same thing for several hours a couple of separate times. I just gave in and re-checked out the project. That seemed to work like a charm
Handling of directories in CVS is not perfect. This and many other reasons caused in creating more complete SCM tool subversion.
CVS can create directory, but can not remove it. From CVS point of view, to remove directory you need to remove (cvs rm) all files in directory. But directory is still present in CVS and there's no way to remove it. Hovewer, CVS propose a "hack" to hide such "deleted"/empty directories by executing "cvs up -P" (see here).
So, for CVS command line, I wouldn't mess with parent directory CVS/Entries file, but rather use "cvs up -P" described above.
The directory will be listed in the CVS/Entries file under the parent directory. Remove the entry in the Entres file and the directory. Eclipse should recognize the directory has been removed.
Refactoring directories in CVS is problematic. Due to the way CVS handles history one of the following usually applies:
The history of files moved to new locations appears to disappear. (It is located in the history of the old location.)
The history of files is retained, but files appear moved when checking out versions prior to the move. (Files were moved in the repository, rather than in a sandbox.)
Removing or moving directories in the repository generally creates problems for clients. It helps to retain directories and only move or remove files. Normal processing moves deleted files to an Attic sub-directory.
In the Eclipse CVS synchronization perspective, did you try the 'Override and update' option?
If the files/folders are already deleted on the repository, from the Eclipse project perspective, "replace with"->"latest from HEAD" on the folder containing deleted elements

No such directory when committing files using CVS from Eclipse

I am using Eclipse solely as a CVS client. Mostly it works very good, but once in a while, when I am right-clicking a file to commit it (a file that it itself says is changed and ready for commit), it tells me "cvs [server aborted]: no such directory `...'
But the directory DOES exist?! If I navigate to the folder using tortoise CVS and right click for commit, it works fine? (this is the way I finally have to get those files committed)
Has anyone experienced this as well, and more importantly - has anyone solved it? :)
I am running Vista on the client PC and the CVS server is a Windows Server 2003 (please dont tell me to just switch to Linux - that is not much help).
Thank you very much for your help!
Not sure about Eclipse but I faced the same issue with WinCVS client. I could do CVS operations once I copied the CVS folder in each directory along the path.
For example: Suppose I am at C:\source\dir1. I select the flat-view and find the file with path C:\source\dir1\dir2\dir3\file.cpp, I should have the CVS folder present in each of following directories: dir1, dir2 and dir3. If the one/more folders are not present, we see below error.
cvs diff -u -- dir2\dir3\file.cpp (in directory C:\Source\dir1\)
cvs [diff aborted]: no such directory `dir2/dir3'
My solution -
backup files you have changed in notepad or ...
delete folder from eclipse.
Synchronise again(eclipse shows files in minus)
override and update now.
copy contents of changed file
commit