Bug 336689 - If there were no SVN-related activities on the workspace startup, Subversive can't see that imported projects are linked to SVN
Summary: If there were no SVN-related activities on the workspace startup, Subversive ...
Status: CLOSED MOVED
Alias: None
Product: Subversive
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Igor Burilo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-09 05:05 EST by Brice Laurencin CLA
Modified: 2023-02-13 10:55 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brice Laurencin CLA 2011-02-09 05:05:25 EST
Build Identifier: 20110204-0611

With Indigo M5, projects that have imported as existing projects don't appear as shared, even thought .svn directories are everywhere. It works like a charm with latest helios.

Same Subversive version on both eclipse instances.

Reproducible: Always

Steps to Reproduce:
Helios :
0. have your svn repo declared in the SVN Repo browser
1. checkout a project in command line
2. Import the project as an existing project
3. See the project as a shared project, every decorators being here, the Team menu being populated

IndigoM5:
0. have your svn repo declared in the SVN Repo browser
1. checkout a project in command line
2. Import the project as an existing project
3. See the project as an UNshared project, NO decorator being here, the Team menu being EMPTY
Comment 1 Alexander Gurov CLA 2011-02-09 06:10:53 EST
Could you please specify Subversive and Subversive Connector plug-ins versions and which connector you are actually using?
Comment 2 Brice Laurencin CLA 2011-02-09 08:54:46 EST
  Subversive SVN Team Provider (Incubation)	0.7.9.I20110124-1700	org.eclipse.team.svn.feature.group

  Subversive SVN Connectors	2.2.2.I20110124-1700	org.polarion.eclipse.team.svn.connector.feature.group

  SVNKit 1.2.2 Implementation (Optional)	2.2.2.I20110124-1700	org.polarion.eclipse.team.svn.connector.svnkit15.feature.group

  SVNKit 1.3.5 Implementation (Optional)	2.2.2.I20110124-1700	org.polarion.eclipse.team.svn.connector.svnkit16.feature.group

SVNKit 1.3.5 Implementation being used as the default connector
Comment 3 Alexander Gurov CLA 2011-02-19 04:51:28 EST
I tried many times with different Eclipse versions (including Indigo M5 of course) and never even once noticed the described problem. The ways I tried to reproduce the problem:

1) As you proposed:
   0. have your svn repo declared in the SVN Repo browser
   1. checkout a project in command line
   2. Import the project as an existing project

2) In my own way:
   0. have absolutely NO svn repo declared in the SVN Repo browser
   1. checkout a project in command line
   2. Import the project as an existing project

And each time project were successfully connected to the SVN repo automatically.
So, there goes another question: which command line client are you using? Is it possible that the problem is located elsewhere?
Comment 4 Alexander Gurov CLA 2011-05-20 11:10:06 EDT
Seems more like a local workspace misconfiguration. Whenever I tested this feature it works just fine in different Helios and Indigo versions and it seems there is no way to reproduce the issue.
Comment 5 Brice Laurencin CLA 2011-05-20 11:16:15 EDT
I use the standard svn command comming from the subversion Ubuntu package.

I installed the latest Eclipse milestone, opened a fresh workspace, imported a svn-checkedout maven project, and still no luck...
Comment 6 Alexander Gurov CLA 2011-05-20 11:21:59 EDT
Hmm... That seems pretty strange, I just tried it once again and it worked fine. But there is a difference, I'm not a Linux user. So, could it be something platform specific? I will reopen issue until I can confirm if it exists or not on the Linux platform.
Comment 7 Brice Laurencin CLA 2011-05-20 11:27:18 EDT
I will try to do the same on a Windows box ASAP.
Comment 8 Alexander Gurov CLA 2011-11-02 13:39:02 EDT
Hello Brice, 

Finally, thanks to your and Kris De Volder's efforts, I was able to find the cause of the issue (and there was one another related issue, see bug #361831):

The problem is the bundle activation policy itself. Although it is highly recommended by Eclipse.org guidelines to use the lazy activation policy, the problem is while bundle is not loaded, there are no listeners and there is no way to install them in any different way except running the plug-in code, which requires loading the bundle. The only idea I've tought of is to use the "exclude package" option and static constructors in order to handle the matter. But it is most likely to cause deadlocks while loading Eclipse IDE (through interference between the class loaders). So, in the end it seems the core plug-in should avoid usage of the lazy activation policy.
Comment 9 Alexander Gurov CLA 2011-11-02 14:39:49 EDT
Hmm, but it seems like there is noway to change the behaviour. I'll try to check if there is a way to intercept project import under those circumstances but if there none - then I don't know what to do and may close the report as "wontfix".
Comment 10 Alexander Gurov CLA 2011-11-02 15:15:46 EDT
It seems there is a way to solve the issue using org.eclipse.core.resources.filterMatchers extension point, but I need to check for the best one before implementing it.
Comment 11 Alexander Gurov CLA 2011-11-02 16:23:15 EDT
The solution is not an ideal one, but it works: core plug-in starts just in time due to this extension point, so the issue is solved in that way. And there is another little plus: someone could use the filter to check on the SVN meta-information folders without referring Subversive directly.

