View | Details | Raw Unified | Return to bug 247889
Collapse All | Expand All

(-)src/org/eclipse/equinox/internal/p2/metadata/mirror/MirrorApplication.java (+5 lines)
Lines 31-36 Link Here
31
	private IMetadataRepository source;
31
	private IMetadataRepository source;
32
	private IMetadataRepository destination;
32
	private IMetadataRepository destination;
33
	private boolean transitive = false;
33
	private boolean transitive = false;
34
	private boolean append;
34
35
35
	/**
36
	/**
36
	 * Convert a list of tokens into an array. The list separator has to be
37
	 * Convert a list of tokens into an array. The list separator has to be
Lines 71-76 Link Here
71
			IMetadataRepository repository = repoManager.loadRepository(destinationLocation, null);
72
			IMetadataRepository repository = repoManager.loadRepository(destinationLocation, null);
72
			if (!repository.isModifiable())
73
			if (!repository.isModifiable())
73
				throw new IllegalArgumentException("Metadata repository not modifiable: " + destinationLocation); //$NON-NLS-1$
74
				throw new IllegalArgumentException("Metadata repository not modifiable: " + destinationLocation); //$NON-NLS-1$
75
			if (!append)
76
				repository.removeAll();
74
			return repository;
77
			return repository;
75
		} catch (ProvisionException e) {
78
		} catch (ProvisionException e) {
76
			//fall through and create repo
79
			//fall through and create repo
Lines 87-92 Link Here
87
		if (args == null)
90
		if (args == null)
88
			return;
91
			return;
89
		for (int i = 0; i < args.length; i++) {
92
		for (int i = 0; i < args.length; i++) {
93
			if (args[i].equals("-append"))
94
				append = true;
90
			// check for args with parameters. If we are at the last argument or 
95
			// check for args with parameters. If we are at the last argument or 
91
			// if the next one has a '-' as the first character, then we can't have 
96
			// if the next one has a '-' as the first character, then we can't have 
92
			// an arg with a param so continue.
97
			// an arg with a param so continue.

Return to bug 247889