Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 164603 Details for
Bug 308696
CVSFetch scm references don't handle empty connection method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
scmurls.patch (text/plain), 3.81 KB, created by
Darin Wright
on 2010-04-12 14:14:59 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Darin Wright
Created:
2010-04-12 14:14:59 EDT
Size:
3.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.build >Index: src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/build/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java,v >retrieving revision 1.18 >diff -u -r1.18 CVSFetchTaskFactory.java >--- src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java 24 Mar 2010 19:54:33 -0000 1.18 >+++ src/org/eclipse/pde/internal/build/fetch/CVSFetchTaskFactory.java 12 Apr 2010 18:05:06 -0000 >@@ -225,42 +225,72 @@ > */ > private String asReference(String repoLocation, String module, String projectName, String tagName) { > // parse protocol, host, repository root from repoLocation >- String sep = repoLocation.substring(0, 1); >- String[] split = repoLocation.substring(1).split(sep); >- if (split.length == 3) { >- String protocol = split[0]; >- String host = split[1]; >- int index = host.indexOf('@'); >- if (index >= 0 && index < host.length() - 2) { >- host = host.substring(index + 1); >+ String protocol = null; >+ String host = null; >+ String root = null; >+ >+ int at = repoLocation.indexOf('@'); >+ if (at < 0) { >+ // should be a local protocol >+ if (repoLocation.startsWith(":local:")) { //$NON-NLS-1$ >+ protocol = "local"; //$NON-NLS-1$ >+ root = repoLocation.substring(7); > } >- String root = split[2]; >- StringBuffer buffer = new StringBuffer(); >- buffer.append("scm:cvs"); //$NON-NLS-1$ >- buffer.append(sep); >- buffer.append(protocol); >- buffer.append(sep); >- buffer.append(host); >- buffer.append(sep); >- buffer.append(root); >+ } else if (at < (repoLocation.length() - 2)) { >+ String serverRoot = repoLocation.substring(at + 1); >+ String protocolUserPass = repoLocation.substring(0, at); >+ int colon = serverRoot.indexOf(':'); >+ if (colon > 0) { >+ host = serverRoot.substring(0, colon); >+ if (colon < (serverRoot.length() - 2)) { >+ root = serverRoot.substring(colon + 1); >+ } >+ if (protocolUserPass.startsWith(":")) { //$NON-NLS-1$ >+ colon = protocolUserPass.indexOf(':', 1); >+ if (colon > 0) { >+ protocol = protocolUserPass.substring(1, colon); >+ } >+ } else { >+ // missing protocol, assume p-server >+ protocol = "pserver"; //$NON-NLS-1$ >+ } >+ } >+ } > >- buffer.append(sep); >- buffer.append(module); >+ if (protocol == null || root == null) { >+ return null; // invalid syntax >+ } > >- Path modulePath = new Path(module); >- if (!modulePath.lastSegment().equals(projectName)) { >- buffer.append(";project=\""); //$NON-NLS-1$ >- buffer.append(projectName); >- buffer.append('"'); >- } >+ // use '|' as separator if the root location uses a colon for a Windows path >+ String sep = ":"; //$NON-NLS-1$ >+ if (root.indexOf(':') >= 0) { >+ sep = "|"; //$NON-NLS-1$ >+ } >+ StringBuffer buffer = new StringBuffer(); >+ buffer.append("scm:cvs"); //$NON-NLS-1$ >+ buffer.append(sep); >+ buffer.append(protocol); >+ buffer.append(sep); >+ if (host != null) { >+ buffer.append(host); >+ buffer.append(sep); >+ } >+ buffer.append(root); >+ buffer.append(sep); >+ buffer.append(module); >+ >+ Path modulePath = new Path(module); >+ if (!modulePath.lastSegment().equals(projectName)) { >+ buffer.append(";project=\""); //$NON-NLS-1$ >+ buffer.append(projectName); >+ buffer.append('"'); >+ } > >- if (tagName != null && !tagName.equals("HEAD")) { //$NON-NLS-1$ >- buffer.append(";tag="); //$NON-NLS-1$ >- buffer.append(tagName); >- } >- return buffer.toString(); >+ if (tagName != null && !tagName.equals("HEAD")) { //$NON-NLS-1$ >+ buffer.append(";tag="); //$NON-NLS-1$ >+ buffer.append(tagName); > } >- return null; >+ return buffer.toString(); > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 308696
: 164603