Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 303085 - One slash in URL during Share Project
Summary: One slash in URL during Share Project
Status: RESOLVED FIXED
Alias: None
Product: Subversive
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Igor Burilo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 235596 236400 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-17 11:43 EST by Hauke Fuhrmann CLA
Modified: 2011-05-18 06:43 EDT (History)
3 users (show)

See Also:


Attachments
Share Projects... Wizard first page (49.94 KB, image/png)
2010-02-17 11:45 EST, Hauke Fuhrmann CLA
no flags Details
Share Projects... Wizard second page (52.70 KB, image/png)
2010-02-17 11:46 EST, Hauke Fuhrmann CLA
no flags Details
Share Projects... Wizard last page (68.20 KB, image/png)
2010-02-17 11:46 EST, Hauke Fuhrmann CLA
no flags Details
Proposed patch (1.10 KB, patch)
2010-03-05 06:17 EST, Benjamin Bentmann CLA
i.vinnykov: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hauke Fuhrmann CLA 2010-02-17 11:43:11 EST
I'm trying to import multiple projects already checked out with subversive in some other Workspace.

 - Team -> Share Projects...
 - Reconnect All From
 
 This gives the wizard as attached: the presented URL does contain only one slash for the protocol, i.e. http:/ instead of http://.
All following pages then present the same URL and ultimately this URL is assumed to be the repository location which obviously does not work.
In the first two pages the URL is not editable. Editing at the last page would reconnect to a new repository instead of the existing one.

Sharing only one project at a time (Share project...) works fine. Here the URL is detected correctly. Hence it's no error in the stored project settings. (I also brwosed the .svn folders by hand and the URLs look fine).

Version:	0.7.8.I20091207-1900

