Subclipse complains "Path is not a working copy" after moving workspace
Asked Answered
H

18

32

I recently moved my Eclipse workspace directory and now Subclipse complains every time I open a file, dumping to the console something like:

Path is not a working copy directory

svn: '[original (pre-move) directory path]' is not a working copy

No such file or directory

This also happens when I explicitly try to view the history of a file. This persists across SVN cleanups, closing and re-opening Eclipse, etc.

Update, checkin, checkout and so on all seem to work fine, and Tortoise doesn't complain at all, so clearly it's not the SVN metadata that's screwed up, it's some Subclipse-specific metadata. Can anyone tell me how to blow this broken metadata away?


Edited to add: "Team > Disconnect" followed by "Team > Share" doesn't solve the problem.


Edited again to add: I've grepped through the whole .metadata directory and one of the project directories for a unique element of the old path and can't find it anywhere except in .metadata/.log (the error message itself) and some old Findbugs warnings. Very nice.

Hop answered 15/9, 2009 at 8:31 Comment(3)
What version of eclipse/myeclipse are you using?Paleozoic
Galileo (3.5). The stock "IDE for Java Developers."Hop
"Team > Disconnect" followed by "Team > Share" doesn't solve the problem. works for me!!Beira
F
0

I was having the same error message using subclipse with javahl on a project that is out of the workspace directory. Changing to svnKit has resolved my problem.

Faline answered 9/10, 2009 at 13:32 Comment(4)
I'm not about to try it again to test it now, but that sounds very plausible. :) Thanks!Hop
It works when followed by performing update operation on working copiesLubeck
This isn't the solution, SVNKit is not good to have as svn client.Slaveholder
I just did a right click -> maven -> update project and it works for meAzure
C
23

You need to delete the .syncinfo files. This is easily done (in most cases) by closing and opening Eclipse, however you can also do so manually as in the following:

To delete the cache, close Eclipse. The cache is stored in:

[workspace]/.metadat​a/.plugins/org.eclip​se.core.resources/.p​rojects/PROJECTNAME/​.syncinfo

So you can just find and delete all files named .syncinfo in

[workspace]/.metadat​a/.plugins/org.eclip​se.core.resources/.p​rojects

Quoted from this article: http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=868799

Chancy answered 17/9, 2010 at 6:17 Comment(2)
you may need to close and open your projects for the icons to reappear after you delete the cache files.Chancy
@Cerin Also removed mine from version control entirely too and gives just a ?Massicot
B
18

I just did a "Team -> Cleanup" and this exact error went away! I also got this error because I moved between machines and the path wasn't the same.

Using Eclipse 3.6 and the Subversion 1.6 plugin.

Update in 2016: Still works perfectly with Eclipse 4.5.2 and Subclipse 1.10.

Becht answered 7/12, 2010 at 14:26 Comment(2)
Thanks, your solution worked well for me! Also the easiest to try out :)Duckpin
Refresh/Cleanup is greyed out for meMassicot
H
4

Edited to add: Nope, spoke too soon. This doesn't fix it. Some files just seem not to exhibit the problem.


The following seems to solve the problem:

  1. Team > Disconnect.
  2. Quit Eclipse.
  3. Blow away .metadata/.plugins/org.tigris.subversion.subclipse.*.
  4. Restart Eclipse.
  5. Team > Share.

Not sure how the old path was actually being stored in the plugin prefs, but it must have been in there somehwere. It's kind of pathetic of Subclipse to store absolute paths, but apparently it is.

There's a bug filed on this, or at least on the same error message. No context. Fifty cents says it gets rejected.

Hop answered 15/9, 2009 at 9:26 Comment(0)
I
1

I'm sure there are many causes with different solutions, but I found the one that worked for me at Dan Wilson's blog. Simply remove the offending folders from the workspace (probably saving them if they have new content), update (letting Subversion recreate the folders), then move the contents back into the fresh folders in your workspace.

Isoclinal answered 7/10, 2010 at 10:0 Comment(0)
J
1

I got the error when I tried to rename a class by changing the case from DAO to Dao in Eclipse.

I had to rename it to something like Dao2 and then was able to rename it to Dao.

Jd answered 23/1, 2014 at 21:46 Comment(0)
D
1

What worked for me: Do a "refactor - rename" on the project => after that do it again to rename it back to the original name.

Devil answered 17/10, 2014 at 11:25 Comment(0)
C
0

Hard to say without further information.

Did you move the whole workspace or just the content?

Also, you can try creating new workspace from scratch and check out the whole project again.

Alternatively, you may try deleting the .metadata directory and relink the project again using File -> import -> existing project into workspace and then relink the SVN data through Team -> Share projects (with an 's'), or maybe just do this last bit after first disconnecting the project from SVN.

