Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 221727 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/equinox/internal/p2/updatesite/Activator.java (+11 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.equinox.internal.p2.updatesite;
11
package org.eclipse.equinox.internal.p2.updatesite;
12
12
13
import java.io.File;
14
import java.net.URL;
15
import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
13
import org.osgi.framework.BundleActivator;
16
import org.osgi.framework.BundleActivator;
14
import org.osgi.framework.BundleContext;
17
import org.osgi.framework.BundleContext;
15
18
Lines 40-43 Link Here
40
		return bundleContext;
43
		return bundleContext;
41
	}
44
	}
42
45
46
	/**
47
	 * Returns a reasonable human-readable repository name for the given location.
48
	 */
49
	public static String getRepositoryName(URL location) {
50
		File file = URLUtil.toFile(location);
51
		return file == null ? location.toExternalForm() : file.getAbsolutePath();
52
	}
53
43
}
54
}
(-)src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java (-1 / +1 lines)
Lines 45-51 Link Here
45
	private static final String PROP_SITE_CHECKSUM = "site.checksum"; //$NON-NLS-1$
45
	private static final String PROP_SITE_CHECKSUM = "site.checksum"; //$NON-NLS-1$
46
46
47
	public UpdateSiteMetadataRepository(URL location, IProgressMonitor monitor) throws ProvisionException {
47
	public UpdateSiteMetadataRepository(URL location, IProgressMonitor monitor) throws ProvisionException {
48
		super("update site: " + location.toExternalForm(), TYPE, VERSION.toString(), location, null, null, null); //$NON-NLS-1$
48
		super(Activator.getRepositoryName(location), TYPE, VERSION.toString(), location, null, null, null); //$NON-NLS-1$
49
		// todo progress monitoring
49
		// todo progress monitoring
50
		// loading validates before we create repositories
50
		// loading validates before we create repositories
51
		UpdateSite updateSite = UpdateSite.load(location, null);
51
		UpdateSite updateSite = UpdateSite.load(location, null);
(-)src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java (-1 / +1 lines)
Lines 37-43 Link Here
37
	private final IArtifactRepository artifactRepository;
37
	private final IArtifactRepository artifactRepository;
38
38
39
	public UpdateSiteArtifactRepository(URL location, IProgressMonitor monitor) throws ProvisionException {
39
	public UpdateSiteArtifactRepository(URL location, IProgressMonitor monitor) throws ProvisionException {
40
		super("update site: " + location.toExternalForm(), TYPE, VERSION.toString(), location, null, null, null); //$NON-NLS-1$
40
		super(Activator.getRepositoryName(location), TYPE, VERSION.toString(), location, null, null, null); //$NON-NLS-1$
41
41
42
		// todo progress monitoring
42
		// todo progress monitoring
43
		// loading validates before we create repositories
43
		// loading validates before we create repositories

Return to bug 221727