P.S.
If someone could suggest something better regarding this issue - you're welcome!
Comment 12 Brice Laurencin CLA 2011-11-03 04:03:52 EDT
Thanks a lot Alexander!

That's really good news! Sorry for the lack of test on Windows, my 'ASAP' was not so soon has I would have hoped.

Again, kudos to you!
Comment 13 Mauro Molinari CLA 2011-11-23 05:49:23 EST
Hi Alexander,
is version 0.7.9.I20111119-1700 of the Subversive SVN Team Provider meant to contain this fix? Because a co-worker of mine is still seeing issues here. She has to manually attach projects after an import with the "Gradle Import Wizard" provided by Spring Tools Suite.
I don't see this problem on my own, maybe because as seen by STS developer Kris De Volder, I'm using Subversive-Mylyn integration and that makes Subversive start soon (see bug 361831 comment 11). But my co-worker does not have the Mylyn integration and importing on a fresh-new workspace still shows this problem (projects not automatically attached to SVN repository).
Comment 14 Alexander Gurov CLA 2011-11-23 06:01:17 EST
(In reply to comment #13)
Yes, it is supposed to contain the fix. But please note, that the issue is really not in the Subversive, but in the Eclipse Platform lazy loading concept itself. I just used some extension point that was supposed to start early. It's not like there are any guarantees it will work always and I don't think that the lazy loading policy will be changed just to cover this issue. Still when I checked - it worked.

The only alternative I've in my mind at the moment is to ask Eclipse Platform Team to provide some extension that will be actived prior to the project import (somewhere around workspace start), although it will probably nullify the existing "lazy load policies" just due to its own existance. Or to ask to provide extension point that will react exactly to the project import.

I don't know what else could be done. If anyone have any suggestions - you're welcome!
Comment 15 Mauro Molinari CLA 2011-11-23 06:16:12 EST
I opened an enhancement request at bug 364569.
Please comment on it if you see something wrong in the bug description.
Comment 16 Brice Laurencin CLA 2011-11-23 08:07:45 EST
Hi Alexander,
I didn't notice the new version.

I just installed it, I have to "right click > Team > Share" every project, but at least they are then synchronized.

thanks!
Brice.
Comment 17 Alexander Gurov CLA 2011-11-23 08:13:44 EST
(In reply to comment #16)
Thank you for checking on the issue. It seems the workaround is very unstable, unfortunately. Mauro opened the corresponding request to the Eclipse Platform Team, so I'll be waiting for an answer regarding the matter.
Comment 18 Alexander Gurov CLA 2011-12-19 10:19:02 EST
All the details are in bug 364569.
Comment 19 Alexander Gurov CLA 2012-02-12 06:27:25 EST
Fixed.
Comment 20 Mauro Molinari CLA 2012-02-12 12:32:14 EST
Great news Alexander! Thank you!
When do you think this fix will be available on the early-access update site?
Comment 21 Alexander Gurov CLA 2012-02-13 04:29:54 EST
(In reply to comment #20)
Hi! The fix is available in the build I've published yesterday, it's just that I've delayed the planned build for two days in order to include few more fixes.
Comment 22 Mauro Molinari CLA 2013-11-13 05:12:25 EST
Hi Alexander,
I'm sorry to tell that this issue is not fixed at all.
I'm using Eclipse 4.3.1, with Subversive 1.1.1.I20130816-1700 and JavaHL 1.7.9 connector 3.0.2.I20130808-1700. With the following steps, most projects will be imported as unshared and a Team => Share Project(s) will be needed:

- start Eclipse on a fresh new workspace
- close the Resource Perspective, open the Java EE Perspective
- Import | Existing Projects into Worskapce
- check a directory which contains many nested projects (in my case, there is a root project and about 29 other nested projects), check the option to find nested projects and import them all; do not copy projects into the workspace
- once imported, only 4-5 projects are shared, the others are not

I don't know if the fact that the imported projects are mostly nested is relevant or not, but I don't think so, because the projects that are correctly automatically shared can either be nested or not.
Comment 23 Mauro Molinari CLA 2015-07-17 03:16:12 EDT
Reopening as I'm still seeing this frequently.
Comment 24 Andrey Loskutov CLA 2015-07-21 05:04:08 EDT
(In reply to Mauro Molinari from comment #23)
> Reopening as I'm still seeing this frequently.

Just four info, we observe same issue in egit, see bug 460018. As far as I can understand it, if team plugin is not activated before the import of multiple projects, the first imported projects are simply not properly configured. We can nicely observe that with our 130 projects workspace, and our workaround was to *explicitly* activate egit plugin on startup (from our custom plugin).
Comment 25 Eclipse Webmaster CLA 2023-02-13 10:55:55 EST
This issue has been migrated to https://gitlab.eclipse.org/eclipse/subversive/subversive/-/issues/79.