SVN Client:	org.eclipse.team.svn.connector.svnkit16 2.2.1.I20091215-1700 SVN/1.6.6 SVNKit/1.3.2 (http://svnkit.com/) r6267

JVM Properties:
{java.vendor=Apple Inc., org.eclipse.debug.ui.breakpoints.toggleFactoriesUsed=false, osgi.bundles.defaultStartLevel=4, org.osgi.supports.framework.extension=true, sun.management.compiler=HotSpot 64-Bit Server Compiler, eclipse.p2.profile=epp.package.modeling, os.name=Mac OS X, osgi.ws=cocoa, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.6.0_17-b04-248-10M3025, osgi.instance.area=file:/Users/haf/shared/kieler/workspace_release_0.1.0/, user.name=haf, osgi.framework.extensions=reference:file:javax.transaction_1.1.1.v200909161740.jar,reference:file:org.eclipse.persistence.jpa.equinox.weaving_1.1.2.v20090612-r4475.jar, awt.nativeDoubleBuffering=true, eclipse.launcher=/Developer/eclipse_3.5.1/Eclipse_3.5.1.app/Contents/MacOS/eclipse, org.osgi.framework.language=de, osgi.frameworkClassPath=., file:/Developer/eclipse_3.5.1/plugins/javax.transaction_1.1.1.v200909161740.jar, file:/Developer/eclipse_3.5.1/plugins/org.eclipse.persistence.jpa.equinox.weaving_1.1.2.v20090612-r4475.jar, user.language=de, org.osgi.framework.processor=x86-64, osgi.syspath=/Developer/eclipse_3.5.1/plugins, sun.boot.library.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Libraries, osgi.manifest.cache=/Developer/eclipse_3.5.1/configuration/org.eclipse.osgi/manifests, java.version=1.6.0_17, org.osgi.framework.os.name=MacOSX, user.timezone=Europe/Berlin, sun.arch.data.model=64, java.endorsed.dirs=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/endorsed, osgi.tracefile=/Users/haf/shared/kieler/workspace_release_0.1.0/.metadata/trace.log, eclipse.application=org.eclipse.ui.ide.workbench, sun.cpu.isalist=, sun.jnu.encoding=MacRoman, file.encoding.pkg=sun.io, org.osgi.framework.vendor=Eclipse, file.separator=/, java.specification.name=Java Platform API Specification, java.class.version=50.0, user.country=DE, org.eclipse.equinox.launcher.splash.location=/Developer/eclipse_3.5.1/plugins/org.eclipse.platform_3.3.201.v200909170800/splash.bmp, java.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home, osgi.os=macosx, eclipse.commands=-os macosx -ws cocoa -arch x86_64 -showsplash -launcher /Developer/eclipse_3.5.1/Eclipse_3.5.1.app/Contents/MacOS/eclipse -name Eclipse --launcher.library /Developer/eclipse_3.5.1/Eclipse_3.5.1.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.0.1.R35x_v20090707/eclipse_1207.so -startup /Developer/eclipse_3.5.1/Eclipse_3.5.1.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -product org.eclipse.epp.package.modeling.product -keyring /Users/haf/.eclipse_keyring -showlocation -vm /System/Library/Frameworks/JavaVM.framework , java.vm.info=mixed mode, osgi.splashLocation=/Developer/eclipse_3.5.1/plugins/org.eclipse.platform_3.3.201.v200909170800/splash.bmp, os.version=10.6.2, osgi.arch=x86_64, path.separator=:, java.vm.version=14.3-b01-101, org.osgi.supports.framework.fragment=true, osgi.framework.shape=jar, osgi.instance.area.default=file:/Users/haf/Documents/workspace/, java.awt.printerjob=apple.awt.CPrinterJob, sun.io.unicode.encoding=UnicodeLittle, org.osgi.framework.version=1.5.0, awt.toolkit=apple.awt.CToolkit, socksNonProxyHosts=local|*.local|169.254/16|*.169.254/16, ftp.nonProxyHosts=local|*.local|169.254/16|*.169.254/16, osgi.install.area=file:/Developer/eclipse_3.5.1/, osgi.framework=file:/Developer/eclipse_3.5.1/plugins/org.eclipse.osgi_3.5.1.R35x_v20090827.jar, user.home=/Users/haf, org.eclipse.equinox.simpleconfigurator.configUrl=file:org.eclipse.equinox.simpleconfigurator/bundles.info, osgi.bundlestore=/Developer/eclipse_3.5.1/configuration/org.eclipse.osgi/bundles, osgi.splashPath=platform:/base/plugins/org.eclipse.platform, osgi.nl=de_DE, java.specification.vendor=Sun Microsystems Inc., java.library.path=.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java, java.vendor.url=http://www.apple.com/, org.osgi.framework.os.version=10.6.2, eclipse.p2.data.area=@config.dir/../p2/, eclipse.startTime=1266424346124, java.vm.vendor=Apple Inc., gopherProxySet=false, java.runtime.name=Java(TM) SE Runtime Environment, java.class.path=/Developer/eclipse_3.5.1/Eclipse_3.5.1.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar, osgi.requiredJavaVersion=1.5, org.eclipse.update.reconcile=false, eclipse.vm=/System/Library/Frameworks/JavaVM.framework, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, sun.cpu.endian=little, org.eclipse.swt.internal.carbon.smallFonts=, sun.os.patch.level=unknown, java.io.tmpdir=/var/folders/14/14OsO3CdFSa1UiWay4Pz3E+++TI/-Tmp-/, java.vendor.url.bug=http://bugreport.apple.com/, eclipse.product=org.eclipse.epp.package.modeling.product, jna.platform.library.path=/usr/lib:/usr/lib, eclipse.home.location=file:/Developer/eclipse_3.5.1/, mrj.build=10M3025, os.arch=x86_64, java.awt.graphicsenv=apple.awt.CGraphicsEnvironment, java.ext.dirs=/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext, mrj.version=1060.1.6.0_17-248, user.dir=/Developer/eclipse_3.5.1/Eclipse_3.5.1.app/Contents/MacOS, org.osgi.supports.framework.requirebundle=true, line.separator= , java.vm.name=Java HotSpot(TM) 64-Bit Server VM, org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog, file.encoding=MacRoman, osgi.framework.version=3.5.1.R35x_v20090827, eclipse.buildId=M20090917-0800, eclipse.vmargs=-Dosgi.requiredJavaVersion=1.5 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=256m -Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Djava.class.path=/Developer/eclipse_3.5.1/Eclipse_3.5.1.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar , java.specification.version=1.6, org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,OSGi/Minimum-1.2,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6, osgi.logfile=/Users/haf/shared/kieler/workspace_release_0.1.0/.metadata/.log, osgi.configuration.area=file:/Developer/eclipse_3.5.1/configuration/}
Comment 1 Hauke Fuhrmann CLA 2010-02-17 11:45:40 EST
Created attachment 159333 [details]
Share Projects... Wizard first page
Comment 2 Hauke Fuhrmann CLA 2010-02-17 11:46:15 EST
Created attachment 159334 [details]
Share Projects... Wizard second page
Comment 3 Hauke Fuhrmann CLA 2010-02-17 11:46:55 EST
Created attachment 159335 [details]
Share Projects... Wizard last page
Comment 4 Igor Burilo CLA 2010-02-22 12:04:30 EST
1. From your screenshot you have two projects and you wrote that if you share one project you have two slashes, did you try it only for one project or you tried for both projects, I mean you share first project and you have two slashes then you share second project and you also have two slashes?
2. Below 'Reconnect All From' option(see first screenshot) you have a combo with number, could you please try to change this numbers and check how much slashes you have?
Comment 5 Hauke Fuhrmann CLA 2010-02-22 12:15:58 EST
to 1.

Using "Share Projects..." with 2 Projects, it shows only 1 slash.
Using "Share Project..." (singular) for 1 Project, it shows 2 slashes. However, maybe that are two different wizards?

to 2.

Changing the number changes the length of the path segment. However, for each number the http:/ has only one slash no matter how long the path segment is.
Comment 6 Igor Burilo CLA 2010-02-23 04:39:28 EST
We've got similar bugs in tracker, e.g. bug 235596.

I suppose that problem could be in SVN connector or IPath API, so could you please try the following:
- try to share projects with another connector, e.g. JavaHL or SVNKit connector of another version
- is it possible if I provide you a very simple project(it will depend on Eclipse's resources API) that you run it in your environment to verify the problem?
Comment 7 Benjamin Bentmann CLA 2010-03-05 06:17:48 EST
Created attachment 161101 [details]
Proposed patch

The attached patch might solve the issue (I wasn't able to figure out how to run any of the tests nor to build trunk). When we were hit by this my debugging ended up in SVNUtility.initializeRepositoryLocation() at

  Path urlPath = new Path(url);
  if (urlPath.lastSegment().equals(location.getTrunkLocation())) {
    url = urlPath.removeLastSegments(1).toString();
  }

From the API docs of Path(String):
> The string path must represent a valid file system path on the local file system. The path is canonicalized and double slashes are removed except at the beginning.

In plain English, Path is not the appropriate class to handle URLs. The code base probably needs to be reviewed for other places that erroneously employ Path to manipulate URLs.

Reproducing this issue requires a Non-Windows platform and a URL ending with the configured trunk string.
Comment 8 Igor Burilo CLA 2010-03-09 03:42:12 EST
Benjamin, thanks for provided patch. We'll review it.
Comment 9 Igor Burilo CLA 2010-03-10 11:23:55 EST
Done. Benjamin, thanks for provided patch. We also reviewed all other places where Path was used.
Comment 10 Igor Burilo CLA 2010-03-10 11:27:57 EST
*** Bug 235596 has been marked as a duplicate of this bug. ***
Comment 11 Igor Burilo CLA 2010-03-10 11:29:09 EST
*** Bug 236400 has been marked as a duplicate of this bug. ***