Merge lp:~alex-idereal/bzr-eclipse/ignore-SSL-errors into lp:bzr-eclipse
- ignore-SSL-errors
- Merge into trunk
Proposed by
Alexander Taler
| Status: | Merged |
|---|---|
| Merged at revision: | 389 |
| Proposed branch: | lp:~alex-idereal/bzr-eclipse/ignore-SSL-errors |
| Merge into: | lp:bzr-eclipse |
| Diff against target: |
1051 lines (+129/-121) 44 files modified
org.vcs.bazaar.eclipse.core.tests/.classpath (+1/-0) org.vcs.bazaar.eclipse.core.tests/src/org/vcs/bazaar/eclipse/core/commands/CommitCommandTest.java (+2/-2) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/IBazaarCoreConstants.java (+1/-0) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AddCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AnnotateCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BazaarCommand.java (+38/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BindCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BranchCommand.java (+5/-3) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CatCommand.java (+2/-2) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CheckoutCommand.java (+2/-5) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CommitCommand.java (+6/-7) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ConflictsCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CreatePatchCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InfoCommand.java (+2/-3) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InitCommand.java (+2/-2) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LogCommand.java (+7/-9) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LsCommand.java (+3/-3) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/MergeCommand.java (+3/-4) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PullCommand.java (+3/-8) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PushCommand.java (+4/-9) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseAbortCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseCommand.java (+2/-3) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseContinueCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseToDoCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ReconfigureCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RemoveCommand.java (+2/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ResolveCommand.java (+2/-3) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RevertCommand.java (+3/-4) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SendCommand.java (+2/-3) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveCommand.java (+3/-4) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveListCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusCommand.java (+2/-4) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusUpdaterCommand.java (+4/-10) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SwitchCommand.java (+3/-8) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/TagCommand.java (+2/-3) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnBindCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnCommitCommand.java (+1/-1) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnShelveCommand.java (+2/-3) org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UpdateCommand.java (+1/-1) org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/UITexts.java (+1/-0) org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/actions/CommitAction.java (+3/-3) org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/preferences/BazaarPreferencePage.java (+1/-0) org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/uitexts.properties (+1/-0) org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/wizards/createproject/CreateProjectWizard.java (+2/-1) |
| To merge this branch: | bzr merge lp:~alex-idereal/bzr-eclipse/ignore-SSL-errors |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Alexander Taler | Approve | ||
|
Review via email:
|
|||
Commit message
Description of the change
(Reminding myself what the proposal does.)
To post a comment you must log in.
Revision history for this message
| Alexander Taler (alex-idereal) wrote : | # |
Have promoted to trunk
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
| 1 | === modified file 'org.vcs.bazaar.eclipse.core.tests/.classpath' |
| 2 | --- org.vcs.bazaar.eclipse.core.tests/.classpath 2014-01-16 12:36:20 +0000 |
| 3 | +++ org.vcs.bazaar.eclipse.core.tests/.classpath 2014-06-11 09:53:26 +0000 |
| 4 | @@ -5,5 +5,6 @@ |
| 5 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> |
| 6 | <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> |
| 7 | <classpathentry kind="lib" path="bzr-java-lib-1.3.4-tests.jar"/> |
| 8 | + <classpathentry kind="lib" path="bzr-java-lib-1.3.4.jar"/> |
| 9 | <classpathentry kind="output" path="bin"/> |
| 10 | </classpath> |
| 11 | |
| 12 | === modified file 'org.vcs.bazaar.eclipse.core.tests/src/org/vcs/bazaar/eclipse/core/commands/CommitCommandTest.java' |
| 13 | --- org.vcs.bazaar.eclipse.core.tests/src/org/vcs/bazaar/eclipse/core/commands/CommitCommandTest.java 2013-10-31 17:23:10 +0000 |
| 14 | +++ org.vcs.bazaar.eclipse.core.tests/src/org/vcs/bazaar/eclipse/core/commands/CommitCommandTest.java 2014-06-11 09:53:26 +0000 |
| 15 | @@ -59,7 +59,7 @@ |
| 16 | BazaarTreeStatus treeStatus = getClient().status(new File[] { getProject().getLocation().toFile() }); |
| 17 | getWt().check(treeStatus.getStatusAsArray(), getProject().getLocation().toFile().getCanonicalPath()); |
| 18 | |
| 19 | - CommitCommand cmd = new CommitCommand(resources, "test commit", new ArrayList<Option>(0)); |
| 20 | + CommitCommand cmd = new CommitCommand(resources, "test commit"); |
| 21 | IResource[] commitedResources = cmd.execute(new NullProgressMonitor()); |
| 22 | assertNotNull(commitedResources); |
| 23 | assertEquals(1, commitedResources.length); |
| 24 | @@ -79,7 +79,7 @@ |
| 25 | final String textToAdd = "this is text added to " + aFile.getName(); |
| 26 | addContentToFile(aFile, textToAdd); |
| 27 | |
| 28 | - CommitCommand cmd = new CommitCommand(resources, "Příšrně žlutý kůň úpěl ďábelské ódy (czech language)", new ArrayList<Option>(0)); |
| 29 | + CommitCommand cmd = new CommitCommand(resources, "Příšrně žlutý kůň úpěl ďábelské ódy (czech language)"); |
| 30 | IResource[] commitedResources = cmd.execute(new NullProgressMonitor()); |
| 31 | assertNotNull(commitedResources); |
| 32 | assertEquals(1, commitedResources.length); |
| 33 | |
| 34 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/IBazaarCoreConstants.java' |
| 35 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/IBazaarCoreConstants.java 2014-01-14 22:00:23 +0000 |
| 36 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/IBazaarCoreConstants.java 2014-06-11 09:53:26 +0000 |
| 37 | @@ -20,5 +20,6 @@ |
| 38 | public static final String AUTO_SHARE_PROJECTS = "auto_share_projects"; //$NON-NLS-1$ |
| 39 | public static final String OVERWRITE_EMAIL = "pref_overwrite_email"; //$NON-NLS-1$ |
| 40 | public static final String DISABLE_LOGS = "disable_logs"; //$NON-NLS-1$ |
| 41 | + public static final String IGNORE_SSL_ERRORS = "ignore_ssl_errors"; //$NON-NLS-1$ |
| 42 | |
| 43 | } |
| 44 | |
| 45 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AddCommand.java' |
| 46 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AddCommand.java 2013-10-28 14:20:05 +0000 |
| 47 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AddCommand.java 2014-06-11 09:53:26 +0000 |
| 48 | @@ -35,7 +35,7 @@ |
| 49 | @Override |
| 50 | public IResource[] execute(IProgressMonitor monitor) throws BazaarException { |
| 51 | try { |
| 52 | - root.getClient().add(getFiles(resources)); |
| 53 | + root.getClient().add(getFiles(resources), getOptions()); |
| 54 | return BzrWorkspaceRoot.findProjectsInBranch(root.getBranch()); |
| 55 | } catch (BazaarClientException e) { |
| 56 | throw BazaarException.wrapException(e); |
| 57 | |
| 58 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AnnotateCommand.java' |
| 59 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AnnotateCommand.java 2013-10-28 14:20:05 +0000 |
| 60 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AnnotateCommand.java 2014-06-11 09:53:26 +0000 |
| 61 | @@ -41,7 +41,7 @@ |
| 62 | monitor.beginTask(CoreTexts.AnnotateCommand_annotate, 1000); |
| 63 | monitor.setTaskName(CoreTexts.AnnotateCommand_annotate); |
| 64 | IBazaarClient client = getClient(resource.getIResource().getProject()); |
| 65 | - annotation = client.annotate(resource.getIResource().getLocation().toFile()); |
| 66 | + annotation = client.annotate(resource.getIResource().getLocation().toFile(), getOptions()); |
| 67 | monitor.worked(1000); |
| 68 | } catch (BazaarClientException e) { |
| 69 | throw BazaarException.wrapException(e, resource.getIResource()); |
| 70 | |
| 71 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BazaarCommand.java' |
| 72 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BazaarCommand.java 2013-10-28 14:20:05 +0000 |
| 73 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BazaarCommand.java 2014-06-11 09:53:26 +0000 |
| 74 | @@ -1,5 +1,6 @@ |
| 75 | /******************************************************************************* |
| 76 | * Copyright (c) 2007-2013 Guillermo Gonzalez |
| 77 | + * Copyright (C) 2014 Alexander Taler |
| 78 | * |
| 79 | * All rights reserved. This program and the accompanying materials |
| 80 | * are made available under the terms of the Eclipse Public License v1.0 |
| 81 | @@ -11,6 +12,7 @@ |
| 82 | |
| 83 | import java.io.File; |
| 84 | import java.util.ArrayList; |
| 85 | +import java.util.Arrays; |
| 86 | import java.util.Collection; |
| 87 | import java.util.HashMap; |
| 88 | import java.util.List; |
| 89 | @@ -19,9 +21,12 @@ |
| 90 | import org.eclipse.core.resources.IProject; |
| 91 | import org.eclipse.core.runtime.IProgressMonitor; |
| 92 | import org.vcs.bazaar.client.IBazaarClient; |
| 93 | +import org.vcs.bazaar.client.commandline.commands.options.Option; |
| 94 | import org.vcs.bazaar.eclipse.BzrWorkspaceRoot; |
| 95 | +import org.vcs.bazaar.eclipse.IBazaarCoreConstants; |
| 96 | import org.vcs.bazaar.eclipse.core.model.IBzrBranch; |
| 97 | import org.vcs.bazaar.eclipse.core.model.local.IBzrLocalResource; |
| 98 | +import org.vcs.bazaar.eclipse.core.utils.PreferenceHelper; |
| 99 | import org.vcs.bazaar.eclipse.internal.core.BazaarException; |
| 100 | |
| 101 | /** |
| 102 | @@ -111,7 +116,39 @@ |
| 103 | } |
| 104 | return list; |
| 105 | } |
| 106 | - |
| 107 | + |
| 108 | + private Option[] options = null; |
| 109 | + |
| 110 | + /** |
| 111 | + * The command-line options included in this command. |
| 112 | + */ |
| 113 | + public Option[] getOptions() { |
| 114 | + if (options == null) { |
| 115 | + // Create options, adding common ones. |
| 116 | + if (PreferenceHelper.getBoolean(IBazaarCoreConstants.IGNORE_SSL_ERRORS)) { |
| 117 | + options = new Option[1]; |
| 118 | + options[0] = new Option("-Ossl.cert_reqs=none"); |
| 119 | + } else { |
| 120 | + options = new Option[0]; |
| 121 | + } |
| 122 | + } |
| 123 | + return options; |
| 124 | + } |
| 125 | + |
| 126 | + /** |
| 127 | + * Add more command-line options to this command. |
| 128 | + */ |
| 129 | + public void addOptions(Option...moreO) { |
| 130 | + // Ensure this.options is initialised |
| 131 | + getOptions(); |
| 132 | + |
| 133 | + Option[] newO = Arrays.copyOf(options, options.length + moreO.length); |
| 134 | + for (int i = 0; i < moreO.length; i++) { |
| 135 | + newO[options.length + i] = moreO[i]; |
| 136 | + } |
| 137 | + options = newO; |
| 138 | + } |
| 139 | + |
| 140 | public abstract void run(IProgressMonitor monitor) throws BazaarException; |
| 141 | |
| 142 | } |
| 143 | |
| 144 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BindCommand.java' |
| 145 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BindCommand.java 2013-10-28 14:20:05 +0000 |
| 146 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BindCommand.java 2014-06-11 09:53:26 +0000 |
| 147 | @@ -39,7 +39,7 @@ |
| 148 | monitor.beginTask(CoreTexts.BindCommand_taskName, 1000); |
| 149 | IBazaarClient client = getClient(branch); |
| 150 | monitor.worked(500); |
| 151 | - client.bind(location); |
| 152 | + client.bind(location, getOptions()); |
| 153 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
| 154 | } catch (BazaarClientException e) { |
| 155 | throw BazaarException.wrapException(e); |
| 156 | |
| 157 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BranchCommand.java' |
| 158 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BranchCommand.java 2013-10-28 14:20:05 +0000 |
| 159 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BranchCommand.java 2014-06-11 09:53:26 +0000 |
| 160 | @@ -14,6 +14,7 @@ |
| 161 | import org.eclipse.core.runtime.IProgressMonitor; |
| 162 | import org.vcs.bazaar.client.BazaarRevision; |
| 163 | import org.vcs.bazaar.client.IBazaarClient; |
| 164 | +import org.vcs.bazaar.client.commandline.commands.options.Option; |
| 165 | import org.vcs.bazaar.client.core.BazaarClientException; |
| 166 | import org.vcs.bazaar.client.core.BazaarClientException.BazaarUncheckedException; |
| 167 | import org.vcs.bazaar.client.core.BranchLocation; |
| 168 | @@ -25,15 +26,16 @@ |
| 169 | /** |
| 170 | * @author Guillermo Gonzalez TODO: add revision support and write a testcase |
| 171 | */ |
| 172 | -public class BranchCommand implements IBazaarCommand { |
| 173 | +public class BranchCommand extends BazaarCommand { |
| 174 | |
| 175 | private final IBzrBranch remoteLocation; |
| 176 | private BazaarRevision revision; |
| 177 | private final File toLocation; |
| 178 | |
| 179 | - public BranchCommand(final IBzrBranch sourceLocation, final File toLocation, String revision) { |
| 180 | + public BranchCommand(final IBzrBranch sourceLocation, final File toLocation, String revision, Option...options) { |
| 181 | this.remoteLocation = sourceLocation; |
| 182 | this.toLocation = toLocation; |
| 183 | + addOptions(options); |
| 184 | if (revision != null && revision.trim().length() != 0) { |
| 185 | try { |
| 186 | this.setRevision(BazaarRevision.getRevision(BazaarRevision.Prefix.REVNO, revision)); |
| 187 | @@ -72,7 +74,7 @@ |
| 188 | */ |
| 189 | protected void runOnClient(IBazaarClient client, CommandProgressListener cpl) |
| 190 | throws BazaarClientException { |
| 191 | - client.branch(getRemoteLocation(), getToLocation(), getRevision(), cpl); |
| 192 | + client.branch(getRemoteLocation(), getToLocation(), getRevision(), cpl, getOptions()); |
| 193 | } |
| 194 | |
| 195 | /** |
| 196 | |
| 197 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CatCommand.java' |
| 198 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CatCommand.java 2013-10-28 14:20:05 +0000 |
| 199 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CatCommand.java 2014-06-11 09:53:26 +0000 |
| 200 | @@ -60,9 +60,9 @@ |
| 201 | monitor.beginTask(CoreTexts.CatCommand_taskName, 1000); |
| 202 | IBazaarClient client = getClient(branch, true); |
| 203 | if (file != null) { |
| 204 | - content = client.cat(file, revision, charsetName); |
| 205 | + content = client.cat(file, revision, charsetName, getOptions()); |
| 206 | } else { |
| 207 | - content = client.cat(location, revision, charsetName); |
| 208 | + content = client.cat(location, revision, charsetName, getOptions()); |
| 209 | } |
| 210 | } catch (BazaarClientException e) { |
| 211 | if (e.getMessage() != null && e.getMessage().contains("is not present in revision")) { |
| 212 | |
| 213 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CheckoutCommand.java' |
| 214 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CheckoutCommand.java 2013-10-31 17:23:10 +0000 |
| 215 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CheckoutCommand.java 2014-06-11 09:53:26 +0000 |
| 216 | @@ -22,11 +22,8 @@ |
| 217 | */ |
| 218 | public class CheckoutCommand extends BranchCommand { |
| 219 | |
| 220 | - private final Option[] options; |
| 221 | - |
| 222 | public CheckoutCommand(final IBzrBranch sourceLocation, final File toLocation, Option...options) { |
| 223 | - super(sourceLocation, toLocation, null); |
| 224 | - this.options = options; |
| 225 | + super(sourceLocation, toLocation, null, options); |
| 226 | } |
| 227 | |
| 228 | /** |
| 229 | @@ -35,7 +32,7 @@ |
| 230 | @Override |
| 231 | protected void runOnClient(IBazaarClient client, CommandProgressListener cpl) |
| 232 | throws BazaarClientException { |
| 233 | - client.checkout(getRemoteLocation(), getToLocation(), cpl, options); |
| 234 | + client.checkout(getRemoteLocation(), getToLocation(), cpl, getOptions()); |
| 235 | } |
| 236 | |
| 237 | } |
| 238 | |
| 239 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CommitCommand.java' |
| 240 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CommitCommand.java 2013-10-28 14:20:05 +0000 |
| 241 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CommitCommand.java 2014-06-11 09:53:26 +0000 |
| 242 | @@ -35,7 +35,6 @@ |
| 243 | |
| 244 | private String commitMessage; |
| 245 | private List<IBzrLocalResource> resources; |
| 246 | - final private List<Option> options; |
| 247 | private boolean fullCommit; |
| 248 | private boolean fullRefresh; |
| 249 | |
| 250 | @@ -46,10 +45,10 @@ |
| 251 | * @param commitMessage |
| 252 | * @param localCommit |
| 253 | */ |
| 254 | - public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage, List<Option> options) { |
| 255 | + public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage, Option... options) { |
| 256 | this.resources = filesToCommit; |
| 257 | this.commitMessage = commitMessage; |
| 258 | - this.options = options; |
| 259 | + addOptions(options); |
| 260 | } |
| 261 | |
| 262 | /** |
| 263 | @@ -59,8 +58,8 @@ |
| 264 | * @param options |
| 265 | * @param fullCommit if tru, the filesToCommit 'll be ignored and a full commit 'll be executed (commit with 0 arguments) |
| 266 | */ |
| 267 | - public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage, List<Option> options, |
| 268 | - boolean fullCommit, boolean fullRefresh) { |
| 269 | + public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage, |
| 270 | + boolean fullCommit, boolean fullRefresh, Option... options) { |
| 271 | this(filesToCommit, commitMessage, options); |
| 272 | this.fullCommit = fullCommit; |
| 273 | this.fullRefresh = fullRefresh; |
| 274 | @@ -81,9 +80,9 @@ |
| 275 | for (IBzrBranch branch : map.keySet()) { |
| 276 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); |
| 277 | if(fullCommit) { |
| 278 | - client.commit(new File[]{branch.getFile()}, commitMessage, options.toArray(new Option[options.size()])); |
| 279 | + client.commit(new File[]{branch.getFile()}, commitMessage, getOptions()); |
| 280 | } else { |
| 281 | - client.commit(map.get(branch).toArray(new File[0]), commitMessage, options.toArray(new Option[options.size()])); |
| 282 | + client.commit(map.get(branch).toArray(new File[0]), commitMessage, getOptions()); |
| 283 | } |
| 284 | } |
| 285 | if (fullCommit || fullRefresh) { |
| 286 | |
| 287 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ConflictsCommand.java' |
| 288 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ConflictsCommand.java 2013-04-14 21:56:10 +0000 |
| 289 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ConflictsCommand.java 2014-06-11 09:53:26 +0000 |
| 290 | @@ -33,7 +33,7 @@ |
| 291 | try { |
| 292 | monitor.beginTask("Getting conflicts", 1000); |
| 293 | IBazaarClient client = getClient(branch, true); |
| 294 | - conflicts = client.conflicts(); |
| 295 | + conflicts = client.conflicts(getOptions()); |
| 296 | monitor.worked(1000); |
| 297 | } catch (BazaarClientException e) { |
| 298 | throw BazaarException.wrapException(e); |
| 299 | |
| 300 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CreatePatchCommand.java' |
| 301 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CreatePatchCommand.java 2013-04-15 10:16:38 +0000 |
| 302 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CreatePatchCommand.java 2014-06-11 09:53:26 +0000 |
| 303 | @@ -41,7 +41,7 @@ |
| 304 | try { |
| 305 | List<File> files = getFiles(resources); |
| 306 | IBazaarClient client = getClient(resources.get(0).getIResource().getProject()); |
| 307 | - patchContent = client.diff(files.toArray(new File[0]), revision); |
| 308 | + patchContent = client.diff(files.toArray(new File[0]), revision, getOptions()); |
| 309 | monitor.worked(100); |
| 310 | } catch (BazaarClientException e) { |
| 311 | throw BazaarException.wrapException(e); |
| 312 | |
| 313 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InfoCommand.java' |
| 314 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InfoCommand.java 2013-10-28 14:20:05 +0000 |
| 315 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InfoCommand.java 2014-06-11 09:53:26 +0000 |
| 316 | @@ -44,9 +44,8 @@ |
| 317 | IBazaarClient client = getClient(branch, true); |
| 318 | // to improve performance when only the default info is required |
| 319 | if(verbose) |
| 320 | - info = client.info(branch.getFile(), IInfoOptions.VERBOSE); |
| 321 | - else |
| 322 | - info = client.info(branch.getFile()); |
| 323 | + addOptions(IInfoOptions.VERBOSE); |
| 324 | + info = client.info(branch.getFile(), getOptions()); |
| 325 | } catch (BazaarClientException e) { |
| 326 | throw BazaarException.wrapException(e); |
| 327 | } finally { |
| 328 | |
| 329 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InitCommand.java' |
| 330 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InitCommand.java 2013-10-28 14:20:05 +0000 |
| 331 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InitCommand.java 2014-06-11 09:53:26 +0000 |
| 332 | @@ -25,7 +25,7 @@ |
| 333 | * @author Guillermo Gonzalez |
| 334 | * |
| 335 | */ |
| 336 | -public class InitCommand implements IBazaarCommand { |
| 337 | +public class InitCommand extends BazaarCommand { |
| 338 | |
| 339 | private final IProject project; |
| 340 | private final IPath branchPath; |
| 341 | @@ -45,7 +45,7 @@ |
| 342 | IBazaarClient client = EclipseBazaarCore.getDefault().createClient(); |
| 343 | client.setWorkDir(branchPath.toFile().getParentFile()); |
| 344 | if (project != null && !new File(branchPath.toFile(), IBzrBranch.DIR_META_FOLDER).exists()) |
| 345 | - client.init(branchPath.toFile()); |
| 346 | + client.init(branchPath.toFile(), getOptions()); |
| 347 | } catch (BazaarClientException e) { |
| 348 | EclipseBazaarCore.log(e.getMessage(), IStatus.ERROR); |
| 349 | throw BazaarException.wrapException(e, project); |
| 350 | |
| 351 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LogCommand.java' |
| 352 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LogCommand.java 2013-11-05 13:35:33 +0000 |
| 353 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LogCommand.java 2014-06-11 09:53:26 +0000 |
| 354 | @@ -9,7 +9,6 @@ |
| 355 | *******************************************************************************/ |
| 356 | package org.vcs.bazaar.eclipse.core.commands; |
| 357 | |
| 358 | -import java.util.ArrayList; |
| 359 | import java.util.Collections; |
| 360 | import java.util.List; |
| 361 | |
| 362 | @@ -17,7 +16,6 @@ |
| 363 | import org.vcs.bazaar.client.IBazaarClient; |
| 364 | import org.vcs.bazaar.client.IBazaarLogMessage; |
| 365 | import org.vcs.bazaar.client.IBazaarRevisionSpec; |
| 366 | -import org.vcs.bazaar.client.commandline.commands.options.Option; |
| 367 | import org.vcs.bazaar.client.commandline.syntax.ILogOptions; |
| 368 | import org.vcs.bazaar.client.core.BazaarClientException; |
| 369 | import org.vcs.bazaar.eclipse.CoreTexts; |
| 370 | @@ -78,23 +76,23 @@ |
| 371 | monitor.beginTask(CoreTexts.LogCommand_log, 1000); |
| 372 | monitor.setTaskName(CoreTexts.LogCommand_log); |
| 373 | IBazaarClient client = getClient(resource.getBranch(), false); |
| 374 | - List<Option> options = new ArrayList<Option>(); |
| 375 | + |
| 376 | if (limit != null) { |
| 377 | - options.add(ILogOptions.LIMIT.setArgument(limit.toString())); |
| 378 | + addOptions(ILogOptions.LIMIT.setArgument(limit.toString())); |
| 379 | } |
| 380 | if (revision != null) { |
| 381 | - options.add(ILogOptions.REVISION.setArgument(revision.toString())); |
| 382 | + addOptions(ILogOptions.REVISION.setArgument(revision.toString())); |
| 383 | } |
| 384 | if (verbose) { |
| 385 | - options.add(ILogOptions.VERBOSE); |
| 386 | + addOptions(ILogOptions.VERBOSE); |
| 387 | } |
| 388 | if(resource instanceof IBzrBranch) { |
| 389 | - logMessages = client.log(((IBzrBranch)resource).getBranchLocation(), options.toArray(new Option[0])); |
| 390 | + logMessages = client.log(((IBzrBranch)resource).getBranchLocation(), getOptions()); |
| 391 | } else if (resource instanceof IBzrLocalResource) { |
| 392 | IBzrLocalResource localResource = ((IBzrLocalResource)resource); |
| 393 | - logMessages = client.log(localResource.getFile(), options.toArray(new Option[0])); |
| 394 | + logMessages = client.log(localResource.getFile(), getOptions()); |
| 395 | } else { |
| 396 | - logMessages = client.log(resource.getLocation(), options.toArray(new Option[0])); |
| 397 | + logMessages = client.log(resource.getLocation(), getOptions()); |
| 398 | } |
| 399 | } catch (BazaarClientException e) { |
| 400 | throw BazaarException.wrapException(e); |
| 401 | |
| 402 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LsCommand.java' |
| 403 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LsCommand.java 2013-10-28 14:20:05 +0000 |
| 404 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LsCommand.java 2014-06-11 09:53:26 +0000 |
| 405 | @@ -38,9 +38,9 @@ |
| 406 | monitor.beginTask("executing ls", 1000); |
| 407 | IBazaarClient client = getClient(resource.getProject(), true); |
| 408 | if(ignored) |
| 409 | - paths = client.ls(resource.getLocation().toFile(), null, ILsOptions.IGNORED, ILsOptions.VERSIONED); |
| 410 | - else |
| 411 | - paths = client.ls(resource.getLocation().toFile(), null, ILsOptions.VERSIONED); |
| 412 | + addOptions(ILsOptions.IGNORED); |
| 413 | + addOptions(ILsOptions.VERSIONED); |
| 414 | + paths = client.ls(resource.getLocation().toFile(), null, getOptions()); |
| 415 | } catch (BazaarClientException e) { |
| 416 | throw BazaarException.wrapException(e, resource); |
| 417 | } finally { |
| 418 | |
| 419 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/MergeCommand.java' |
| 420 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/MergeCommand.java 2013-10-28 14:20:05 +0000 |
| 421 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/MergeCommand.java 2014-06-11 09:53:26 +0000 |
| 422 | @@ -30,13 +30,12 @@ |
| 423 | |
| 424 | private final IBzrBranch branch; |
| 425 | private final BranchLocation location; |
| 426 | - private Option[] options; |
| 427 | |
| 428 | public MergeCommand(IBzrBranch branch, BranchLocation location, Option...options) { |
| 429 | super(); |
| 430 | this.branch = branch; |
| 431 | this.location = location; |
| 432 | - this.options = options; |
| 433 | + addOptions(options); |
| 434 | } |
| 435 | |
| 436 | @Override |
| 437 | @@ -46,7 +45,7 @@ |
| 438 | monitor.setTaskName(CoreTexts.MergeCommand_taskName); |
| 439 | IBazaarClient client = getClient(branch); |
| 440 | monitor.worked(10); |
| 441 | - client.merge(location, options); |
| 442 | + client.merge(location, getOptions()); |
| 443 | } catch (BazaarClientException e) { |
| 444 | if (!setPostCommandErrorOnConflicts(e.getMessage())) { |
| 445 | throw BazaarException.wrapException(e); |
| 446 | @@ -59,7 +58,7 @@ |
| 447 | |
| 448 | @Override |
| 449 | protected int getChangeType() { |
| 450 | - for (Option option : options) { |
| 451 | + for (Option option : getOptions()) { |
| 452 | if(option.equals(IMergeOptions.PULL)) { |
| 453 | return BzrChangeStateEvent.BRANCH_STATE_MODIFY; |
| 454 | } |
| 455 | |
| 456 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PullCommand.java' |
| 457 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PullCommand.java 2013-10-28 14:20:05 +0000 |
| 458 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PullCommand.java 2014-06-11 09:53:26 +0000 |
| 459 | @@ -9,13 +9,9 @@ |
| 460 | *******************************************************************************/ |
| 461 | package org.vcs.bazaar.eclipse.core.commands; |
| 462 | |
| 463 | -import java.util.ArrayList; |
| 464 | -import java.util.List; |
| 465 | - |
| 466 | import org.eclipse.core.resources.IResource; |
| 467 | import org.eclipse.core.runtime.IProgressMonitor; |
| 468 | import org.vcs.bazaar.client.IBazaarClient; |
| 469 | -import org.vcs.bazaar.client.commandline.commands.options.Option; |
| 470 | import org.vcs.bazaar.client.commandline.syntax.IPullOptions; |
| 471 | import org.vcs.bazaar.client.core.BazaarClientException; |
| 472 | import org.vcs.bazaar.client.core.BranchLocation; |
| 473 | @@ -45,14 +41,13 @@ |
| 474 | try { |
| 475 | monitor.beginTask(CoreTexts.PullCommand_taskName, 100); |
| 476 | IBazaarClient client = getClient(branch); |
| 477 | - List<Option> options = new ArrayList<Option>(0); |
| 478 | if (remember) { |
| 479 | - options.add(IPullOptions.REMEMBER); |
| 480 | + addOptions(IPullOptions.REMEMBER); |
| 481 | } |
| 482 | if (overwrite) { |
| 483 | - options.add(IPullOptions.OVERWRITE); |
| 484 | + addOptions(IPullOptions.OVERWRITE); |
| 485 | } |
| 486 | - String err = client.pull(location, new CommandProgressListener(monitor), options.toArray(new Option[options.size()])); |
| 487 | + String err = client.pull(location, new CommandProgressListener(monitor), getOptions()); |
| 488 | setPostCommandErrorOnConflicts(err); |
| 489 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
| 490 | } catch (BazaarClientException e) { |
| 491 | |
| 492 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PushCommand.java' |
| 493 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PushCommand.java 2013-10-28 14:20:05 +0000 |
| 494 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PushCommand.java 2014-06-11 09:53:26 +0000 |
| 495 | @@ -9,12 +9,8 @@ |
| 496 | *******************************************************************************/ |
| 497 | package org.vcs.bazaar.eclipse.core.commands; |
| 498 | |
| 499 | -import java.util.ArrayList; |
| 500 | -import java.util.List; |
| 501 | - |
| 502 | import org.eclipse.core.runtime.IProgressMonitor; |
| 503 | import org.vcs.bazaar.client.IBazaarClient; |
| 504 | -import org.vcs.bazaar.client.commandline.commands.options.Option; |
| 505 | import org.vcs.bazaar.client.commandline.syntax.IPushOptions; |
| 506 | import org.vcs.bazaar.client.core.BazaarClientException; |
| 507 | import org.vcs.bazaar.client.core.BranchLocation; |
| 508 | @@ -42,17 +38,16 @@ |
| 509 | public void run(IProgressMonitor monitor) throws BazaarException { |
| 510 | try { |
| 511 | IBazaarClient client = getClient(branch); |
| 512 | - List<Option> options = new ArrayList<Option>(0); |
| 513 | if(remember) { |
| 514 | - options.add(IPushOptions.REMEMBER); |
| 515 | + addOptions(IPushOptions.REMEMBER); |
| 516 | } |
| 517 | if(useExsitingDir) { |
| 518 | - options.add(IPushOptions.USE_EXISTING_DIR); |
| 519 | + addOptions(IPushOptions.USE_EXISTING_DIR); |
| 520 | } |
| 521 | if (overwrite) { |
| 522 | - options.add(IPushOptions.OVERWRITE); |
| 523 | + addOptions(IPushOptions.OVERWRITE); |
| 524 | } |
| 525 | - client.push(location, options.toArray(new Option[options.size()])); |
| 526 | + client.push(location, getOptions()); |
| 527 | } catch (BazaarClientException e) { |
| 528 | throw BazaarException.wrapException(e); |
| 529 | } finally { |
| 530 | |
| 531 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseAbortCommand.java' |
| 532 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseAbortCommand.java 2013-06-08 06:24:53 +0000 |
| 533 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseAbortCommand.java 2014-06-11 09:53:26 +0000 |
| 534 | @@ -22,7 +22,7 @@ |
| 535 | |
| 536 | @Override |
| 537 | protected void executeInternally(IBazaarClient client) throws BazaarClientException { |
| 538 | - client.rebaseAbort(); |
| 539 | + client.rebaseAbort(getOptions()); |
| 540 | } |
| 541 | |
| 542 | } |
| 543 | |
| 544 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseCommand.java' |
| 545 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseCommand.java 2013-09-18 09:51:10 +0000 |
| 546 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseCommand.java 2014-06-11 09:53:26 +0000 |
| 547 | @@ -29,7 +29,6 @@ |
| 548 | |
| 549 | private final IBzrBranch branch; |
| 550 | private final BranchLocation location; |
| 551 | - private final Option[] options; |
| 552 | private BazaarException rebaseConflictsException; |
| 553 | private static final Pattern CONFLICT_PATTERN = Pattern.compile("conflict occurred"); |
| 554 | |
| 555 | @@ -40,7 +39,7 @@ |
| 556 | public RebaseCommand(IBzrBranch branch, BranchLocation location, Option...options) { |
| 557 | this.branch = branch; |
| 558 | this.location = location; |
| 559 | - this.options = options; |
| 560 | + addOptions(options); |
| 561 | } |
| 562 | |
| 563 | @Override |
| 564 | @@ -63,7 +62,7 @@ |
| 565 | } |
| 566 | |
| 567 | protected void executeInternally(IBazaarClient client) throws BazaarClientException { |
| 568 | - client.rebase(location, options); |
| 569 | + client.rebase(location, getOptions()); |
| 570 | } |
| 571 | |
| 572 | @Override |
| 573 | |
| 574 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseContinueCommand.java' |
| 575 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseContinueCommand.java 2013-06-08 06:24:53 +0000 |
| 576 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseContinueCommand.java 2014-06-11 09:53:26 +0000 |
| 577 | @@ -22,6 +22,6 @@ |
| 578 | |
| 579 | @Override |
| 580 | protected void executeInternally(IBazaarClient client) throws BazaarClientException { |
| 581 | - client.rebaseContinue(); |
| 582 | + client.rebaseContinue(getOptions()); |
| 583 | } |
| 584 | } |
| 585 | |
| 586 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseToDoCommand.java' |
| 587 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseToDoCommand.java 2013-05-17 18:36:24 +0000 |
| 588 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseToDoCommand.java 2014-06-11 09:53:26 +0000 |
| 589 | @@ -29,7 +29,7 @@ |
| 590 | public void run(IProgressMonitor monitor) throws BazaarException { |
| 591 | IBazaarClient client = getClient(branch, true); |
| 592 | try { |
| 593 | - rebaseInterrupted = client.rebaseToDo(); |
| 594 | + rebaseInterrupted = client.rebaseToDo(getOptions()); |
| 595 | } catch (BazaarClientException e) { |
| 596 | throw BazaarException.wrapException(e); |
| 597 | } |
| 598 | |
| 599 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ReconfigureCommand.java' |
| 600 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ReconfigureCommand.java 2014-04-09 18:54:55 +0000 |
| 601 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ReconfigureCommand.java 2014-06-11 09:53:26 +0000 |
| 602 | @@ -71,7 +71,7 @@ |
| 603 | BranchLocation remoteLocation = getBranchLocation(); |
| 604 | if (remoteLocation != null) { |
| 605 | // 1. run regular checkout |
| 606 | - client.checkout(remoteLocation, tempFolder, new CommandProgressListener(monitor)); |
| 607 | + client.checkout(remoteLocation, tempFolder, new CommandProgressListener(monitor), getOptions()); |
| 608 | // 2. copy repository folder |
| 609 | moveFolder(tempFolder, IBzrBranch.REPOSITORY_FOLDER); |
| 610 | // 3. copy branch folder |
| 611 | |
| 612 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RemoveCommand.java' |
| 613 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RemoveCommand.java 2013-10-28 14:20:05 +0000 |
| 614 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RemoveCommand.java 2014-06-11 09:53:26 +0000 |
| 615 | @@ -43,7 +43,8 @@ |
| 616 | monitor.setTaskName(CoreTexts.RemoveCommand_removing); |
| 617 | for (IBzrBranch branch : map.keySet()) { |
| 618 | IBazaarClient client = getClient(branch); |
| 619 | - client.remove(map.get(branch).toArray(new File[0]), IRemoveOptions.KEEP); |
| 620 | + addOptions(IRemoveOptions.KEEP); |
| 621 | + client.remove(map.get(branch).toArray(new File[0]), getOptions()); |
| 622 | } |
| 623 | return getIResources(resources); |
| 624 | } catch (BazaarClientException e) { |
| 625 | |
| 626 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ResolveCommand.java' |
| 627 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ResolveCommand.java 2013-10-28 14:20:05 +0000 |
| 628 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ResolveCommand.java 2014-06-11 09:53:26 +0000 |
| 629 | @@ -32,7 +32,6 @@ |
| 630 | public class ResolveCommand extends ResourceChangeCommand { |
| 631 | |
| 632 | private final IBzrLocalResource[] resources; |
| 633 | - private final Option[] options; |
| 634 | |
| 635 | /** |
| 636 | * This constructor should to be used only on non-project resources (only files and folders) |
| 637 | @@ -48,7 +47,7 @@ |
| 638 | */ |
| 639 | public ResolveCommand(IBzrLocalResource[] bzrResources, Option...options) { |
| 640 | this.resources = bzrResources; |
| 641 | - this.options = options; |
| 642 | + addOptions(options); |
| 643 | } |
| 644 | |
| 645 | public ResolveCommand(Collection<IResource> resources, Option...options) { |
| 646 | @@ -81,7 +80,7 @@ |
| 647 | monitor.beginTask("Resolving", map.keySet().size()); |
| 648 | for (IBzrBranch branch : map.keySet()) { |
| 649 | IBazaarClient client = getClient(branch); |
| 650 | - client.resolve(map.get(branch), options); |
| 651 | + client.resolve(map.get(branch), getOptions()); |
| 652 | monitor.worked(1); |
| 653 | } |
| 654 | List<IResource> changed = new ArrayList<IResource>(resources.length); |
| 655 | |
| 656 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RevertCommand.java' |
| 657 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RevertCommand.java 2013-10-28 14:20:05 +0000 |
| 658 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RevertCommand.java 2014-06-11 09:53:26 +0000 |
| 659 | @@ -32,7 +32,6 @@ |
| 660 | */ |
| 661 | public class RevertCommand extends ResourceChangeCommand { |
| 662 | private List<IBzrLocalResource> resources; |
| 663 | - private Option[] options; |
| 664 | private boolean revertBranch; |
| 665 | |
| 666 | /** |
| 667 | @@ -44,7 +43,7 @@ |
| 668 | public RevertCommand(List<IBzrLocalResource> resourcesToRevert, boolean revertBranch, Option[] options) { |
| 669 | super(); |
| 670 | this.resources = resourcesToRevert; |
| 671 | - this.options = options; |
| 672 | + addOptions(options); |
| 673 | this.revertBranch = revertBranch; |
| 674 | } |
| 675 | |
| 676 | @@ -63,9 +62,9 @@ |
| 677 | for (IBzrBranch branch : map.keySet()) { |
| 678 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); |
| 679 | if(revertBranch) { |
| 680 | - client.revert(new File[]{branch.getFile()}, options); |
| 681 | + client.revert(new File[]{branch.getFile()}, getOptions()); |
| 682 | } else { |
| 683 | - client.revert(map.get(branch).toArray(new File[0]), options); |
| 684 | + client.revert(map.get(branch).toArray(new File[0]), getOptions()); |
| 685 | } |
| 686 | resourcesToRefresh.addAll(Arrays.asList(BzrWorkspaceRoot.findProjectsInBranch(branch))); |
| 687 | } |
| 688 | |
| 689 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SendCommand.java' |
| 690 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SendCommand.java 2013-10-31 17:23:10 +0000 |
| 691 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SendCommand.java 2014-06-11 09:53:26 +0000 |
| 692 | @@ -28,13 +28,12 @@ |
| 693 | |
| 694 | private final IBzrLocalResource resource; |
| 695 | private IBazaarAnnotation annotation; |
| 696 | - private Option[] options; |
| 697 | private BranchLocation branchLocation; |
| 698 | |
| 699 | |
| 700 | public SendCommand(IBzrLocalResource bzrResource, Option[] options, BranchLocation branchLocation) { |
| 701 | this.resource = bzrResource; |
| 702 | - this.options = options; |
| 703 | + addOptions(options); |
| 704 | this.branchLocation = branchLocation; |
| 705 | } |
| 706 | |
| 707 | @@ -48,7 +47,7 @@ |
| 708 | monitor.beginTask(CoreTexts.SendCommand_send, 1000); |
| 709 | IBazaarClient client = getClient(resource.getBranch()); |
| 710 | |
| 711 | - client.send(branchLocation, options); |
| 712 | + client.send(branchLocation, getOptions()); |
| 713 | |
| 714 | } catch (BazaarClientException e) { |
| 715 | throw BazaarException.wrapException(e, resource.getIResource()); |
| 716 | |
| 717 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveCommand.java' |
| 718 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveCommand.java 2013-09-14 22:05:16 +0000 |
| 719 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveCommand.java 2014-06-11 09:53:26 +0000 |
| 720 | @@ -30,13 +30,12 @@ |
| 721 | public class ShelveCommand extends ResourceChangeCommand { |
| 722 | |
| 723 | private List<IBzrLocalResource> resources; |
| 724 | - private Option[] options; |
| 725 | private boolean shelveBranch; |
| 726 | |
| 727 | public ShelveCommand(List<IBzrLocalResource> resourcesToShelve, boolean shelveBranch, Option[] options) { |
| 728 | this.resources = resourcesToShelve; |
| 729 | this.shelveBranch = shelveBranch; |
| 730 | - this.options = options; |
| 731 | + addOptions(options); |
| 732 | } |
| 733 | |
| 734 | @Override |
| 735 | @@ -48,9 +47,9 @@ |
| 736 | for (IBzrBranch branch : map.keySet()) { |
| 737 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); |
| 738 | if (shelveBranch) { |
| 739 | - client.shelve(new File[0], options); |
| 740 | + client.shelve(new File[0], getOptions()); |
| 741 | } else { |
| 742 | - client.shelve(map.get(branch).toArray(new File[0]), options); |
| 743 | + client.shelve(map.get(branch).toArray(new File[0]), getOptions()); |
| 744 | } |
| 745 | resourcesToRefresh.addAll(Arrays.asList(BzrWorkspaceRoot.findProjectsInBranch(branch))); |
| 746 | } |
| 747 | |
| 748 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveListCommand.java' |
| 749 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveListCommand.java 2013-04-14 21:56:10 +0000 |
| 750 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveListCommand.java 2014-06-11 09:53:26 +0000 |
| 751 | @@ -34,7 +34,7 @@ |
| 752 | try { |
| 753 | monitor.beginTask(CoreTexts.ShelveListCommand_taskName, 100); |
| 754 | IBazaarClient client = getClient(branch, true); |
| 755 | - shelves = client.shelveList(); |
| 756 | + shelves = client.shelveList(getOptions()); |
| 757 | monitor.worked(100); |
| 758 | } catch (BazaarClientException e) { |
| 759 | throw BazaarException.wrapException(e); |
| 760 | |
| 761 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusCommand.java' |
| 762 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusCommand.java 2013-10-28 14:20:05 +0000 |
| 763 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusCommand.java 2014-06-11 09:53:26 +0000 |
| 764 | @@ -33,7 +33,6 @@ |
| 765 | import org.vcs.bazaar.client.IBazaarRevisionSpec; |
| 766 | import org.vcs.bazaar.client.IBazaarStatus; |
| 767 | import org.vcs.bazaar.client.commandline.commands.options.KeywordOption; |
| 768 | -import org.vcs.bazaar.client.commandline.commands.options.Option; |
| 769 | import org.vcs.bazaar.client.commandline.syntax.IStatusOptions; |
| 770 | import org.vcs.bazaar.client.core.BazaarClientException; |
| 771 | import org.vcs.bazaar.eclipse.BzrWorkspaceRoot; |
| 772 | @@ -59,7 +58,6 @@ |
| 773 | /* if set folders with status 'unknown' will be scanned and all sub-folders/files will be added to status map with status 'unknown' */ |
| 774 | private boolean addNestedUnknown = true; |
| 775 | private List<IBazaarLogMessage> pendingMerges; |
| 776 | - private Option[] options = new Option[0]; |
| 777 | |
| 778 | /** |
| 779 | * Invoked by StatusCommand |
| 780 | @@ -84,7 +82,7 @@ |
| 781 | |
| 782 | public StatusCommand(IBzrLocalResource[] resources, IBazaarRevisionSpec revision) { |
| 783 | this(resources, true); |
| 784 | - options = new KeywordOption[]{new KeywordOption(IStatusOptions.REVISION.getOption(), revision.toString())}; |
| 785 | + addOptions(new KeywordOption(IStatusOptions.REVISION.getOption(), revision.toString())); |
| 786 | } |
| 787 | |
| 788 | /* |
| 789 | @@ -135,7 +133,7 @@ |
| 790 | */ |
| 791 | private void executeAndFilterLogOutput(final IBzrBranch branch, File[] files) throws BazaarClientException, CoreException { |
| 792 | IBazaarClient client = getClient(branch, noLog); |
| 793 | - BazaarTreeStatus treeStatus = client.status(files, options); |
| 794 | + BazaarTreeStatus treeStatus = client.status(files, getOptions()); |
| 795 | pendingMerges = treeStatus.getPendingMerges(); |
| 796 | IBazaarStatus[] statuses = treeStatus.getStatusAsArray(); |
| 797 | Set<IContainer> unknown = new HashSet<IContainer>(); |
| 798 | |
| 799 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusUpdaterCommand.java' |
| 800 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusUpdaterCommand.java 2013-09-12 10:03:07 +0000 |
| 801 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusUpdaterCommand.java 2014-06-11 09:53:26 +0000 |
| 802 | @@ -8,10 +8,8 @@ |
| 803 | package org.vcs.bazaar.eclipse.core.commands; |
| 804 | |
| 805 | import java.io.File; |
| 806 | -import java.util.ArrayList; |
| 807 | import java.util.HashMap; |
| 808 | import java.util.HashSet; |
| 809 | -import java.util.List; |
| 810 | import java.util.Map; |
| 811 | import java.util.Set; |
| 812 | |
| 813 | @@ -28,7 +26,6 @@ |
| 814 | import org.vcs.bazaar.client.IBazaarItemInfo; |
| 815 | import org.vcs.bazaar.client.IBazaarLogMessage; |
| 816 | import org.vcs.bazaar.client.IBazaarStatus; |
| 817 | -import org.vcs.bazaar.client.commandline.commands.options.Option; |
| 818 | import org.vcs.bazaar.client.commandline.syntax.ILsOptions; |
| 819 | import org.vcs.bazaar.client.core.BazaarClientException; |
| 820 | import org.vcs.bazaar.eclipse.core.model.BzrStatus; |
| 821 | @@ -88,17 +85,14 @@ |
| 822 | File file = resourceToRefresh.getLocation().toFile(); |
| 823 | /* get all versioned and ignored resources with ls command excluding derived resources */ |
| 824 | IBazaarItemInfo[] paths; |
| 825 | - List<Option> options = new ArrayList<Option>(); |
| 826 | - options.add(ILsOptions.IGNORED); |
| 827 | - options.add(ILsOptions.VERSIONED); |
| 828 | - options.add(ILsOptions.UNKNOWN); |
| 829 | + addOptions(ILsOptions.IGNORED, ILsOptions.VERSIONED, ILsOptions.UNKNOWN); |
| 830 | if (shallow) { |
| 831 | - options.add(ILsOptions.NON_RECURSIVE); |
| 832 | + addOptions(ILsOptions.NON_RECURSIVE); |
| 833 | } |
| 834 | if (verbose) { |
| 835 | - options.add(ILsOptions.VERBOSE); |
| 836 | + addOptions(ILsOptions.VERBOSE); |
| 837 | } |
| 838 | - paths = client.ls(file, null, options.toArray(new Option[0])); |
| 839 | + paths = client.ls(file, null, getOptions()); |
| 840 | /* execute st command and turn its result into a status map */ |
| 841 | BazaarTreeStatus treeStatus = client.status(new File[]{file}); |
| 842 | IBazaarStatus[] statuses = treeStatus.getStatusAsArray(); |
| 843 | |
| 844 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SwitchCommand.java' |
| 845 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SwitchCommand.java 2013-10-28 14:20:05 +0000 |
| 846 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SwitchCommand.java 2014-06-11 09:53:26 +0000 |
| 847 | @@ -9,13 +9,9 @@ |
| 848 | *******************************************************************************/ |
| 849 | package org.vcs.bazaar.eclipse.core.commands; |
| 850 | |
| 851 | -import java.util.ArrayList; |
| 852 | -import java.util.List; |
| 853 | - |
| 854 | import org.eclipse.core.resources.IResource; |
| 855 | import org.eclipse.core.runtime.IProgressMonitor; |
| 856 | import org.vcs.bazaar.client.IBazaarClient; |
| 857 | -import org.vcs.bazaar.client.commandline.commands.options.Option; |
| 858 | import org.vcs.bazaar.client.commandline.syntax.ISwitchOptions; |
| 859 | import org.vcs.bazaar.client.core.BazaarClientException; |
| 860 | import org.vcs.bazaar.client.core.BranchLocation; |
| 861 | @@ -47,14 +43,13 @@ |
| 862 | monitor.beginTask(CoreTexts.bind(CoreTexts.SwitchCommand_taskName, location.toString()), 100); |
| 863 | monitor.setTaskName(CoreTexts.bind(CoreTexts.SwitchCommand_taskName, location.toString())); |
| 864 | IBazaarClient client = getClient(branch); |
| 865 | - List<Option> options = new ArrayList<Option>(0); |
| 866 | if (force) { |
| 867 | - options.add(ISwitchOptions.FORCE); |
| 868 | + addOptions(ISwitchOptions.FORCE); |
| 869 | } |
| 870 | if (createBranch) { |
| 871 | - options.add(ISwitchOptions.CREATE_BRANCH); |
| 872 | + addOptions(ISwitchOptions.CREATE_BRANCH); |
| 873 | } |
| 874 | - client.switchBranch(location, new CommandProgressListener(monitor), options.toArray(new Option[options.size()])); |
| 875 | + client.switchBranch(location, new CommandProgressListener(monitor), getOptions()); |
| 876 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
| 877 | } catch (BazaarClientException e) { |
| 878 | throw BazaarException.wrapException(e); |
| 879 | |
| 880 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/TagCommand.java' |
| 881 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/TagCommand.java 2013-03-19 15:05:13 +0000 |
| 882 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/TagCommand.java 2014-06-11 09:53:26 +0000 |
| 883 | @@ -22,12 +22,11 @@ |
| 884 | |
| 885 | private final IBzrBranch branch; |
| 886 | private final String tagName; |
| 887 | - private final Option[] options; |
| 888 | |
| 889 | public TagCommand(IBzrBranch branch, String tagName, Option[] options) { |
| 890 | this.branch = branch; |
| 891 | this.tagName = tagName; |
| 892 | - this.options = options; |
| 893 | + addOptions(options); |
| 894 | } |
| 895 | |
| 896 | @Override |
| 897 | @@ -36,7 +35,7 @@ |
| 898 | monitor.beginTask(CoreTexts.bind(CoreTexts.TagCommand_taskName, branch.getName()), 100); |
| 899 | monitor.setTaskName(CoreTexts.bind(CoreTexts.TagCommand_taskName, branch.getName())); |
| 900 | IBazaarClient client = getClient(branch); |
| 901 | - client.tag(tagName, options); |
| 902 | + client.tag(tagName, getOptions()); |
| 903 | } catch (BazaarClientException e) { |
| 904 | throw BazaarException.wrapException(e); |
| 905 | } finally { |
| 906 | |
| 907 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnBindCommand.java' |
| 908 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnBindCommand.java 2013-10-28 14:20:05 +0000 |
| 909 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnBindCommand.java 2014-06-11 09:53:26 +0000 |
| 910 | @@ -36,7 +36,7 @@ |
| 911 | monitor.beginTask(CoreTexts.UnBindCommand_taskName, 1000); |
| 912 | monitor.setTaskName(CoreTexts.UnBindCommand_taskName); |
| 913 | IBazaarClient client = getClient(branch); |
| 914 | - client.unBind(); |
| 915 | + client.unBind(getOptions()); |
| 916 | monitor.worked(1000); |
| 917 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
| 918 | } catch (BazaarClientException e) { |
| 919 | |
| 920 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnCommitCommand.java' |
| 921 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnCommitCommand.java 2013-10-28 14:20:05 +0000 |
| 922 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnCommitCommand.java 2014-06-11 09:53:26 +0000 |
| 923 | @@ -34,7 +34,7 @@ |
| 924 | try { |
| 925 | monitor.beginTask(CoreTexts.UnCommitCommand_unCommiting, 100); |
| 926 | monitor.setTaskName(CoreTexts.UnCommitCommand_unCommiting); |
| 927 | - BzrWorkspaceRoot.getClient(branch).unCommit(branch.getPath().toFile()); |
| 928 | + BzrWorkspaceRoot.getClient(branch).unCommit(branch.getPath().toFile(), getOptions()); |
| 929 | monitor.worked(100); |
| 930 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
| 931 | } catch (BazaarClientException e) { |
| 932 | |
| 933 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnShelveCommand.java' |
| 934 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnShelveCommand.java 2013-04-14 21:56:10 +0000 |
| 935 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnShelveCommand.java 2014-06-11 09:53:26 +0000 |
| 936 | @@ -24,12 +24,11 @@ |
| 937 | |
| 938 | private IBzrBranch branch; |
| 939 | private String shelfId; |
| 940 | - private Option[] options; |
| 941 | |
| 942 | public UnShelveCommand(IBzrBranch branch, String shelfId, Option[] options) { |
| 943 | this.branch = branch; |
| 944 | this.shelfId = shelfId; |
| 945 | - this.options = options; |
| 946 | + addOptions(options); |
| 947 | } |
| 948 | |
| 949 | @Override |
| 950 | @@ -38,7 +37,7 @@ |
| 951 | monitor.beginTask(CoreTexts.UnShelveCommand_taskName, 100); |
| 952 | monitor.setTaskName(CoreTexts.UnShelveCommand_taskName); |
| 953 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); |
| 954 | - client.unShelve(shelfId, options); |
| 955 | + client.unShelve(shelfId, getOptions()); |
| 956 | monitor.worked(100); |
| 957 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
| 958 | } catch (BazaarClientException e) { |
| 959 | |
| 960 | === modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UpdateCommand.java' |
| 961 | --- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UpdateCommand.java 2013-10-28 14:20:05 +0000 |
| 962 | +++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UpdateCommand.java 2014-06-11 09:53:26 +0000 |
| 963 | @@ -36,7 +36,7 @@ |
| 964 | monitor.beginTask("Update command", 100); |
| 965 | monitor.setTaskName("Updating"); |
| 966 | IBazaarClient client = getClient(branch); |
| 967 | - client.update(branch.getFile(), new CommandProgressListener(monitor)); |
| 968 | + client.update(branch.getFile(), new CommandProgressListener(monitor), getOptions()); |
| 969 | } catch (BazaarClientException e) { |
| 970 | if (!setPostCommandErrorOnConflicts(e.getMessage())) { |
| 971 | throw BazaarException.wrapException(e); |
| 972 | |
| 973 | === modified file 'org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/UITexts.java' |
| 974 | --- org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/UITexts.java 2014-01-14 22:00:23 +0000 |
| 975 | +++ org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/UITexts.java 2014-06-11 09:53:26 +0000 |
| 976 | @@ -77,6 +77,7 @@ |
| 977 | public static String BazaarPreferencesPage_disable_logs; |
| 978 | public static String BazaarPreferencesPage_xmlrpc_port; |
| 979 | public static String BazaarPreferencesPage_client_type; |
| 980 | + public static String BazaarPreferencesPage_ignore_ssl_errors; |
| 981 | |
| 982 | // Console preferences |
| 983 | public static String BazaarConsole_name; |
| 984 | |
| 985 | === modified file 'org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/actions/CommitAction.java' |
| 986 | --- org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/actions/CommitAction.java 2014-02-04 13:27:54 +0000 |
| 987 | +++ org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/actions/CommitAction.java 2014-06-11 09:53:26 +0000 |
| 988 | @@ -154,7 +154,7 @@ |
| 989 | final List<IBzrLocalResource> filesToCommit = getResources(commitDialog.getSelectedFiles()); |
| 990 | final String commitText = commitDialog.getCommitMessage(); |
| 991 | final boolean pushAfterCommit = commitDialog.isPushAfterCommit(); |
| 992 | - final List<Option> options = commitDialog.getOptions(); |
| 993 | + final Option[] options = commitDialog.getOptions().toArray(new Option[0]); |
| 994 | final boolean fullRefresh = !getUnknownOrAddedResources(commitDialog.getSelectedFiles()).isEmpty(); |
| 995 | Job job = new Job("Running commit") { |
| 996 | @Override |
| 997 | @@ -174,9 +174,9 @@ |
| 998 | if(commitableResources.getAllPendingMerges().size() > 0) { |
| 999 | // commit all modified files (including unknowns) |
| 1000 | // currently we do this, by committing without passing any file to the commit cmd |
| 1001 | - commitCmd = new CommitCommand(filesToCommit, commitText, options, true, true); |
| 1002 | + commitCmd = new CommitCommand(filesToCommit, commitText, true, true, options); |
| 1003 | } else { |
| 1004 | - commitCmd = new CommitCommand(filesToCommit, commitText, options, false, fullRefresh); |
| 1005 | + commitCmd = new CommitCommand(filesToCommit, commitText, false, fullRefresh, options); |
| 1006 | } |
| 1007 | commitCmd.run(EclipseBazaarCore.subProgressMonitorFor(monitor)); |
| 1008 | } |
| 1009 | |
| 1010 | === modified file 'org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/preferences/BazaarPreferencePage.java' |
| 1011 | --- org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/preferences/BazaarPreferencePage.java 2014-01-15 17:33:43 +0000 |
| 1012 | +++ org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/preferences/BazaarPreferencePage.java 2014-06-11 09:53:26 +0000 |
| 1013 | @@ -72,6 +72,7 @@ |
| 1014 | createXmlRpClientConfigControl(); |
| 1015 | disableLogs = new BooleanFieldEditor(IBazaarCoreConstants.DISABLE_LOGS, UITexts.BazaarPreferencesPage_disable_logs, getFieldEditorParent()); |
| 1016 | addField(disableLogs); |
| 1017 | + addField(new BooleanFieldEditor(IBazaarCoreConstants.IGNORE_SSL_ERRORS, UITexts.BazaarPreferencesPage_ignore_ssl_errors, getFieldEditorParent())); |
| 1018 | executable.getTextControl(getFieldEditorParent()).setEditable(false); |
| 1019 | email.getTextControl(getFieldEditorParent()).setEnabled(getPreferenceStore().getBoolean(IBazaarCoreConstants.OVERWRITE_EMAIL)); |
| 1020 | } |
| 1021 | |
| 1022 | === modified file 'org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/uitexts.properties' |
| 1023 | --- org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/uitexts.properties 2014-01-14 22:00:23 +0000 |
| 1024 | +++ org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/uitexts.properties 2014-06-11 09:53:26 +0000 |
| 1025 | @@ -78,6 +78,7 @@ |
| 1026 | BazaarPreferencesPage_disable_logs=&Disable logging to file (.bzr.log) |
| 1027 | BazaarPreferencesPage_xmlrpc_port=XMLRpc service port |
| 1028 | BazaarPreferencesPage_client_type=Client type: |
| 1029 | +BazaarPreferencesPage_ignore_ssl_errors=Ignore SSL certificate errors for this workspace |
| 1030 | |
| 1031 | #Console |
| 1032 | BazaarConsole_name=Bazaar Console |
| 1033 | |
| 1034 | === modified file 'org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/wizards/createproject/CreateProjectWizard.java' |
| 1035 | --- org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/wizards/createproject/CreateProjectWizard.java 2013-11-12 20:25:36 +0000 |
| 1036 | +++ org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/wizards/createproject/CreateProjectWizard.java 2014-06-11 09:53:26 +0000 |
| 1037 | @@ -182,12 +182,13 @@ |
| 1038 | } |
| 1039 | if (projectToUse != null) { |
| 1040 | op = new CreateBazaarProjectOperation(getContainer(), tempFolder, projectToUse); |
| 1041 | + op.run(); |
| 1042 | } |
| 1043 | } else { |
| 1044 | op = new CreateBazaarProjectOperation(getContainer(), tempFolder, |
| 1045 | wizard.getProjectName(), wizard.getProjectLocation(), wizard.getWizardType() == ProjectWizardType.IMPORT_EXISTING); |
| 1046 | + op.run(); |
| 1047 | } |
| 1048 | - op.run(); |
| 1049 | } |
| 1050 | // Clean up the mess |
| 1051 | if (op == null) { |

Reviewed by Piotr over email