Merge lp:~alex-idereal/bzr-eclipse/ignore-SSL-errors into lp:bzr-eclipse

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
Reviewer Review Type Date Requested Status
Alexander Taler Approve
Review via email: mp+222773@code.launchpad.net

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 :

Reviewed by Piotr over email

review: Approve
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
=== modified file 'org.vcs.bazaar.eclipse.core.tests/.classpath'
--- org.vcs.bazaar.eclipse.core.tests/.classpath 2014-01-16 12:36:20 +0000
+++ org.vcs.bazaar.eclipse.core.tests/.classpath 2014-06-11 09:53:26 +0000
@@ -5,5 +5,6 @@
5 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>5 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
6 <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>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"/>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"/>
8 <classpathentry kind="output" path="bin"/>9 <classpathentry kind="output" path="bin"/>
9</classpath>10</classpath>
1011
=== modified file 'org.vcs.bazaar.eclipse.core.tests/src/org/vcs/bazaar/eclipse/core/commands/CommitCommandTest.java'
--- org.vcs.bazaar.eclipse.core.tests/src/org/vcs/bazaar/eclipse/core/commands/CommitCommandTest.java 2013-10-31 17:23:10 +0000
+++ org.vcs.bazaar.eclipse.core.tests/src/org/vcs/bazaar/eclipse/core/commands/CommitCommandTest.java 2014-06-11 09:53:26 +0000
@@ -59,7 +59,7 @@
59 BazaarTreeStatus treeStatus = getClient().status(new File[] { getProject().getLocation().toFile() });59 BazaarTreeStatus treeStatus = getClient().status(new File[] { getProject().getLocation().toFile() });
60 getWt().check(treeStatus.getStatusAsArray(), getProject().getLocation().toFile().getCanonicalPath());60 getWt().check(treeStatus.getStatusAsArray(), getProject().getLocation().toFile().getCanonicalPath());
6161
62 CommitCommand cmd = new CommitCommand(resources, "test commit", new ArrayList<Option>(0));62 CommitCommand cmd = new CommitCommand(resources, "test commit");
63 IResource[] commitedResources = cmd.execute(new NullProgressMonitor());63 IResource[] commitedResources = cmd.execute(new NullProgressMonitor());
64 assertNotNull(commitedResources);64 assertNotNull(commitedResources);
65 assertEquals(1, commitedResources.length);65 assertEquals(1, commitedResources.length);
@@ -79,7 +79,7 @@
79 final String textToAdd = "this is text added to " + aFile.getName();79 final String textToAdd = "this is text added to " + aFile.getName();
80 addContentToFile(aFile, textToAdd);80 addContentToFile(aFile, textToAdd);
8181
82 CommitCommand cmd = new CommitCommand(resources, "Příšrně žlutý kůň úpěl ďábelské ódy (czech language)", new ArrayList<Option>(0));82 CommitCommand cmd = new CommitCommand(resources, "Příšrně žlutý kůň úpěl ďábelské ódy (czech language)");
83 IResource[] commitedResources = cmd.execute(new NullProgressMonitor());83 IResource[] commitedResources = cmd.execute(new NullProgressMonitor());
84 assertNotNull(commitedResources);84 assertNotNull(commitedResources);
85 assertEquals(1, commitedResources.length);85 assertEquals(1, commitedResources.length);
8686
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/IBazaarCoreConstants.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/IBazaarCoreConstants.java 2014-01-14 22:00:23 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/IBazaarCoreConstants.java 2014-06-11 09:53:26 +0000
@@ -20,5 +20,6 @@
20 public static final String AUTO_SHARE_PROJECTS = "auto_share_projects"; //$NON-NLS-1$20 public static final String AUTO_SHARE_PROJECTS = "auto_share_projects"; //$NON-NLS-1$
21 public static final String OVERWRITE_EMAIL = "pref_overwrite_email"; //$NON-NLS-1$21 public static final String OVERWRITE_EMAIL = "pref_overwrite_email"; //$NON-NLS-1$
22 public static final String DISABLE_LOGS = "disable_logs"; //$NON-NLS-1$22 public static final String DISABLE_LOGS = "disable_logs"; //$NON-NLS-1$
23 public static final String IGNORE_SSL_ERRORS = "ignore_ssl_errors"; //$NON-NLS-1$
2324
24}25}
2526
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AddCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AddCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AddCommand.java 2014-06-11 09:53:26 +0000
@@ -35,7 +35,7 @@
35 @Override35 @Override
36 public IResource[] execute(IProgressMonitor monitor) throws BazaarException {36 public IResource[] execute(IProgressMonitor monitor) throws BazaarException {
37 try {37 try {
38 root.getClient().add(getFiles(resources));38 root.getClient().add(getFiles(resources), getOptions());
39 return BzrWorkspaceRoot.findProjectsInBranch(root.getBranch());39 return BzrWorkspaceRoot.findProjectsInBranch(root.getBranch());
40 } catch (BazaarClientException e) {40 } catch (BazaarClientException e) {
41 throw BazaarException.wrapException(e);41 throw BazaarException.wrapException(e);
4242
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AnnotateCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AnnotateCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/AnnotateCommand.java 2014-06-11 09:53:26 +0000
@@ -41,7 +41,7 @@
41 monitor.beginTask(CoreTexts.AnnotateCommand_annotate, 1000);41 monitor.beginTask(CoreTexts.AnnotateCommand_annotate, 1000);
42 monitor.setTaskName(CoreTexts.AnnotateCommand_annotate);42 monitor.setTaskName(CoreTexts.AnnotateCommand_annotate);
43 IBazaarClient client = getClient(resource.getIResource().getProject());43 IBazaarClient client = getClient(resource.getIResource().getProject());
44 annotation = client.annotate(resource.getIResource().getLocation().toFile());44 annotation = client.annotate(resource.getIResource().getLocation().toFile(), getOptions());
45 monitor.worked(1000);45 monitor.worked(1000);
46 } catch (BazaarClientException e) {46 } catch (BazaarClientException e) {
47 throw BazaarException.wrapException(e, resource.getIResource());47 throw BazaarException.wrapException(e, resource.getIResource());
4848
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BazaarCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BazaarCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BazaarCommand.java 2014-06-11 09:53:26 +0000
@@ -1,5 +1,6 @@
1/*******************************************************************************1/*******************************************************************************
2 * Copyright (c) 2007-2013 Guillermo Gonzalez2 * Copyright (c) 2007-2013 Guillermo Gonzalez
3 * Copyright (C) 2014 Alexander Taler
3 *4 *
4 * All rights reserved. This program and the accompanying materials5 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.06 * are made available under the terms of the Eclipse Public License v1.0
@@ -11,6 +12,7 @@
1112
12import java.io.File;13import java.io.File;
13import java.util.ArrayList;14import java.util.ArrayList;
15import java.util.Arrays;
14import java.util.Collection;16import java.util.Collection;
15import java.util.HashMap;17import java.util.HashMap;
16import java.util.List;18import java.util.List;
@@ -19,9 +21,12 @@
19import org.eclipse.core.resources.IProject;21import org.eclipse.core.resources.IProject;
20import org.eclipse.core.runtime.IProgressMonitor;22import org.eclipse.core.runtime.IProgressMonitor;
21import org.vcs.bazaar.client.IBazaarClient;23import org.vcs.bazaar.client.IBazaarClient;
24import org.vcs.bazaar.client.commandline.commands.options.Option;
22import org.vcs.bazaar.eclipse.BzrWorkspaceRoot;25import org.vcs.bazaar.eclipse.BzrWorkspaceRoot;
26import org.vcs.bazaar.eclipse.IBazaarCoreConstants;
23import org.vcs.bazaar.eclipse.core.model.IBzrBranch;27import org.vcs.bazaar.eclipse.core.model.IBzrBranch;
24import org.vcs.bazaar.eclipse.core.model.local.IBzrLocalResource;28import org.vcs.bazaar.eclipse.core.model.local.IBzrLocalResource;
29import org.vcs.bazaar.eclipse.core.utils.PreferenceHelper;
25import org.vcs.bazaar.eclipse.internal.core.BazaarException;30import org.vcs.bazaar.eclipse.internal.core.BazaarException;
2631
27/**32/**
@@ -111,7 +116,39 @@
111 }116 }
112 return list;117 return list;
113 }118 }
114 119
120 private Option[] options = null;
121
122 /**
123 * The command-line options included in this command.
124 */
125 public Option[] getOptions() {
126 if (options == null) {
127 // Create options, adding common ones.
128 if (PreferenceHelper.getBoolean(IBazaarCoreConstants.IGNORE_SSL_ERRORS)) {
129 options = new Option[1];
130 options[0] = new Option("-Ossl.cert_reqs=none");
131 } else {
132 options = new Option[0];
133 }
134 }
135 return options;
136 }
137
138 /**
139 * Add more command-line options to this command.
140 */
141 public void addOptions(Option...moreO) {
142 // Ensure this.options is initialised
143 getOptions();
144
145 Option[] newO = Arrays.copyOf(options, options.length + moreO.length);
146 for (int i = 0; i < moreO.length; i++) {
147 newO[options.length + i] = moreO[i];
148 }
149 options = newO;
150 }
151
115 public abstract void run(IProgressMonitor monitor) throws BazaarException;152 public abstract void run(IProgressMonitor monitor) throws BazaarException;
116153
117}154}
118155
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BindCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BindCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BindCommand.java 2014-06-11 09:53:26 +0000
@@ -39,7 +39,7 @@
39 monitor.beginTask(CoreTexts.BindCommand_taskName, 1000);39 monitor.beginTask(CoreTexts.BindCommand_taskName, 1000);
40 IBazaarClient client = getClient(branch);40 IBazaarClient client = getClient(branch);
41 monitor.worked(500);41 monitor.worked(500);
42 client.bind(location);42 client.bind(location, getOptions());
43 return BzrWorkspaceRoot.findProjectsInBranch(branch);43 return BzrWorkspaceRoot.findProjectsInBranch(branch);
44 } catch (BazaarClientException e) {44 } catch (BazaarClientException e) {
45 throw BazaarException.wrapException(e);45 throw BazaarException.wrapException(e);
4646
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BranchCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BranchCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/BranchCommand.java 2014-06-11 09:53:26 +0000
@@ -14,6 +14,7 @@
14import org.eclipse.core.runtime.IProgressMonitor;14import org.eclipse.core.runtime.IProgressMonitor;
15import org.vcs.bazaar.client.BazaarRevision;15import org.vcs.bazaar.client.BazaarRevision;
16import org.vcs.bazaar.client.IBazaarClient;16import org.vcs.bazaar.client.IBazaarClient;
17import org.vcs.bazaar.client.commandline.commands.options.Option;
17import org.vcs.bazaar.client.core.BazaarClientException;18import org.vcs.bazaar.client.core.BazaarClientException;
18import org.vcs.bazaar.client.core.BazaarClientException.BazaarUncheckedException;19import org.vcs.bazaar.client.core.BazaarClientException.BazaarUncheckedException;
19import org.vcs.bazaar.client.core.BranchLocation;20import org.vcs.bazaar.client.core.BranchLocation;
@@ -25,15 +26,16 @@
25/**26/**
26 * @author Guillermo Gonzalez TODO: add revision support and write a testcase27 * @author Guillermo Gonzalez TODO: add revision support and write a testcase
27 */28 */
28public class BranchCommand implements IBazaarCommand {29public class BranchCommand extends BazaarCommand {
2930
30 private final IBzrBranch remoteLocation;31 private final IBzrBranch remoteLocation;
31 private BazaarRevision revision;32 private BazaarRevision revision;
32 private final File toLocation;33 private final File toLocation;
3334
34 public BranchCommand(final IBzrBranch sourceLocation, final File toLocation, String revision) {35 public BranchCommand(final IBzrBranch sourceLocation, final File toLocation, String revision, Option...options) {
35 this.remoteLocation = sourceLocation;36 this.remoteLocation = sourceLocation;
36 this.toLocation = toLocation;37 this.toLocation = toLocation;
38 addOptions(options);
37 if (revision != null && revision.trim().length() != 0) {39 if (revision != null && revision.trim().length() != 0) {
38 try {40 try {
39 this.setRevision(BazaarRevision.getRevision(BazaarRevision.Prefix.REVNO, revision));41 this.setRevision(BazaarRevision.getRevision(BazaarRevision.Prefix.REVNO, revision));
@@ -72,7 +74,7 @@
72 */74 */
73 protected void runOnClient(IBazaarClient client, CommandProgressListener cpl) 75 protected void runOnClient(IBazaarClient client, CommandProgressListener cpl)
74 throws BazaarClientException {76 throws BazaarClientException {
75 client.branch(getRemoteLocation(), getToLocation(), getRevision(), cpl);77 client.branch(getRemoteLocation(), getToLocation(), getRevision(), cpl, getOptions());
76 }78 }
7779
78 /**80 /**
7981
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CatCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CatCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CatCommand.java 2014-06-11 09:53:26 +0000
@@ -60,9 +60,9 @@
60 monitor.beginTask(CoreTexts.CatCommand_taskName, 1000);60 monitor.beginTask(CoreTexts.CatCommand_taskName, 1000);
61 IBazaarClient client = getClient(branch, true);61 IBazaarClient client = getClient(branch, true);
62 if (file != null) {62 if (file != null) {
63 content = client.cat(file, revision, charsetName);63 content = client.cat(file, revision, charsetName, getOptions());
64 } else {64 } else {
65 content = client.cat(location, revision, charsetName);65 content = client.cat(location, revision, charsetName, getOptions());
66 }66 }
67 } catch (BazaarClientException e) {67 } catch (BazaarClientException e) {
68 if (e.getMessage() != null && e.getMessage().contains("is not present in revision")) {68 if (e.getMessage() != null && e.getMessage().contains("is not present in revision")) {
6969
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CheckoutCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CheckoutCommand.java 2013-10-31 17:23:10 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CheckoutCommand.java 2014-06-11 09:53:26 +0000
@@ -22,11 +22,8 @@
22 */22 */
23public class CheckoutCommand extends BranchCommand {23public class CheckoutCommand extends BranchCommand {
2424
25 private final Option[] options;
26
27 public CheckoutCommand(final IBzrBranch sourceLocation, final File toLocation, Option...options) {25 public CheckoutCommand(final IBzrBranch sourceLocation, final File toLocation, Option...options) {
28 super(sourceLocation, toLocation, null);26 super(sourceLocation, toLocation, null, options);
29 this.options = options;
30 }27 }
3128
32 /**29 /**
@@ -35,7 +32,7 @@
35 @Override32 @Override
36 protected void runOnClient(IBazaarClient client, CommandProgressListener cpl) 33 protected void runOnClient(IBazaarClient client, CommandProgressListener cpl)
37 throws BazaarClientException {34 throws BazaarClientException {
38 client.checkout(getRemoteLocation(), getToLocation(), cpl, options);35 client.checkout(getRemoteLocation(), getToLocation(), cpl, getOptions());
39 }36 }
4037
41}38}
4239
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CommitCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CommitCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CommitCommand.java 2014-06-11 09:53:26 +0000
@@ -35,7 +35,6 @@
3535
36 private String commitMessage;36 private String commitMessage;
37 private List<IBzrLocalResource> resources;37 private List<IBzrLocalResource> resources;
38 final private List<Option> options;
39 private boolean fullCommit;38 private boolean fullCommit;
40 private boolean fullRefresh;39 private boolean fullRefresh;
4140
@@ -46,10 +45,10 @@
46 * @param commitMessage45 * @param commitMessage
47 * @param localCommit46 * @param localCommit
48 */47 */
49 public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage, List<Option> options) {48 public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage, Option... options) {
50 this.resources = filesToCommit;49 this.resources = filesToCommit;
51 this.commitMessage = commitMessage;50 this.commitMessage = commitMessage;
52 this.options = options;51 addOptions(options);
53 }52 }
5453
55 /**54 /**
@@ -59,8 +58,8 @@
59 * @param options58 * @param options
60 * @param fullCommit if tru, the filesToCommit 'll be ignored and a full commit 'll be executed (commit with 0 arguments)59 * @param fullCommit if tru, the filesToCommit 'll be ignored and a full commit 'll be executed (commit with 0 arguments)
61 */60 */
62 public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage, List<Option> options, 61 public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage,
63 boolean fullCommit, boolean fullRefresh) {62 boolean fullCommit, boolean fullRefresh, Option... options) {
64 this(filesToCommit, commitMessage, options);63 this(filesToCommit, commitMessage, options);
65 this.fullCommit = fullCommit;64 this.fullCommit = fullCommit;
66 this.fullRefresh = fullRefresh;65 this.fullRefresh = fullRefresh;
@@ -81,9 +80,9 @@
81 for (IBzrBranch branch : map.keySet()) {80 for (IBzrBranch branch : map.keySet()) {
82 IBazaarClient client = BzrWorkspaceRoot.getClient(branch);81 IBazaarClient client = BzrWorkspaceRoot.getClient(branch);
83 if(fullCommit) {82 if(fullCommit) {
84 client.commit(new File[]{branch.getFile()}, commitMessage, options.toArray(new Option[options.size()]));83 client.commit(new File[]{branch.getFile()}, commitMessage, getOptions());
85 } else {84 } else {
86 client.commit(map.get(branch).toArray(new File[0]), commitMessage, options.toArray(new Option[options.size()]));85 client.commit(map.get(branch).toArray(new File[0]), commitMessage, getOptions());
87 }86 }
88 }87 }
89 if (fullCommit || fullRefresh) {88 if (fullCommit || fullRefresh) {
9089
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ConflictsCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ConflictsCommand.java 2013-04-14 21:56:10 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ConflictsCommand.java 2014-06-11 09:53:26 +0000
@@ -33,7 +33,7 @@
33 try {33 try {
34 monitor.beginTask("Getting conflicts", 1000);34 monitor.beginTask("Getting conflicts", 1000);
35 IBazaarClient client = getClient(branch, true);35 IBazaarClient client = getClient(branch, true);
36 conflicts = client.conflicts();36 conflicts = client.conflicts(getOptions());
37 monitor.worked(1000);37 monitor.worked(1000);
38 } catch (BazaarClientException e) {38 } catch (BazaarClientException e) {
39 throw BazaarException.wrapException(e);39 throw BazaarException.wrapException(e);
4040
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CreatePatchCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CreatePatchCommand.java 2013-04-15 10:16:38 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/CreatePatchCommand.java 2014-06-11 09:53:26 +0000
@@ -41,7 +41,7 @@
41 try {41 try {
42 List<File> files = getFiles(resources);42 List<File> files = getFiles(resources);
43 IBazaarClient client = getClient(resources.get(0).getIResource().getProject());43 IBazaarClient client = getClient(resources.get(0).getIResource().getProject());
44 patchContent = client.diff(files.toArray(new File[0]), revision);44 patchContent = client.diff(files.toArray(new File[0]), revision, getOptions());
45 monitor.worked(100);45 monitor.worked(100);
46 } catch (BazaarClientException e) {46 } catch (BazaarClientException e) {
47 throw BazaarException.wrapException(e);47 throw BazaarException.wrapException(e);
4848
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InfoCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InfoCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InfoCommand.java 2014-06-11 09:53:26 +0000
@@ -44,9 +44,8 @@
44 IBazaarClient client = getClient(branch, true);44 IBazaarClient client = getClient(branch, true);
45 // to improve performance when only the default info is required45 // to improve performance when only the default info is required
46 if(verbose)46 if(verbose)
47 info = client.info(branch.getFile(), IInfoOptions.VERBOSE);47 addOptions(IInfoOptions.VERBOSE);
48 else48 info = client.info(branch.getFile(), getOptions());
49 info = client.info(branch.getFile());
50 } catch (BazaarClientException e) {49 } catch (BazaarClientException e) {
51 throw BazaarException.wrapException(e);50 throw BazaarException.wrapException(e);
52 } finally {51 } finally {
5352
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InitCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InitCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/InitCommand.java 2014-06-11 09:53:26 +0000
@@ -25,7 +25,7 @@
25 * @author Guillermo Gonzalez25 * @author Guillermo Gonzalez
26 *26 *
27 */27 */
28public class InitCommand implements IBazaarCommand {28public class InitCommand extends BazaarCommand {
2929
30 private final IProject project;30 private final IProject project;
31 private final IPath branchPath;31 private final IPath branchPath;
@@ -45,7 +45,7 @@
45 IBazaarClient client = EclipseBazaarCore.getDefault().createClient();45 IBazaarClient client = EclipseBazaarCore.getDefault().createClient();
46 client.setWorkDir(branchPath.toFile().getParentFile());46 client.setWorkDir(branchPath.toFile().getParentFile());
47 if (project != null && !new File(branchPath.toFile(), IBzrBranch.DIR_META_FOLDER).exists())47 if (project != null && !new File(branchPath.toFile(), IBzrBranch.DIR_META_FOLDER).exists())
48 client.init(branchPath.toFile());48 client.init(branchPath.toFile(), getOptions());
49 } catch (BazaarClientException e) {49 } catch (BazaarClientException e) {
50 EclipseBazaarCore.log(e.getMessage(), IStatus.ERROR);50 EclipseBazaarCore.log(e.getMessage(), IStatus.ERROR);
51 throw BazaarException.wrapException(e, project);51 throw BazaarException.wrapException(e, project);
5252
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LogCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LogCommand.java 2013-11-05 13:35:33 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LogCommand.java 2014-06-11 09:53:26 +0000
@@ -9,7 +9,6 @@
9 *******************************************************************************/9 *******************************************************************************/
10package org.vcs.bazaar.eclipse.core.commands;10package org.vcs.bazaar.eclipse.core.commands;
1111
12import java.util.ArrayList;
13import java.util.Collections;12import java.util.Collections;
14import java.util.List;13import java.util.List;
1514
@@ -17,7 +16,6 @@
17import org.vcs.bazaar.client.IBazaarClient;16import org.vcs.bazaar.client.IBazaarClient;
18import org.vcs.bazaar.client.IBazaarLogMessage;17import org.vcs.bazaar.client.IBazaarLogMessage;
19import org.vcs.bazaar.client.IBazaarRevisionSpec;18import org.vcs.bazaar.client.IBazaarRevisionSpec;
20import org.vcs.bazaar.client.commandline.commands.options.Option;
21import org.vcs.bazaar.client.commandline.syntax.ILogOptions;19import org.vcs.bazaar.client.commandline.syntax.ILogOptions;
22import org.vcs.bazaar.client.core.BazaarClientException;20import org.vcs.bazaar.client.core.BazaarClientException;
23import org.vcs.bazaar.eclipse.CoreTexts;21import org.vcs.bazaar.eclipse.CoreTexts;
@@ -78,23 +76,23 @@
78 monitor.beginTask(CoreTexts.LogCommand_log, 1000);76 monitor.beginTask(CoreTexts.LogCommand_log, 1000);
79 monitor.setTaskName(CoreTexts.LogCommand_log);77 monitor.setTaskName(CoreTexts.LogCommand_log);
80 IBazaarClient client = getClient(resource.getBranch(), false);78 IBazaarClient client = getClient(resource.getBranch(), false);
81 List<Option> options = new ArrayList<Option>();79
82 if (limit != null) {80 if (limit != null) {
83 options.add(ILogOptions.LIMIT.setArgument(limit.toString()));81 addOptions(ILogOptions.LIMIT.setArgument(limit.toString()));
84 } 82 }
85 if (revision != null) {83 if (revision != null) {
86 options.add(ILogOptions.REVISION.setArgument(revision.toString()));84 addOptions(ILogOptions.REVISION.setArgument(revision.toString()));
87 }85 }
88 if (verbose) {86 if (verbose) {
89 options.add(ILogOptions.VERBOSE);87 addOptions(ILogOptions.VERBOSE);
90 }88 }
91 if(resource instanceof IBzrBranch) {89 if(resource instanceof IBzrBranch) {
92 logMessages = client.log(((IBzrBranch)resource).getBranchLocation(), options.toArray(new Option[0]));90 logMessages = client.log(((IBzrBranch)resource).getBranchLocation(), getOptions());
93 } else if (resource instanceof IBzrLocalResource) {91 } else if (resource instanceof IBzrLocalResource) {
94 IBzrLocalResource localResource = ((IBzrLocalResource)resource);92 IBzrLocalResource localResource = ((IBzrLocalResource)resource);
95 logMessages = client.log(localResource.getFile(), options.toArray(new Option[0]));93 logMessages = client.log(localResource.getFile(), getOptions());
96 } else {94 } else {
97 logMessages = client.log(resource.getLocation(), options.toArray(new Option[0]));95 logMessages = client.log(resource.getLocation(), getOptions());
98 }96 }
99 } catch (BazaarClientException e) {97 } catch (BazaarClientException e) {
100 throw BazaarException.wrapException(e);98 throw BazaarException.wrapException(e);
10199
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LsCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LsCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/LsCommand.java 2014-06-11 09:53:26 +0000
@@ -38,9 +38,9 @@
38 monitor.beginTask("executing ls", 1000);38 monitor.beginTask("executing ls", 1000);
39 IBazaarClient client = getClient(resource.getProject(), true);39 IBazaarClient client = getClient(resource.getProject(), true);
40 if(ignored)40 if(ignored)
41 paths = client.ls(resource.getLocation().toFile(), null, ILsOptions.IGNORED, ILsOptions.VERSIONED);41 addOptions(ILsOptions.IGNORED);
42 else42 addOptions(ILsOptions.VERSIONED);
43 paths = client.ls(resource.getLocation().toFile(), null, ILsOptions.VERSIONED);43 paths = client.ls(resource.getLocation().toFile(), null, getOptions());
44 } catch (BazaarClientException e) {44 } catch (BazaarClientException e) {
45 throw BazaarException.wrapException(e, resource);45 throw BazaarException.wrapException(e, resource);
46 } finally {46 } finally {
4747
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/MergeCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/MergeCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/MergeCommand.java 2014-06-11 09:53:26 +0000
@@ -30,13 +30,12 @@
3030
31 private final IBzrBranch branch;31 private final IBzrBranch branch;
32 private final BranchLocation location;32 private final BranchLocation location;
33 private Option[] options;
34 33
35 public MergeCommand(IBzrBranch branch, BranchLocation location, Option...options) {34 public MergeCommand(IBzrBranch branch, BranchLocation location, Option...options) {
36 super();35 super();
37 this.branch = branch;36 this.branch = branch;
38 this.location = location;37 this.location = location;
39 this.options = options;38 addOptions(options);
40 }39 }
4140
42 @Override41 @Override
@@ -46,7 +45,7 @@
46 monitor.setTaskName(CoreTexts.MergeCommand_taskName);45 monitor.setTaskName(CoreTexts.MergeCommand_taskName);
47 IBazaarClient client = getClient(branch);46 IBazaarClient client = getClient(branch);
48 monitor.worked(10);47 monitor.worked(10);
49 client.merge(location, options);48 client.merge(location, getOptions());
50 } catch (BazaarClientException e) {49 } catch (BazaarClientException e) {
51 if (!setPostCommandErrorOnConflicts(e.getMessage())) {50 if (!setPostCommandErrorOnConflicts(e.getMessage())) {
52 throw BazaarException.wrapException(e);51 throw BazaarException.wrapException(e);
@@ -59,7 +58,7 @@
5958
60 @Override59 @Override
61 protected int getChangeType() {60 protected int getChangeType() {
62 for (Option option : options) {61 for (Option option : getOptions()) {
63 if(option.equals(IMergeOptions.PULL)) {62 if(option.equals(IMergeOptions.PULL)) {
64 return BzrChangeStateEvent.BRANCH_STATE_MODIFY;63 return BzrChangeStateEvent.BRANCH_STATE_MODIFY;
65 }64 }
6665
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PullCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PullCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PullCommand.java 2014-06-11 09:53:26 +0000
@@ -9,13 +9,9 @@
9 *******************************************************************************/9 *******************************************************************************/
10package org.vcs.bazaar.eclipse.core.commands;10package org.vcs.bazaar.eclipse.core.commands;
1111
12import java.util.ArrayList;
13import java.util.List;
14
15import org.eclipse.core.resources.IResource;12import org.eclipse.core.resources.IResource;
16import org.eclipse.core.runtime.IProgressMonitor;13import org.eclipse.core.runtime.IProgressMonitor;
17import org.vcs.bazaar.client.IBazaarClient;14import org.vcs.bazaar.client.IBazaarClient;
18import org.vcs.bazaar.client.commandline.commands.options.Option;
19import org.vcs.bazaar.client.commandline.syntax.IPullOptions;15import org.vcs.bazaar.client.commandline.syntax.IPullOptions;
20import org.vcs.bazaar.client.core.BazaarClientException;16import org.vcs.bazaar.client.core.BazaarClientException;
21import org.vcs.bazaar.client.core.BranchLocation;17import org.vcs.bazaar.client.core.BranchLocation;
@@ -45,14 +41,13 @@
45 try {41 try {
46 monitor.beginTask(CoreTexts.PullCommand_taskName, 100);42 monitor.beginTask(CoreTexts.PullCommand_taskName, 100);
47 IBazaarClient client = getClient(branch);43 IBazaarClient client = getClient(branch);
48 List<Option> options = new ArrayList<Option>(0);
49 if (remember) {44 if (remember) {
50 options.add(IPullOptions.REMEMBER);45 addOptions(IPullOptions.REMEMBER);
51 }46 }
52 if (overwrite) {47 if (overwrite) {
53 options.add(IPullOptions.OVERWRITE);48 addOptions(IPullOptions.OVERWRITE);
54 }49 }
55 String err = client.pull(location, new CommandProgressListener(monitor), options.toArray(new Option[options.size()]));50 String err = client.pull(location, new CommandProgressListener(monitor), getOptions());
56 setPostCommandErrorOnConflicts(err);51 setPostCommandErrorOnConflicts(err);
57 return BzrWorkspaceRoot.findProjectsInBranch(branch);52 return BzrWorkspaceRoot.findProjectsInBranch(branch);
58 } catch (BazaarClientException e) {53 } catch (BazaarClientException e) {
5954
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PushCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PushCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/PushCommand.java 2014-06-11 09:53:26 +0000
@@ -9,12 +9,8 @@
9 *******************************************************************************/9 *******************************************************************************/
10package org.vcs.bazaar.eclipse.core.commands;10package org.vcs.bazaar.eclipse.core.commands;
1111
12import java.util.ArrayList;
13import java.util.List;
14
15import org.eclipse.core.runtime.IProgressMonitor;12import org.eclipse.core.runtime.IProgressMonitor;
16import org.vcs.bazaar.client.IBazaarClient;13import org.vcs.bazaar.client.IBazaarClient;
17import org.vcs.bazaar.client.commandline.commands.options.Option;
18import org.vcs.bazaar.client.commandline.syntax.IPushOptions;14import org.vcs.bazaar.client.commandline.syntax.IPushOptions;
19import org.vcs.bazaar.client.core.BazaarClientException;15import org.vcs.bazaar.client.core.BazaarClientException;
20import org.vcs.bazaar.client.core.BranchLocation;16import org.vcs.bazaar.client.core.BranchLocation;
@@ -42,17 +38,16 @@
42 public void run(IProgressMonitor monitor) throws BazaarException {38 public void run(IProgressMonitor monitor) throws BazaarException {
43 try {39 try {
44 IBazaarClient client = getClient(branch);40 IBazaarClient client = getClient(branch);
45 List<Option> options = new ArrayList<Option>(0);
46 if(remember) {41 if(remember) {
47 options.add(IPushOptions.REMEMBER);42 addOptions(IPushOptions.REMEMBER);
48 } 43 }
49 if(useExsitingDir) {44 if(useExsitingDir) {
50 options.add(IPushOptions.USE_EXISTING_DIR);45 addOptions(IPushOptions.USE_EXISTING_DIR);
51 }46 }
52 if (overwrite) {47 if (overwrite) {
53 options.add(IPushOptions.OVERWRITE);48 addOptions(IPushOptions.OVERWRITE);
54 }49 }
55 client.push(location, options.toArray(new Option[options.size()]));50 client.push(location, getOptions());
56 } catch (BazaarClientException e) {51 } catch (BazaarClientException e) {
57 throw BazaarException.wrapException(e);52 throw BazaarException.wrapException(e);
58 } finally {53 } finally {
5954
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseAbortCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseAbortCommand.java 2013-06-08 06:24:53 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseAbortCommand.java 2014-06-11 09:53:26 +0000
@@ -22,7 +22,7 @@
2222
23 @Override23 @Override
24 protected void executeInternally(IBazaarClient client) throws BazaarClientException {24 protected void executeInternally(IBazaarClient client) throws BazaarClientException {
25 client.rebaseAbort();25 client.rebaseAbort(getOptions());
26 }26 }
2727
28}28}
2929
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseCommand.java 2013-09-18 09:51:10 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseCommand.java 2014-06-11 09:53:26 +0000
@@ -29,7 +29,6 @@
2929
30 private final IBzrBranch branch;30 private final IBzrBranch branch;
31 private final BranchLocation location;31 private final BranchLocation location;
32 private final Option[] options;
33 private BazaarException rebaseConflictsException;32 private BazaarException rebaseConflictsException;
34 private static final Pattern CONFLICT_PATTERN = Pattern.compile("conflict occurred");33 private static final Pattern CONFLICT_PATTERN = Pattern.compile("conflict occurred");
35 34
@@ -40,7 +39,7 @@
40 public RebaseCommand(IBzrBranch branch, BranchLocation location, Option...options) {39 public RebaseCommand(IBzrBranch branch, BranchLocation location, Option...options) {
41 this.branch = branch;40 this.branch = branch;
42 this.location = location;41 this.location = location;
43 this.options = options;42 addOptions(options);
44 }43 }
4544
46 @Override45 @Override
@@ -63,7 +62,7 @@
63 }62 }
6463
65 protected void executeInternally(IBazaarClient client) throws BazaarClientException {64 protected void executeInternally(IBazaarClient client) throws BazaarClientException {
66 client.rebase(location, options);65 client.rebase(location, getOptions());
67 }66 }
6867
69 @Override68 @Override
7069
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseContinueCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseContinueCommand.java 2013-06-08 06:24:53 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseContinueCommand.java 2014-06-11 09:53:26 +0000
@@ -22,6 +22,6 @@
2222
23 @Override23 @Override
24 protected void executeInternally(IBazaarClient client) throws BazaarClientException {24 protected void executeInternally(IBazaarClient client) throws BazaarClientException {
25 client.rebaseContinue();25 client.rebaseContinue(getOptions());
26 }26 }
27}27}
2828
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseToDoCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseToDoCommand.java 2013-05-17 18:36:24 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RebaseToDoCommand.java 2014-06-11 09:53:26 +0000
@@ -29,7 +29,7 @@
29 public void run(IProgressMonitor monitor) throws BazaarException {29 public void run(IProgressMonitor monitor) throws BazaarException {
30 IBazaarClient client = getClient(branch, true);30 IBazaarClient client = getClient(branch, true);
31 try {31 try {
32 rebaseInterrupted = client.rebaseToDo();32 rebaseInterrupted = client.rebaseToDo(getOptions());
33 } catch (BazaarClientException e) {33 } catch (BazaarClientException e) {
34 throw BazaarException.wrapException(e);34 throw BazaarException.wrapException(e);
35 }35 }
3636
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ReconfigureCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ReconfigureCommand.java 2014-04-09 18:54:55 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ReconfigureCommand.java 2014-06-11 09:53:26 +0000
@@ -71,7 +71,7 @@
71 BranchLocation remoteLocation = getBranchLocation();71 BranchLocation remoteLocation = getBranchLocation();
72 if (remoteLocation != null) {72 if (remoteLocation != null) {
73 // 1. run regular checkout73 // 1. run regular checkout
74 client.checkout(remoteLocation, tempFolder, new CommandProgressListener(monitor));74 client.checkout(remoteLocation, tempFolder, new CommandProgressListener(monitor), getOptions());
75 // 2. copy repository folder75 // 2. copy repository folder
76 moveFolder(tempFolder, IBzrBranch.REPOSITORY_FOLDER);76 moveFolder(tempFolder, IBzrBranch.REPOSITORY_FOLDER);
77 // 3. copy branch folder77 // 3. copy branch folder
7878
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RemoveCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RemoveCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RemoveCommand.java 2014-06-11 09:53:26 +0000
@@ -43,7 +43,8 @@
43 monitor.setTaskName(CoreTexts.RemoveCommand_removing);43 monitor.setTaskName(CoreTexts.RemoveCommand_removing);
44 for (IBzrBranch branch : map.keySet()) {44 for (IBzrBranch branch : map.keySet()) {
45 IBazaarClient client = getClient(branch);45 IBazaarClient client = getClient(branch);
46 client.remove(map.get(branch).toArray(new File[0]), IRemoveOptions.KEEP);46 addOptions(IRemoveOptions.KEEP);
47 client.remove(map.get(branch).toArray(new File[0]), getOptions());
47 }48 }
48 return getIResources(resources);49 return getIResources(resources);
49 } catch (BazaarClientException e) {50 } catch (BazaarClientException e) {
5051
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ResolveCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ResolveCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ResolveCommand.java 2014-06-11 09:53:26 +0000
@@ -32,7 +32,6 @@
32public class ResolveCommand extends ResourceChangeCommand {32public class ResolveCommand extends ResourceChangeCommand {
3333
34 private final IBzrLocalResource[] resources;34 private final IBzrLocalResource[] resources;
35 private final Option[] options;
3635
37 /**36 /**
38 * This constructor should to be used only on non-project resources (only files and folders)37 * This constructor should to be used only on non-project resources (only files and folders)
@@ -48,7 +47,7 @@
48 */47 */
49 public ResolveCommand(IBzrLocalResource[] bzrResources, Option...options) {48 public ResolveCommand(IBzrLocalResource[] bzrResources, Option...options) {
50 this.resources = bzrResources;49 this.resources = bzrResources;
51 this.options = options;50 addOptions(options);
52 }51 }
5352
54 public ResolveCommand(Collection<IResource> resources, Option...options) {53 public ResolveCommand(Collection<IResource> resources, Option...options) {
@@ -81,7 +80,7 @@
81 monitor.beginTask("Resolving", map.keySet().size());80 monitor.beginTask("Resolving", map.keySet().size());
82 for (IBzrBranch branch : map.keySet()) {81 for (IBzrBranch branch : map.keySet()) {
83 IBazaarClient client = getClient(branch);82 IBazaarClient client = getClient(branch);
84 client.resolve(map.get(branch), options);83 client.resolve(map.get(branch), getOptions());
85 monitor.worked(1);84 monitor.worked(1);
86 }85 }
87 List<IResource> changed = new ArrayList<IResource>(resources.length);86 List<IResource> changed = new ArrayList<IResource>(resources.length);
8887
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RevertCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RevertCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/RevertCommand.java 2014-06-11 09:53:26 +0000
@@ -32,7 +32,6 @@
32 */32 */
33public class RevertCommand extends ResourceChangeCommand {33public class RevertCommand extends ResourceChangeCommand {
34 private List<IBzrLocalResource> resources;34 private List<IBzrLocalResource> resources;
35 private Option[] options;
36 private boolean revertBranch;35 private boolean revertBranch;
3736
38 /**37 /**
@@ -44,7 +43,7 @@
44 public RevertCommand(List<IBzrLocalResource> resourcesToRevert, boolean revertBranch, Option[] options) {43 public RevertCommand(List<IBzrLocalResource> resourcesToRevert, boolean revertBranch, Option[] options) {
45 super();44 super();
46 this.resources = resourcesToRevert;45 this.resources = resourcesToRevert;
47 this.options = options;46 addOptions(options);
48 this.revertBranch = revertBranch;47 this.revertBranch = revertBranch;
49 }48 }
5049
@@ -63,9 +62,9 @@
63 for (IBzrBranch branch : map.keySet()) {62 for (IBzrBranch branch : map.keySet()) {
64 IBazaarClient client = BzrWorkspaceRoot.getClient(branch);63 IBazaarClient client = BzrWorkspaceRoot.getClient(branch);
65 if(revertBranch) {64 if(revertBranch) {
66 client.revert(new File[]{branch.getFile()}, options);65 client.revert(new File[]{branch.getFile()}, getOptions());
67 } else {66 } else {
68 client.revert(map.get(branch).toArray(new File[0]), options);67 client.revert(map.get(branch).toArray(new File[0]), getOptions());
69 }68 }
70 resourcesToRefresh.addAll(Arrays.asList(BzrWorkspaceRoot.findProjectsInBranch(branch)));69 resourcesToRefresh.addAll(Arrays.asList(BzrWorkspaceRoot.findProjectsInBranch(branch)));
71 }70 }
7271
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SendCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SendCommand.java 2013-10-31 17:23:10 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SendCommand.java 2014-06-11 09:53:26 +0000
@@ -28,13 +28,12 @@
2828
29 private final IBzrLocalResource resource;29 private final IBzrLocalResource resource;
30 private IBazaarAnnotation annotation;30 private IBazaarAnnotation annotation;
31 private Option[] options;
32 private BranchLocation branchLocation;31 private BranchLocation branchLocation;
3332
3433
35 public SendCommand(IBzrLocalResource bzrResource, Option[] options, BranchLocation branchLocation) {34 public SendCommand(IBzrLocalResource bzrResource, Option[] options, BranchLocation branchLocation) {
36 this.resource = bzrResource;35 this.resource = bzrResource;
37 this.options = options;36 addOptions(options);
38 this.branchLocation = branchLocation;37 this.branchLocation = branchLocation;
39 }38 }
4039
@@ -48,7 +47,7 @@
48 monitor.beginTask(CoreTexts.SendCommand_send, 1000);47 monitor.beginTask(CoreTexts.SendCommand_send, 1000);
49 IBazaarClient client = getClient(resource.getBranch());48 IBazaarClient client = getClient(resource.getBranch());
5049
51 client.send(branchLocation, options);50 client.send(branchLocation, getOptions());
5251
53 } catch (BazaarClientException e) {52 } catch (BazaarClientException e) {
54 throw BazaarException.wrapException(e, resource.getIResource());53 throw BazaarException.wrapException(e, resource.getIResource());
5554
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveCommand.java 2013-09-14 22:05:16 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveCommand.java 2014-06-11 09:53:26 +0000
@@ -30,13 +30,12 @@
30public class ShelveCommand extends ResourceChangeCommand {30public class ShelveCommand extends ResourceChangeCommand {
3131
32 private List<IBzrLocalResource> resources;32 private List<IBzrLocalResource> resources;
33 private Option[] options;
34 private boolean shelveBranch;33 private boolean shelveBranch;
3534
36 public ShelveCommand(List<IBzrLocalResource> resourcesToShelve, boolean shelveBranch, Option[] options) {35 public ShelveCommand(List<IBzrLocalResource> resourcesToShelve, boolean shelveBranch, Option[] options) {
37 this.resources = resourcesToShelve;36 this.resources = resourcesToShelve;
38 this.shelveBranch = shelveBranch;37 this.shelveBranch = shelveBranch;
39 this.options = options;38 addOptions(options);
40 }39 }
4140
42 @Override41 @Override
@@ -48,9 +47,9 @@
48 for (IBzrBranch branch : map.keySet()) {47 for (IBzrBranch branch : map.keySet()) {
49 IBazaarClient client = BzrWorkspaceRoot.getClient(branch);48 IBazaarClient client = BzrWorkspaceRoot.getClient(branch);
50 if (shelveBranch) {49 if (shelveBranch) {
51 client.shelve(new File[0], options);50 client.shelve(new File[0], getOptions());
52 } else {51 } else {
53 client.shelve(map.get(branch).toArray(new File[0]), options);52 client.shelve(map.get(branch).toArray(new File[0]), getOptions());
54 }53 }
55 resourcesToRefresh.addAll(Arrays.asList(BzrWorkspaceRoot.findProjectsInBranch(branch)));54 resourcesToRefresh.addAll(Arrays.asList(BzrWorkspaceRoot.findProjectsInBranch(branch)));
56 }55 }
5756
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveListCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveListCommand.java 2013-04-14 21:56:10 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/ShelveListCommand.java 2014-06-11 09:53:26 +0000
@@ -34,7 +34,7 @@
34 try {34 try {
35 monitor.beginTask(CoreTexts.ShelveListCommand_taskName, 100);35 monitor.beginTask(CoreTexts.ShelveListCommand_taskName, 100);
36 IBazaarClient client = getClient(branch, true);36 IBazaarClient client = getClient(branch, true);
37 shelves = client.shelveList();37 shelves = client.shelveList(getOptions());
38 monitor.worked(100);38 monitor.worked(100);
39 } catch (BazaarClientException e) {39 } catch (BazaarClientException e) {
40 throw BazaarException.wrapException(e);40 throw BazaarException.wrapException(e);
4141
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusCommand.java 2014-06-11 09:53:26 +0000
@@ -33,7 +33,6 @@
33import org.vcs.bazaar.client.IBazaarRevisionSpec;33import org.vcs.bazaar.client.IBazaarRevisionSpec;
34import org.vcs.bazaar.client.IBazaarStatus;34import org.vcs.bazaar.client.IBazaarStatus;
35import org.vcs.bazaar.client.commandline.commands.options.KeywordOption;35import org.vcs.bazaar.client.commandline.commands.options.KeywordOption;
36import org.vcs.bazaar.client.commandline.commands.options.Option;
37import org.vcs.bazaar.client.commandline.syntax.IStatusOptions;36import org.vcs.bazaar.client.commandline.syntax.IStatusOptions;
38import org.vcs.bazaar.client.core.BazaarClientException;37import org.vcs.bazaar.client.core.BazaarClientException;
39import org.vcs.bazaar.eclipse.BzrWorkspaceRoot;38import org.vcs.bazaar.eclipse.BzrWorkspaceRoot;
@@ -59,7 +58,6 @@
59 /* if set folders with status 'unknown' will be scanned and all sub-folders/files will be added to status map with status 'unknown' */58 /* if set folders with status 'unknown' will be scanned and all sub-folders/files will be added to status map with status 'unknown' */
60 private boolean addNestedUnknown = true;59 private boolean addNestedUnknown = true;
61 private List<IBazaarLogMessage> pendingMerges;60 private List<IBazaarLogMessage> pendingMerges;
62 private Option[] options = new Option[0];
6361
64 /**62 /**
65 * Invoked by StatusCommand63 * Invoked by StatusCommand
@@ -84,7 +82,7 @@
8482
85 public StatusCommand(IBzrLocalResource[] resources, IBazaarRevisionSpec revision) {83 public StatusCommand(IBzrLocalResource[] resources, IBazaarRevisionSpec revision) {
86 this(resources, true);84 this(resources, true);
87 options = new KeywordOption[]{new KeywordOption(IStatusOptions.REVISION.getOption(), revision.toString())};85 addOptions(new KeywordOption(IStatusOptions.REVISION.getOption(), revision.toString()));
88 }86 }
8987
90 /*88 /*
@@ -135,7 +133,7 @@
135 */133 */
136 private void executeAndFilterLogOutput(final IBzrBranch branch, File[] files) throws BazaarClientException, CoreException {134 private void executeAndFilterLogOutput(final IBzrBranch branch, File[] files) throws BazaarClientException, CoreException {
137 IBazaarClient client = getClient(branch, noLog);135 IBazaarClient client = getClient(branch, noLog);
138 BazaarTreeStatus treeStatus = client.status(files, options);136 BazaarTreeStatus treeStatus = client.status(files, getOptions());
139 pendingMerges = treeStatus.getPendingMerges();137 pendingMerges = treeStatus.getPendingMerges();
140 IBazaarStatus[] statuses = treeStatus.getStatusAsArray();138 IBazaarStatus[] statuses = treeStatus.getStatusAsArray();
141 Set<IContainer> unknown = new HashSet<IContainer>();139 Set<IContainer> unknown = new HashSet<IContainer>();
142140
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusUpdaterCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusUpdaterCommand.java 2013-09-12 10:03:07 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/StatusUpdaterCommand.java 2014-06-11 09:53:26 +0000
@@ -8,10 +8,8 @@
8package org.vcs.bazaar.eclipse.core.commands;8package org.vcs.bazaar.eclipse.core.commands;
99
10import java.io.File;10import java.io.File;
11import java.util.ArrayList;
12import java.util.HashMap;11import java.util.HashMap;
13import java.util.HashSet;12import java.util.HashSet;
14import java.util.List;
15import java.util.Map;13import java.util.Map;
16import java.util.Set;14import java.util.Set;
1715
@@ -28,7 +26,6 @@
28import org.vcs.bazaar.client.IBazaarItemInfo;26import org.vcs.bazaar.client.IBazaarItemInfo;
29import org.vcs.bazaar.client.IBazaarLogMessage;27import org.vcs.bazaar.client.IBazaarLogMessage;
30import org.vcs.bazaar.client.IBazaarStatus;28import org.vcs.bazaar.client.IBazaarStatus;
31import org.vcs.bazaar.client.commandline.commands.options.Option;
32import org.vcs.bazaar.client.commandline.syntax.ILsOptions;29import org.vcs.bazaar.client.commandline.syntax.ILsOptions;
33import org.vcs.bazaar.client.core.BazaarClientException;30import org.vcs.bazaar.client.core.BazaarClientException;
34import org.vcs.bazaar.eclipse.core.model.BzrStatus;31import org.vcs.bazaar.eclipse.core.model.BzrStatus;
@@ -88,17 +85,14 @@
88 File file = resourceToRefresh.getLocation().toFile();85 File file = resourceToRefresh.getLocation().toFile();
89 /* get all versioned and ignored resources with ls command excluding derived resources */86 /* get all versioned and ignored resources with ls command excluding derived resources */
90 IBazaarItemInfo[] paths;87 IBazaarItemInfo[] paths;
91 List<Option> options = new ArrayList<Option>();88 addOptions(ILsOptions.IGNORED, ILsOptions.VERSIONED, ILsOptions.UNKNOWN);
92 options.add(ILsOptions.IGNORED);
93 options.add(ILsOptions.VERSIONED);
94 options.add(ILsOptions.UNKNOWN);
95 if (shallow) {89 if (shallow) {
96 options.add(ILsOptions.NON_RECURSIVE);90 addOptions(ILsOptions.NON_RECURSIVE);
97 }91 }
98 if (verbose) {92 if (verbose) {
99 options.add(ILsOptions.VERBOSE);93 addOptions(ILsOptions.VERBOSE);
100 }94 }
101 paths = client.ls(file, null, options.toArray(new Option[0]));95 paths = client.ls(file, null, getOptions());
102 /* execute st command and turn its result into a status map */96 /* execute st command and turn its result into a status map */
103 BazaarTreeStatus treeStatus = client.status(new File[]{file});97 BazaarTreeStatus treeStatus = client.status(new File[]{file});
104 IBazaarStatus[] statuses = treeStatus.getStatusAsArray();98 IBazaarStatus[] statuses = treeStatus.getStatusAsArray();
10599
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SwitchCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SwitchCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/SwitchCommand.java 2014-06-11 09:53:26 +0000
@@ -9,13 +9,9 @@
9 *******************************************************************************/9 *******************************************************************************/
10package org.vcs.bazaar.eclipse.core.commands;10package org.vcs.bazaar.eclipse.core.commands;
1111
12import java.util.ArrayList;
13import java.util.List;
14
15import org.eclipse.core.resources.IResource;12import org.eclipse.core.resources.IResource;
16import org.eclipse.core.runtime.IProgressMonitor;13import org.eclipse.core.runtime.IProgressMonitor;
17import org.vcs.bazaar.client.IBazaarClient;14import org.vcs.bazaar.client.IBazaarClient;
18import org.vcs.bazaar.client.commandline.commands.options.Option;
19import org.vcs.bazaar.client.commandline.syntax.ISwitchOptions;15import org.vcs.bazaar.client.commandline.syntax.ISwitchOptions;
20import org.vcs.bazaar.client.core.BazaarClientException;16import org.vcs.bazaar.client.core.BazaarClientException;
21import org.vcs.bazaar.client.core.BranchLocation;17import org.vcs.bazaar.client.core.BranchLocation;
@@ -47,14 +43,13 @@
47 monitor.beginTask(CoreTexts.bind(CoreTexts.SwitchCommand_taskName, location.toString()), 100);43 monitor.beginTask(CoreTexts.bind(CoreTexts.SwitchCommand_taskName, location.toString()), 100);
48 monitor.setTaskName(CoreTexts.bind(CoreTexts.SwitchCommand_taskName, location.toString()));44 monitor.setTaskName(CoreTexts.bind(CoreTexts.SwitchCommand_taskName, location.toString()));
49 IBazaarClient client = getClient(branch);45 IBazaarClient client = getClient(branch);
50 List<Option> options = new ArrayList<Option>(0);
51 if (force) {46 if (force) {
52 options.add(ISwitchOptions.FORCE);47 addOptions(ISwitchOptions.FORCE);
53 }48 }
54 if (createBranch) {49 if (createBranch) {
55 options.add(ISwitchOptions.CREATE_BRANCH);50 addOptions(ISwitchOptions.CREATE_BRANCH);
56 }51 }
57 client.switchBranch(location, new CommandProgressListener(monitor), options.toArray(new Option[options.size()]));52 client.switchBranch(location, new CommandProgressListener(monitor), getOptions());
58 return BzrWorkspaceRoot.findProjectsInBranch(branch);53 return BzrWorkspaceRoot.findProjectsInBranch(branch);
59 } catch (BazaarClientException e) {54 } catch (BazaarClientException e) {
60 throw BazaarException.wrapException(e);55 throw BazaarException.wrapException(e);
6156
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/TagCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/TagCommand.java 2013-03-19 15:05:13 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/TagCommand.java 2014-06-11 09:53:26 +0000
@@ -22,12 +22,11 @@
2222
23 private final IBzrBranch branch;23 private final IBzrBranch branch;
24 private final String tagName;24 private final String tagName;
25 private final Option[] options;
26 25
27 public TagCommand(IBzrBranch branch, String tagName, Option[] options) {26 public TagCommand(IBzrBranch branch, String tagName, Option[] options) {
28 this.branch = branch;27 this.branch = branch;
29 this.tagName = tagName;28 this.tagName = tagName;
30 this.options = options;29 addOptions(options);
31 }30 }
32 31
33 @Override32 @Override
@@ -36,7 +35,7 @@
36 monitor.beginTask(CoreTexts.bind(CoreTexts.TagCommand_taskName, branch.getName()), 100);35 monitor.beginTask(CoreTexts.bind(CoreTexts.TagCommand_taskName, branch.getName()), 100);
37 monitor.setTaskName(CoreTexts.bind(CoreTexts.TagCommand_taskName, branch.getName()));36 monitor.setTaskName(CoreTexts.bind(CoreTexts.TagCommand_taskName, branch.getName()));
38 IBazaarClient client = getClient(branch);37 IBazaarClient client = getClient(branch);
39 client.tag(tagName, options);38 client.tag(tagName, getOptions());
40 } catch (BazaarClientException e) {39 } catch (BazaarClientException e) {
41 throw BazaarException.wrapException(e);40 throw BazaarException.wrapException(e);
42 } finally {41 } finally {
4342
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnBindCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnBindCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnBindCommand.java 2014-06-11 09:53:26 +0000
@@ -36,7 +36,7 @@
36 monitor.beginTask(CoreTexts.UnBindCommand_taskName, 1000);36 monitor.beginTask(CoreTexts.UnBindCommand_taskName, 1000);
37 monitor.setTaskName(CoreTexts.UnBindCommand_taskName);37 monitor.setTaskName(CoreTexts.UnBindCommand_taskName);
38 IBazaarClient client = getClient(branch);38 IBazaarClient client = getClient(branch);
39 client.unBind();39 client.unBind(getOptions());
40 monitor.worked(1000);40 monitor.worked(1000);
41 return BzrWorkspaceRoot.findProjectsInBranch(branch);41 return BzrWorkspaceRoot.findProjectsInBranch(branch);
42 } catch (BazaarClientException e) {42 } catch (BazaarClientException e) {
4343
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnCommitCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnCommitCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnCommitCommand.java 2014-06-11 09:53:26 +0000
@@ -34,7 +34,7 @@
34 try {34 try {
35 monitor.beginTask(CoreTexts.UnCommitCommand_unCommiting, 100);35 monitor.beginTask(CoreTexts.UnCommitCommand_unCommiting, 100);
36 monitor.setTaskName(CoreTexts.UnCommitCommand_unCommiting);36 monitor.setTaskName(CoreTexts.UnCommitCommand_unCommiting);
37 BzrWorkspaceRoot.getClient(branch).unCommit(branch.getPath().toFile());37 BzrWorkspaceRoot.getClient(branch).unCommit(branch.getPath().toFile(), getOptions());
38 monitor.worked(100);38 monitor.worked(100);
39 return BzrWorkspaceRoot.findProjectsInBranch(branch);39 return BzrWorkspaceRoot.findProjectsInBranch(branch);
40 } catch (BazaarClientException e) {40 } catch (BazaarClientException e) {
4141
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnShelveCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnShelveCommand.java 2013-04-14 21:56:10 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UnShelveCommand.java 2014-06-11 09:53:26 +0000
@@ -24,12 +24,11 @@
2424
25 private IBzrBranch branch;25 private IBzrBranch branch;
26 private String shelfId;26 private String shelfId;
27 private Option[] options;
2827
29 public UnShelveCommand(IBzrBranch branch, String shelfId, Option[] options) {28 public UnShelveCommand(IBzrBranch branch, String shelfId, Option[] options) {
30 this.branch = branch;29 this.branch = branch;
31 this.shelfId = shelfId;30 this.shelfId = shelfId;
32 this.options = options;31 addOptions(options);
33 }32 }
3433
35 @Override34 @Override
@@ -38,7 +37,7 @@
38 monitor.beginTask(CoreTexts.UnShelveCommand_taskName, 100);37 monitor.beginTask(CoreTexts.UnShelveCommand_taskName, 100);
39 monitor.setTaskName(CoreTexts.UnShelveCommand_taskName);38 monitor.setTaskName(CoreTexts.UnShelveCommand_taskName);
40 IBazaarClient client = BzrWorkspaceRoot.getClient(branch);39 IBazaarClient client = BzrWorkspaceRoot.getClient(branch);
41 client.unShelve(shelfId, options);40 client.unShelve(shelfId, getOptions());
42 monitor.worked(100);41 monitor.worked(100);
43 return BzrWorkspaceRoot.findProjectsInBranch(branch);42 return BzrWorkspaceRoot.findProjectsInBranch(branch);
44 } catch (BazaarClientException e) {43 } catch (BazaarClientException e) {
4544
=== modified file 'org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UpdateCommand.java'
--- org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UpdateCommand.java 2013-10-28 14:20:05 +0000
+++ org.vcs.bazaar.eclipse.core/src/org/vcs/bazaar/eclipse/core/commands/UpdateCommand.java 2014-06-11 09:53:26 +0000
@@ -36,7 +36,7 @@
36 monitor.beginTask("Update command", 100);36 monitor.beginTask("Update command", 100);
37 monitor.setTaskName("Updating");37 monitor.setTaskName("Updating");
38 IBazaarClient client = getClient(branch);38 IBazaarClient client = getClient(branch);
39 client.update(branch.getFile(), new CommandProgressListener(monitor));39 client.update(branch.getFile(), new CommandProgressListener(monitor), getOptions());
40 } catch (BazaarClientException e) {40 } catch (BazaarClientException e) {
41 if (!setPostCommandErrorOnConflicts(e.getMessage())) {41 if (!setPostCommandErrorOnConflicts(e.getMessage())) {
42 throw BazaarException.wrapException(e);42 throw BazaarException.wrapException(e);
4343
=== modified file 'org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/UITexts.java'
--- org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/UITexts.java 2014-01-14 22:00:23 +0000
+++ org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/UITexts.java 2014-06-11 09:53:26 +0000
@@ -77,6 +77,7 @@
77 public static String BazaarPreferencesPage_disable_logs;77 public static String BazaarPreferencesPage_disable_logs;
78 public static String BazaarPreferencesPage_xmlrpc_port;78 public static String BazaarPreferencesPage_xmlrpc_port;
79 public static String BazaarPreferencesPage_client_type;79 public static String BazaarPreferencesPage_client_type;
80 public static String BazaarPreferencesPage_ignore_ssl_errors;
80 81
81 // Console preferences82 // Console preferences
82 public static String BazaarConsole_name;83 public static String BazaarConsole_name;
8384
=== modified file 'org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/actions/CommitAction.java'
--- org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/actions/CommitAction.java 2014-02-04 13:27:54 +0000
+++ org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/actions/CommitAction.java 2014-06-11 09:53:26 +0000
@@ -154,7 +154,7 @@
154 final List<IBzrLocalResource> filesToCommit = getResources(commitDialog.getSelectedFiles());154 final List<IBzrLocalResource> filesToCommit = getResources(commitDialog.getSelectedFiles());
155 final String commitText = commitDialog.getCommitMessage();155 final String commitText = commitDialog.getCommitMessage();
156 final boolean pushAfterCommit = commitDialog.isPushAfterCommit();156 final boolean pushAfterCommit = commitDialog.isPushAfterCommit();
157 final List<Option> options = commitDialog.getOptions();157 final Option[] options = commitDialog.getOptions().toArray(new Option[0]);
158 final boolean fullRefresh = !getUnknownOrAddedResources(commitDialog.getSelectedFiles()).isEmpty();158 final boolean fullRefresh = !getUnknownOrAddedResources(commitDialog.getSelectedFiles()).isEmpty();
159 Job job = new Job("Running commit") {159 Job job = new Job("Running commit") {
160 @Override160 @Override
@@ -174,9 +174,9 @@
174 if(commitableResources.getAllPendingMerges().size() > 0) {174 if(commitableResources.getAllPendingMerges().size() > 0) {
175 // commit all modified files (including unknowns)175 // commit all modified files (including unknowns)
176 // currently we do this, by committing without passing any file to the commit cmd176 // currently we do this, by committing without passing any file to the commit cmd
177 commitCmd = new CommitCommand(filesToCommit, commitText, options, true, true);177 commitCmd = new CommitCommand(filesToCommit, commitText, true, true, options);
178 } else {178 } else {
179 commitCmd = new CommitCommand(filesToCommit, commitText, options, false, fullRefresh);179 commitCmd = new CommitCommand(filesToCommit, commitText, false, fullRefresh, options);
180 }180 }
181 commitCmd.run(EclipseBazaarCore.subProgressMonitorFor(monitor));181 commitCmd.run(EclipseBazaarCore.subProgressMonitorFor(monitor));
182 }182 }
183183
=== modified file 'org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/preferences/BazaarPreferencePage.java'
--- org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/preferences/BazaarPreferencePage.java 2014-01-15 17:33:43 +0000
+++ org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/preferences/BazaarPreferencePage.java 2014-06-11 09:53:26 +0000
@@ -72,6 +72,7 @@
72 createXmlRpClientConfigControl();72 createXmlRpClientConfigControl();
73 disableLogs = new BooleanFieldEditor(IBazaarCoreConstants.DISABLE_LOGS, UITexts.BazaarPreferencesPage_disable_logs, getFieldEditorParent());73 disableLogs = new BooleanFieldEditor(IBazaarCoreConstants.DISABLE_LOGS, UITexts.BazaarPreferencesPage_disable_logs, getFieldEditorParent());
74 addField(disableLogs);74 addField(disableLogs);
75 addField(new BooleanFieldEditor(IBazaarCoreConstants.IGNORE_SSL_ERRORS, UITexts.BazaarPreferencesPage_ignore_ssl_errors, getFieldEditorParent()));
75 executable.getTextControl(getFieldEditorParent()).setEditable(false);76 executable.getTextControl(getFieldEditorParent()).setEditable(false);
76 email.getTextControl(getFieldEditorParent()).setEnabled(getPreferenceStore().getBoolean(IBazaarCoreConstants.OVERWRITE_EMAIL));77 email.getTextControl(getFieldEditorParent()).setEnabled(getPreferenceStore().getBoolean(IBazaarCoreConstants.OVERWRITE_EMAIL));
77 }78 }
7879
=== modified file 'org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/uitexts.properties'
--- org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/uitexts.properties 2014-01-14 22:00:23 +0000
+++ org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/uitexts.properties 2014-06-11 09:53:26 +0000
@@ -78,6 +78,7 @@
78BazaarPreferencesPage_disable_logs=&Disable logging to file (.bzr.log) 78BazaarPreferencesPage_disable_logs=&Disable logging to file (.bzr.log)
79BazaarPreferencesPage_xmlrpc_port=XMLRpc service port79BazaarPreferencesPage_xmlrpc_port=XMLRpc service port
80BazaarPreferencesPage_client_type=Client type:80BazaarPreferencesPage_client_type=Client type:
81BazaarPreferencesPage_ignore_ssl_errors=Ignore SSL certificate errors for this workspace
8182
82#Console83#Console
83BazaarConsole_name=Bazaar Console84BazaarConsole_name=Bazaar Console
8485
=== modified file 'org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/wizards/createproject/CreateProjectWizard.java'
--- org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/wizards/createproject/CreateProjectWizard.java 2013-11-12 20:25:36 +0000
+++ org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/wizards/createproject/CreateProjectWizard.java 2014-06-11 09:53:26 +0000
@@ -182,12 +182,13 @@
182 }182 }
183 if (projectToUse != null) {183 if (projectToUse != null) {
184 op = new CreateBazaarProjectOperation(getContainer(), tempFolder, projectToUse);184 op = new CreateBazaarProjectOperation(getContainer(), tempFolder, projectToUse);
185 op.run();
185 }186 }
186 } else {187 } else {
187 op = new CreateBazaarProjectOperation(getContainer(), tempFolder, 188 op = new CreateBazaarProjectOperation(getContainer(), tempFolder,
188 wizard.getProjectName(), wizard.getProjectLocation(), wizard.getWizardType() == ProjectWizardType.IMPORT_EXISTING);189 wizard.getProjectName(), wizard.getProjectLocation(), wizard.getWizardType() == ProjectWizardType.IMPORT_EXISTING);
190 op.run();
189 }191 }
190 op.run();
191 }192 }
192 // Clean up the mess193 // Clean up the mess
193 if (op == null) {194 if (op == null) {

Subscribers

People subscribed via source and target branches