Cosmic answered 15/9, 2009 at 8:37 Comment(2)
I moved the whole workspace directory. I'm sure recreating everything from scratch would work, but that seems stupid. I just tried disconnect/share and that didn't fix it -- I'll update the question to note that.Hop
Sorry about that. And it looks like the disconnect - reconnect thing failed, too. I gave up....Cosmic
F
0

I was having the same error message using subclipse with javahl on a project that is out of the workspace directory. Changing to svnKit has resolved my problem.

Faline answered 9/10, 2009 at 13:32 Comment(4)
I'm not about to try it again to test it now, but that sounds very plausible. :) Thanks!Hop
It works when followed by performing update operation on working copiesLubeck
This isn't the solution, SVNKit is not good to have as svn client.Slaveholder
I just did a right click -> maven -> update project and it works for meAzure
A
0

I have the same problem

I had a new project, added it to SVN. Then everything works as normal, until I try and refactor-rename any java file, I get:

move D:/dev/sk_ws/ge-parent/ge-core/src/main/java/com/skillkash/ge/beans/Skbean.java D:/dev/sk_ws/ge-parent/ge-core/src/main/java/com/skillkash/ge/beans/SkBean.java
    Path is not a working copy directory
svn: Path 'D:\dev\sk_ws\ge-parent\ge-core\src\main\java\com\skillkash\ge\beans\SkBean.java' is not a directory

Now the SVN URL is:

svn://qnap/share/MD0_DATA/svn/sk/ge-core/trunk

and the repository root is:

svn://qnap/share/MD0_DATA/svn/sk

Obviously just sharing the project then trying to move a file using subclipe does not work - it must be a bug. I have to do all my refactoring outside eclipse, and hand edit all the files which are affected.

Adulate answered 25/7, 2010 at 11:28 Comment(0)
M
0

Right click the project folder : Team -> Update to Head

This will bring back the directory. Delete it again and Commit

Melisent answered 12/9, 2011 at 6:24 Comment(2)
Does that work? My goal is to move the directory on my local filesystem without changing anything whatsoever in SVN.Hop
Im trying to use Show History, and getting this error. Tried Update to Head and then Show History (Still did not work)Massicot
A
0

In my case I had the folders of the projects in the Project Explorer and just had to reopen the project

Albaalbacete answered 6/8, 2013 at 7:29 Comment(0)
D
0

For me, this error message was caused by an out-of-date installation of Subclipse, and the underlying SVNKit and JahaHL libraries. I have been using TortoiseSVN outside of Eclipse to manage my project directories, and my recent upgrade to the 1.8.x series of (Tortoise)SVN tools broke my working copies for Subclipse.

All I had to do to fix, was go to Help->"Install New Software..." and click "Add..." to add a new update site. I picked the latest update site for the latest release on http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA and upgraded Subclipse from there.

Then all my existing projects just worked, and I could reconnect to the one I had already tried disconnecting from without problems.

Defer answered 12/11, 2013 at 18:11 Comment(0)
A
0

checkout the whole project to a temp dir, then I copied the first level .svn directory and replaced my working copy .svn folder with this.

http://blog.itopia.de/directory-svn-containing-working-copy-admin-area-is-missing/275

It woks for me.

Adobe answered 20/7, 2015 at 13:13 Comment(0)
E
0

I had added a png file to my project, but I got this error trying to rename or delete it. Cleaning and refreshing the project didn't do anything.

I went into the svn Team Synchronizing perspective, right clicked on the file and deleted it. That solved my problem.

Ereshkigal answered 12/2, 2016 at 17:37 Comment(0)
I
0
  1. Right click on the project and select Teams -> Switch to another Branch/Tag/Revision.
  2. Select the appropriate Branch/Tag/Revision that the project should be tied to and click OK.
  3. Give Eclipse some time to process the changes.
  4. Restart Eclipse for the changes to take affect.
Impend answered 24/1, 2020 at 20:36 Comment(0)
C
0

I just got this error when I was trying to update some .java files. The problem was I was trying to update the files but the folder that contains that files didn't exist in the path so when I sync and update the folder it works at the first try.

So, dont try to sync files, try to sync the folder.

Carburize answered 28/12, 2020 at 7:19 Comment(0)
H
-1

Sometime ago I had a similar issue. Seems that Subclipse (or Eclipse) stores the absolute path of your working copies. The cleanest solution is to export again your repository to the new path.

If you have non-committed code, then you can copy it on top of the clean export (without the .svn folder)

Hutto answered 15/9, 2009 at 8:53 Comment(1)
Tried update to head, the update worked but the other features like Show History still did not workMassicot
H
-1

I too had this issue and I simply deleted the project from the workspace (leaving the files on the files system in tact).

I then imported an svn project into the workspace.

Import->SVN->Checkout Project From SVN.

I used my existing repository location to pull the files in.

This issue was caused when I changed Eclipse editions and used a Subclipse plug-in that was a version ahead of what I should have used.

I uninstalled the newer version and installed the correct older version and all worked well.

Handmade answered 12/2, 2014 at 18:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.