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 199631 Details for
Bug 348899
[scm] provide core connector for Subclipse
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch
Bug_348899.patch (text/plain), 3.02 KB, created by
Alvaro Sanchez-Leon
on 2011-07-14 00:31:04 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Alvaro Sanchez-Leon
Created:
2011-07-14 00:31:04 EDT
Size:
3.02 KB
patch
obsolete
>diff --git src/org/eclipse/mylyn/internal/subclipse/core/SubclipseArtifact.java src/org/eclipse/mylyn/internal/subclipse/core/SubclipseArtifact.java >index 5fccb56..ae8a992 100644 >--- src/org/eclipse/mylyn/internal/subclipse/core/SubclipseArtifact.java >+++ src/org/eclipse/mylyn/internal/subclipse/core/SubclipseArtifact.java >@@ -18,12 +18,17 @@ > import org.eclipse.core.runtime.ILog; > import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Path; >+import org.eclipse.core.runtime.Status; > import org.eclipse.mylyn.versions.core.ScmArtifact; > import org.eclipse.team.core.history.IFileRevision; > import org.eclipse.team.core.history.provider.FileRevision; > import org.tigris.subversion.subclipse.core.ISVNRemoteResource; > import org.tigris.subversion.subclipse.core.ISVNRepositoryLocation; >+import org.tigris.subversion.subclipse.core.commands.GetRemoteResourceCommand; >+import org.tigris.subversion.subclipse.core.resources.RemoteFile; >+import org.tigris.subversion.svnclientadapter.SVNRevision; > import org.tigris.subversion.svnclientadapter.SVNUrl; > > /** >@@ -117,12 +122,53 @@ > } > > return dBase + dTail; >+ } >+ >+ private ISVNRemoteResource resolveRemoteResource(IProgressMonitor monitor, ISVNRepositoryLocation location, >+ SVNRevision revision, SVNUrl url) throws CoreException { >+ >+ GetRemoteResourceCommand command = new GetRemoteResourceCommand(location, url, revision); >+ >+ command.run(monitor); >+ >+ ISVNRemoteResource resource = command.getRemoteResource(); >+ if (resource == null) { >+ String msg = "Unable to resolve remote resource for: " + url.toString(); //$NON-NLS-1$ >+ Status status = new Status(IStatus.ERROR, SubclipseCorePlugin.PLUGIN_ID, msg); >+ throw new CoreException(status); >+ } >+ >+ return resource; > } > > private IStorage resolveStorage(IProgressMonitor monitor, Long revNo, ISVNRepositoryLocation location, String path) > throws CoreException { >+ >+ try { >+ SVNRevision revision = new SVNRevision.Number(revNo); >+ >+ SVNUrl url = getRepositoryURL(); >+ >+ ISVNRemoteResource resource = resolveRemoteResource(monitor, location, revision, url); >+ >+ // check if the resource is a file >+ if (resource.isFolder()) { >+ throw new CoreException(new Status(IStatus.ERROR, SubclipseCorePlugin.PLUGIN_ID, >+ "The path refers to a folder not to a file: " + path)); //$NON-NLS-1$ >+ } >+ >+ // create remote file with the correct peg revision >+ final RemoteFile file = new RemoteFile(null, location, url, revision, (SVNRevision.Number) revision, null, >+ null); >+ file.setPegRevision(revision); >+ file.fetchContents(monitor); >+ >+ return file.getStorage(monitor); > >- //TODO: Implement me >- throw new UnsupportedOperationException(); >+ } catch (Exception e) { >+ logger.log(new Status(IStatus.WARNING, SubclipseCorePlugin.PLUGIN_ID, "Unable to resolve storage, " + revNo //$NON-NLS-1$ >+ + ", " + path)); //$NON-NLS-1$ >+ return null; >+ } > } > }
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 348899
: 199631 |
199632