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: mp+222773@code.launchpad.net |
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 | 5 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | 5 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> |
6 | 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 | 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 | 8 | <classpathentry kind="lib" path="bzr-java-lib-1.3.4.jar"/> | ||
9 | 8 | <classpathentry kind="output" path="bin"/> | 9 | <classpathentry kind="output" path="bin"/> |
10 | 9 | </classpath> | 10 | </classpath> |
11 | 10 | 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 | 59 | BazaarTreeStatus treeStatus = getClient().status(new File[] { getProject().getLocation().toFile() }); | 59 | BazaarTreeStatus treeStatus = getClient().status(new File[] { getProject().getLocation().toFile() }); |
17 | 60 | getWt().check(treeStatus.getStatusAsArray(), getProject().getLocation().toFile().getCanonicalPath()); | 60 | getWt().check(treeStatus.getStatusAsArray(), getProject().getLocation().toFile().getCanonicalPath()); |
18 | 61 | 61 | ||
20 | 62 | CommitCommand cmd = new CommitCommand(resources, "test commit", new ArrayList<Option>(0)); | 62 | CommitCommand cmd = new CommitCommand(resources, "test commit"); |
21 | 63 | IResource[] commitedResources = cmd.execute(new NullProgressMonitor()); | 63 | IResource[] commitedResources = cmd.execute(new NullProgressMonitor()); |
22 | 64 | assertNotNull(commitedResources); | 64 | assertNotNull(commitedResources); |
23 | 65 | assertEquals(1, commitedResources.length); | 65 | assertEquals(1, commitedResources.length); |
24 | @@ -79,7 +79,7 @@ | |||
25 | 79 | final String textToAdd = "this is text added to " + aFile.getName(); | 79 | final String textToAdd = "this is text added to " + aFile.getName(); |
26 | 80 | addContentToFile(aFile, textToAdd); | 80 | addContentToFile(aFile, textToAdd); |
27 | 81 | 81 | ||
29 | 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)"); |
30 | 83 | IResource[] commitedResources = cmd.execute(new NullProgressMonitor()); | 83 | IResource[] commitedResources = cmd.execute(new NullProgressMonitor()); |
31 | 84 | assertNotNull(commitedResources); | 84 | assertNotNull(commitedResources); |
32 | 85 | assertEquals(1, commitedResources.length); | 85 | assertEquals(1, commitedResources.length); |
33 | 86 | 86 | ||
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 | 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$ |
39 | 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$ |
40 | 22 | public static final String DISABLE_LOGS = "disable_logs"; //$NON-NLS-1$ | 22 | public static final String DISABLE_LOGS = "disable_logs"; //$NON-NLS-1$ |
41 | 23 | public static final String IGNORE_SSL_ERRORS = "ignore_ssl_errors"; //$NON-NLS-1$ | ||
42 | 23 | 24 | ||
43 | 24 | } | 25 | } |
44 | 25 | 26 | ||
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 | 35 | @Override | 35 | @Override |
50 | 36 | public IResource[] execute(IProgressMonitor monitor) throws BazaarException { | 36 | public IResource[] execute(IProgressMonitor monitor) throws BazaarException { |
51 | 37 | try { | 37 | try { |
53 | 38 | root.getClient().add(getFiles(resources)); | 38 | root.getClient().add(getFiles(resources), getOptions()); |
54 | 39 | return BzrWorkspaceRoot.findProjectsInBranch(root.getBranch()); | 39 | return BzrWorkspaceRoot.findProjectsInBranch(root.getBranch()); |
55 | 40 | } catch (BazaarClientException e) { | 40 | } catch (BazaarClientException e) { |
56 | 41 | throw BazaarException.wrapException(e); | 41 | throw BazaarException.wrapException(e); |
57 | 42 | 42 | ||
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 | 41 | monitor.beginTask(CoreTexts.AnnotateCommand_annotate, 1000); | 41 | monitor.beginTask(CoreTexts.AnnotateCommand_annotate, 1000); |
63 | 42 | monitor.setTaskName(CoreTexts.AnnotateCommand_annotate); | 42 | monitor.setTaskName(CoreTexts.AnnotateCommand_annotate); |
64 | 43 | IBazaarClient client = getClient(resource.getIResource().getProject()); | 43 | IBazaarClient client = getClient(resource.getIResource().getProject()); |
66 | 44 | annotation = client.annotate(resource.getIResource().getLocation().toFile()); | 44 | annotation = client.annotate(resource.getIResource().getLocation().toFile(), getOptions()); |
67 | 45 | monitor.worked(1000); | 45 | monitor.worked(1000); |
68 | 46 | } catch (BazaarClientException e) { | 46 | } catch (BazaarClientException e) { |
69 | 47 | throw BazaarException.wrapException(e, resource.getIResource()); | 47 | throw BazaarException.wrapException(e, resource.getIResource()); |
70 | 48 | 48 | ||
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 | 1 | /******************************************************************************* | 1 | /******************************************************************************* |
76 | 2 | * Copyright (c) 2007-2013 Guillermo Gonzalez | 2 | * Copyright (c) 2007-2013 Guillermo Gonzalez |
77 | 3 | * Copyright (C) 2014 Alexander Taler | ||
78 | 3 | * | 4 | * |
79 | 4 | * All rights reserved. This program and the accompanying materials | 5 | * All rights reserved. This program and the accompanying materials |
80 | 5 | * are made available under the terms of the Eclipse Public License v1.0 | 6 | * are made available under the terms of the Eclipse Public License v1.0 |
81 | @@ -11,6 +12,7 @@ | |||
82 | 11 | 12 | ||
83 | 12 | import java.io.File; | 13 | import java.io.File; |
84 | 13 | import java.util.ArrayList; | 14 | import java.util.ArrayList; |
85 | 15 | import java.util.Arrays; | ||
86 | 14 | import java.util.Collection; | 16 | import java.util.Collection; |
87 | 15 | import java.util.HashMap; | 17 | import java.util.HashMap; |
88 | 16 | import java.util.List; | 18 | import java.util.List; |
89 | @@ -19,9 +21,12 @@ | |||
90 | 19 | import org.eclipse.core.resources.IProject; | 21 | import org.eclipse.core.resources.IProject; |
91 | 20 | import org.eclipse.core.runtime.IProgressMonitor; | 22 | import org.eclipse.core.runtime.IProgressMonitor; |
92 | 21 | import org.vcs.bazaar.client.IBazaarClient; | 23 | import org.vcs.bazaar.client.IBazaarClient; |
93 | 24 | import org.vcs.bazaar.client.commandline.commands.options.Option; | ||
94 | 22 | import org.vcs.bazaar.eclipse.BzrWorkspaceRoot; | 25 | import org.vcs.bazaar.eclipse.BzrWorkspaceRoot; |
95 | 26 | import org.vcs.bazaar.eclipse.IBazaarCoreConstants; | ||
96 | 23 | import org.vcs.bazaar.eclipse.core.model.IBzrBranch; | 27 | import org.vcs.bazaar.eclipse.core.model.IBzrBranch; |
97 | 24 | import org.vcs.bazaar.eclipse.core.model.local.IBzrLocalResource; | 28 | import org.vcs.bazaar.eclipse.core.model.local.IBzrLocalResource; |
98 | 29 | import org.vcs.bazaar.eclipse.core.utils.PreferenceHelper; | ||
99 | 25 | import org.vcs.bazaar.eclipse.internal.core.BazaarException; | 30 | import org.vcs.bazaar.eclipse.internal.core.BazaarException; |
100 | 26 | 31 | ||
101 | 27 | /** | 32 | /** |
102 | @@ -111,7 +116,39 @@ | |||
103 | 111 | } | 116 | } |
104 | 112 | return list; | 117 | return list; |
105 | 113 | } | 118 | } |
107 | 114 | 119 | ||
108 | 120 | private Option[] options = null; | ||
109 | 121 | |||
110 | 122 | /** | ||
111 | 123 | * The command-line options included in this command. | ||
112 | 124 | */ | ||
113 | 125 | public Option[] getOptions() { | ||
114 | 126 | if (options == null) { | ||
115 | 127 | // Create options, adding common ones. | ||
116 | 128 | if (PreferenceHelper.getBoolean(IBazaarCoreConstants.IGNORE_SSL_ERRORS)) { | ||
117 | 129 | options = new Option[1]; | ||
118 | 130 | options[0] = new Option("-Ossl.cert_reqs=none"); | ||
119 | 131 | } else { | ||
120 | 132 | options = new Option[0]; | ||
121 | 133 | } | ||
122 | 134 | } | ||
123 | 135 | return options; | ||
124 | 136 | } | ||
125 | 137 | |||
126 | 138 | /** | ||
127 | 139 | * Add more command-line options to this command. | ||
128 | 140 | */ | ||
129 | 141 | public void addOptions(Option...moreO) { | ||
130 | 142 | // Ensure this.options is initialised | ||
131 | 143 | getOptions(); | ||
132 | 144 | |||
133 | 145 | Option[] newO = Arrays.copyOf(options, options.length + moreO.length); | ||
134 | 146 | for (int i = 0; i < moreO.length; i++) { | ||
135 | 147 | newO[options.length + i] = moreO[i]; | ||
136 | 148 | } | ||
137 | 149 | options = newO; | ||
138 | 150 | } | ||
139 | 151 | |||
140 | 115 | public abstract void run(IProgressMonitor monitor) throws BazaarException; | 152 | public abstract void run(IProgressMonitor monitor) throws BazaarException; |
141 | 116 | 153 | ||
142 | 117 | } | 154 | } |
143 | 118 | 155 | ||
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 | 39 | monitor.beginTask(CoreTexts.BindCommand_taskName, 1000); | 39 | monitor.beginTask(CoreTexts.BindCommand_taskName, 1000); |
149 | 40 | IBazaarClient client = getClient(branch); | 40 | IBazaarClient client = getClient(branch); |
150 | 41 | monitor.worked(500); | 41 | monitor.worked(500); |
152 | 42 | client.bind(location); | 42 | client.bind(location, getOptions()); |
153 | 43 | return BzrWorkspaceRoot.findProjectsInBranch(branch); | 43 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
154 | 44 | } catch (BazaarClientException e) { | 44 | } catch (BazaarClientException e) { |
155 | 45 | throw BazaarException.wrapException(e); | 45 | throw BazaarException.wrapException(e); |
156 | 46 | 46 | ||
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 | 14 | import org.eclipse.core.runtime.IProgressMonitor; | 14 | import org.eclipse.core.runtime.IProgressMonitor; |
162 | 15 | import org.vcs.bazaar.client.BazaarRevision; | 15 | import org.vcs.bazaar.client.BazaarRevision; |
163 | 16 | import org.vcs.bazaar.client.IBazaarClient; | 16 | import org.vcs.bazaar.client.IBazaarClient; |
164 | 17 | import org.vcs.bazaar.client.commandline.commands.options.Option; | ||
165 | 17 | import org.vcs.bazaar.client.core.BazaarClientException; | 18 | import org.vcs.bazaar.client.core.BazaarClientException; |
166 | 18 | import org.vcs.bazaar.client.core.BazaarClientException.BazaarUncheckedException; | 19 | import org.vcs.bazaar.client.core.BazaarClientException.BazaarUncheckedException; |
167 | 19 | import org.vcs.bazaar.client.core.BranchLocation; | 20 | import org.vcs.bazaar.client.core.BranchLocation; |
168 | @@ -25,15 +26,16 @@ | |||
169 | 25 | /** | 26 | /** |
170 | 26 | * @author Guillermo Gonzalez TODO: add revision support and write a testcase | 27 | * @author Guillermo Gonzalez TODO: add revision support and write a testcase |
171 | 27 | */ | 28 | */ |
173 | 28 | public class BranchCommand implements IBazaarCommand { | 29 | public class BranchCommand extends BazaarCommand { |
174 | 29 | 30 | ||
175 | 30 | private final IBzrBranch remoteLocation; | 31 | private final IBzrBranch remoteLocation; |
176 | 31 | private BazaarRevision revision; | 32 | private BazaarRevision revision; |
177 | 32 | private final File toLocation; | 33 | private final File toLocation; |
178 | 33 | 34 | ||
180 | 34 | public BranchCommand(final IBzrBranch sourceLocation, final File toLocation, String revision) { | 35 | public BranchCommand(final IBzrBranch sourceLocation, final File toLocation, String revision, Option...options) { |
181 | 35 | this.remoteLocation = sourceLocation; | 36 | this.remoteLocation = sourceLocation; |
182 | 36 | this.toLocation = toLocation; | 37 | this.toLocation = toLocation; |
183 | 38 | addOptions(options); | ||
184 | 37 | if (revision != null && revision.trim().length() != 0) { | 39 | if (revision != null && revision.trim().length() != 0) { |
185 | 38 | try { | 40 | try { |
186 | 39 | this.setRevision(BazaarRevision.getRevision(BazaarRevision.Prefix.REVNO, revision)); | 41 | this.setRevision(BazaarRevision.getRevision(BazaarRevision.Prefix.REVNO, revision)); |
187 | @@ -72,7 +74,7 @@ | |||
188 | 72 | */ | 74 | */ |
189 | 73 | protected void runOnClient(IBazaarClient client, CommandProgressListener cpl) | 75 | protected void runOnClient(IBazaarClient client, CommandProgressListener cpl) |
190 | 74 | throws BazaarClientException { | 76 | throws BazaarClientException { |
192 | 75 | client.branch(getRemoteLocation(), getToLocation(), getRevision(), cpl); | 77 | client.branch(getRemoteLocation(), getToLocation(), getRevision(), cpl, getOptions()); |
193 | 76 | } | 78 | } |
194 | 77 | 79 | ||
195 | 78 | /** | 80 | /** |
196 | 79 | 81 | ||
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 | 60 | monitor.beginTask(CoreTexts.CatCommand_taskName, 1000); | 60 | monitor.beginTask(CoreTexts.CatCommand_taskName, 1000); |
202 | 61 | IBazaarClient client = getClient(branch, true); | 61 | IBazaarClient client = getClient(branch, true); |
203 | 62 | if (file != null) { | 62 | if (file != null) { |
205 | 63 | content = client.cat(file, revision, charsetName); | 63 | content = client.cat(file, revision, charsetName, getOptions()); |
206 | 64 | } else { | 64 | } else { |
208 | 65 | content = client.cat(location, revision, charsetName); | 65 | content = client.cat(location, revision, charsetName, getOptions()); |
209 | 66 | } | 66 | } |
210 | 67 | } catch (BazaarClientException e) { | 67 | } catch (BazaarClientException e) { |
211 | 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")) { |
212 | 69 | 69 | ||
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 | 22 | */ | 22 | */ |
218 | 23 | public class CheckoutCommand extends BranchCommand { | 23 | public class CheckoutCommand extends BranchCommand { |
219 | 24 | 24 | ||
220 | 25 | private final Option[] options; | ||
221 | 26 | |||
222 | 27 | public CheckoutCommand(final IBzrBranch sourceLocation, final File toLocation, Option...options) { | 25 | public CheckoutCommand(final IBzrBranch sourceLocation, final File toLocation, Option...options) { |
225 | 28 | super(sourceLocation, toLocation, null); | 26 | super(sourceLocation, toLocation, null, options); |
224 | 29 | this.options = options; | ||
226 | 30 | } | 27 | } |
227 | 31 | 28 | ||
228 | 32 | /** | 29 | /** |
229 | @@ -35,7 +32,7 @@ | |||
230 | 35 | @Override | 32 | @Override |
231 | 36 | protected void runOnClient(IBazaarClient client, CommandProgressListener cpl) | 33 | protected void runOnClient(IBazaarClient client, CommandProgressListener cpl) |
232 | 37 | throws BazaarClientException { | 34 | throws BazaarClientException { |
234 | 38 | client.checkout(getRemoteLocation(), getToLocation(), cpl, options); | 35 | client.checkout(getRemoteLocation(), getToLocation(), cpl, getOptions()); |
235 | 39 | } | 36 | } |
236 | 40 | 37 | ||
237 | 41 | } | 38 | } |
238 | 42 | 39 | ||
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 | 35 | 35 | ||
244 | 36 | private String commitMessage; | 36 | private String commitMessage; |
245 | 37 | private List<IBzrLocalResource> resources; | 37 | private List<IBzrLocalResource> resources; |
246 | 38 | final private List<Option> options; | ||
247 | 39 | private boolean fullCommit; | 38 | private boolean fullCommit; |
248 | 40 | private boolean fullRefresh; | 39 | private boolean fullRefresh; |
249 | 41 | 40 | ||
250 | @@ -46,10 +45,10 @@ | |||
251 | 46 | * @param commitMessage | 45 | * @param commitMessage |
252 | 47 | * @param localCommit | 46 | * @param localCommit |
253 | 48 | */ | 47 | */ |
255 | 49 | public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage, List<Option> options) { | 48 | public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage, Option... options) { |
256 | 50 | this.resources = filesToCommit; | 49 | this.resources = filesToCommit; |
257 | 51 | this.commitMessage = commitMessage; | 50 | this.commitMessage = commitMessage; |
259 | 52 | this.options = options; | 51 | addOptions(options); |
260 | 53 | } | 52 | } |
261 | 54 | 53 | ||
262 | 55 | /** | 54 | /** |
263 | @@ -59,8 +58,8 @@ | |||
264 | 59 | * @param options | 58 | * @param options |
265 | 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) |
266 | 61 | */ | 60 | */ |
269 | 62 | public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage, List<Option> options, | 61 | public CommitCommand(List<IBzrLocalResource> filesToCommit, String commitMessage, |
270 | 63 | boolean fullCommit, boolean fullRefresh) { | 62 | boolean fullCommit, boolean fullRefresh, Option... options) { |
271 | 64 | this(filesToCommit, commitMessage, options); | 63 | this(filesToCommit, commitMessage, options); |
272 | 65 | this.fullCommit = fullCommit; | 64 | this.fullCommit = fullCommit; |
273 | 66 | this.fullRefresh = fullRefresh; | 65 | this.fullRefresh = fullRefresh; |
274 | @@ -81,9 +80,9 @@ | |||
275 | 81 | for (IBzrBranch branch : map.keySet()) { | 80 | for (IBzrBranch branch : map.keySet()) { |
276 | 82 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); | 81 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); |
277 | 83 | if(fullCommit) { | 82 | if(fullCommit) { |
279 | 84 | client.commit(new File[]{branch.getFile()}, commitMessage, options.toArray(new Option[options.size()])); | 83 | client.commit(new File[]{branch.getFile()}, commitMessage, getOptions()); |
280 | 85 | } else { | 84 | } else { |
282 | 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()); |
283 | 87 | } | 86 | } |
284 | 88 | } | 87 | } |
285 | 89 | if (fullCommit || fullRefresh) { | 88 | if (fullCommit || fullRefresh) { |
286 | 90 | 89 | ||
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 | 33 | try { | 33 | try { |
292 | 34 | monitor.beginTask("Getting conflicts", 1000); | 34 | monitor.beginTask("Getting conflicts", 1000); |
293 | 35 | IBazaarClient client = getClient(branch, true); | 35 | IBazaarClient client = getClient(branch, true); |
295 | 36 | conflicts = client.conflicts(); | 36 | conflicts = client.conflicts(getOptions()); |
296 | 37 | monitor.worked(1000); | 37 | monitor.worked(1000); |
297 | 38 | } catch (BazaarClientException e) { | 38 | } catch (BazaarClientException e) { |
298 | 39 | throw BazaarException.wrapException(e); | 39 | throw BazaarException.wrapException(e); |
299 | 40 | 40 | ||
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 | 41 | try { | 41 | try { |
305 | 42 | List<File> files = getFiles(resources); | 42 | List<File> files = getFiles(resources); |
306 | 43 | IBazaarClient client = getClient(resources.get(0).getIResource().getProject()); | 43 | IBazaarClient client = getClient(resources.get(0).getIResource().getProject()); |
308 | 44 | patchContent = client.diff(files.toArray(new File[0]), revision); | 44 | patchContent = client.diff(files.toArray(new File[0]), revision, getOptions()); |
309 | 45 | monitor.worked(100); | 45 | monitor.worked(100); |
310 | 46 | } catch (BazaarClientException e) { | 46 | } catch (BazaarClientException e) { |
311 | 47 | throw BazaarException.wrapException(e); | 47 | throw BazaarException.wrapException(e); |
312 | 48 | 48 | ||
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 | 44 | IBazaarClient client = getClient(branch, true); | 44 | IBazaarClient client = getClient(branch, true); |
318 | 45 | // to improve performance when only the default info is required | 45 | // to improve performance when only the default info is required |
319 | 46 | if(verbose) | 46 | if(verbose) |
323 | 47 | info = client.info(branch.getFile(), IInfoOptions.VERBOSE); | 47 | addOptions(IInfoOptions.VERBOSE); |
324 | 48 | else | 48 | info = client.info(branch.getFile(), getOptions()); |
322 | 49 | info = client.info(branch.getFile()); | ||
325 | 50 | } catch (BazaarClientException e) { | 49 | } catch (BazaarClientException e) { |
326 | 51 | throw BazaarException.wrapException(e); | 50 | throw BazaarException.wrapException(e); |
327 | 52 | } finally { | 51 | } finally { |
328 | 53 | 52 | ||
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 | 25 | * @author Guillermo Gonzalez | 25 | * @author Guillermo Gonzalez |
334 | 26 | * | 26 | * |
335 | 27 | */ | 27 | */ |
337 | 28 | public class InitCommand implements IBazaarCommand { | 28 | public class InitCommand extends BazaarCommand { |
338 | 29 | 29 | ||
339 | 30 | private final IProject project; | 30 | private final IProject project; |
340 | 31 | private final IPath branchPath; | 31 | private final IPath branchPath; |
341 | @@ -45,7 +45,7 @@ | |||
342 | 45 | IBazaarClient client = EclipseBazaarCore.getDefault().createClient(); | 45 | IBazaarClient client = EclipseBazaarCore.getDefault().createClient(); |
343 | 46 | client.setWorkDir(branchPath.toFile().getParentFile()); | 46 | client.setWorkDir(branchPath.toFile().getParentFile()); |
344 | 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()) |
346 | 48 | client.init(branchPath.toFile()); | 48 | client.init(branchPath.toFile(), getOptions()); |
347 | 49 | } catch (BazaarClientException e) { | 49 | } catch (BazaarClientException e) { |
348 | 50 | EclipseBazaarCore.log(e.getMessage(), IStatus.ERROR); | 50 | EclipseBazaarCore.log(e.getMessage(), IStatus.ERROR); |
349 | 51 | throw BazaarException.wrapException(e, project); | 51 | throw BazaarException.wrapException(e, project); |
350 | 52 | 52 | ||
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 | 9 | *******************************************************************************/ | 9 | *******************************************************************************/ |
356 | 10 | package org.vcs.bazaar.eclipse.core.commands; | 10 | package org.vcs.bazaar.eclipse.core.commands; |
357 | 11 | 11 | ||
358 | 12 | import java.util.ArrayList; | ||
359 | 13 | import java.util.Collections; | 12 | import java.util.Collections; |
360 | 14 | import java.util.List; | 13 | import java.util.List; |
361 | 15 | 14 | ||
362 | @@ -17,7 +16,6 @@ | |||
363 | 17 | import org.vcs.bazaar.client.IBazaarClient; | 16 | import org.vcs.bazaar.client.IBazaarClient; |
364 | 18 | import org.vcs.bazaar.client.IBazaarLogMessage; | 17 | import org.vcs.bazaar.client.IBazaarLogMessage; |
365 | 19 | import org.vcs.bazaar.client.IBazaarRevisionSpec; | 18 | import org.vcs.bazaar.client.IBazaarRevisionSpec; |
366 | 20 | import org.vcs.bazaar.client.commandline.commands.options.Option; | ||
367 | 21 | import org.vcs.bazaar.client.commandline.syntax.ILogOptions; | 19 | import org.vcs.bazaar.client.commandline.syntax.ILogOptions; |
368 | 22 | import org.vcs.bazaar.client.core.BazaarClientException; | 20 | import org.vcs.bazaar.client.core.BazaarClientException; |
369 | 23 | import org.vcs.bazaar.eclipse.CoreTexts; | 21 | import org.vcs.bazaar.eclipse.CoreTexts; |
370 | @@ -78,23 +76,23 @@ | |||
371 | 78 | monitor.beginTask(CoreTexts.LogCommand_log, 1000); | 76 | monitor.beginTask(CoreTexts.LogCommand_log, 1000); |
372 | 79 | monitor.setTaskName(CoreTexts.LogCommand_log); | 77 | monitor.setTaskName(CoreTexts.LogCommand_log); |
373 | 80 | IBazaarClient client = getClient(resource.getBranch(), false); | 78 | IBazaarClient client = getClient(resource.getBranch(), false); |
375 | 81 | List<Option> options = new ArrayList<Option>(); | 79 | |
376 | 82 | if (limit != null) { | 80 | if (limit != null) { |
378 | 83 | options.add(ILogOptions.LIMIT.setArgument(limit.toString())); | 81 | addOptions(ILogOptions.LIMIT.setArgument(limit.toString())); |
379 | 84 | } | 82 | } |
380 | 85 | if (revision != null) { | 83 | if (revision != null) { |
382 | 86 | options.add(ILogOptions.REVISION.setArgument(revision.toString())); | 84 | addOptions(ILogOptions.REVISION.setArgument(revision.toString())); |
383 | 87 | } | 85 | } |
384 | 88 | if (verbose) { | 86 | if (verbose) { |
386 | 89 | options.add(ILogOptions.VERBOSE); | 87 | addOptions(ILogOptions.VERBOSE); |
387 | 90 | } | 88 | } |
388 | 91 | if(resource instanceof IBzrBranch) { | 89 | if(resource instanceof IBzrBranch) { |
390 | 92 | logMessages = client.log(((IBzrBranch)resource).getBranchLocation(), options.toArray(new Option[0])); | 90 | logMessages = client.log(((IBzrBranch)resource).getBranchLocation(), getOptions()); |
391 | 93 | } else if (resource instanceof IBzrLocalResource) { | 91 | } else if (resource instanceof IBzrLocalResource) { |
392 | 94 | IBzrLocalResource localResource = ((IBzrLocalResource)resource); | 92 | IBzrLocalResource localResource = ((IBzrLocalResource)resource); |
394 | 95 | logMessages = client.log(localResource.getFile(), options.toArray(new Option[0])); | 93 | logMessages = client.log(localResource.getFile(), getOptions()); |
395 | 96 | } else { | 94 | } else { |
397 | 97 | logMessages = client.log(resource.getLocation(), options.toArray(new Option[0])); | 95 | logMessages = client.log(resource.getLocation(), getOptions()); |
398 | 98 | } | 96 | } |
399 | 99 | } catch (BazaarClientException e) { | 97 | } catch (BazaarClientException e) { |
400 | 100 | throw BazaarException.wrapException(e); | 98 | throw BazaarException.wrapException(e); |
401 | 101 | 99 | ||
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 | 38 | monitor.beginTask("executing ls", 1000); | 38 | monitor.beginTask("executing ls", 1000); |
407 | 39 | IBazaarClient client = getClient(resource.getProject(), true); | 39 | IBazaarClient client = getClient(resource.getProject(), true); |
408 | 40 | if(ignored) | 40 | if(ignored) |
412 | 41 | paths = client.ls(resource.getLocation().toFile(), null, ILsOptions.IGNORED, ILsOptions.VERSIONED); | 41 | addOptions(ILsOptions.IGNORED); |
413 | 42 | else | 42 | addOptions(ILsOptions.VERSIONED); |
414 | 43 | paths = client.ls(resource.getLocation().toFile(), null, ILsOptions.VERSIONED); | 43 | paths = client.ls(resource.getLocation().toFile(), null, getOptions()); |
415 | 44 | } catch (BazaarClientException e) { | 44 | } catch (BazaarClientException e) { |
416 | 45 | throw BazaarException.wrapException(e, resource); | 45 | throw BazaarException.wrapException(e, resource); |
417 | 46 | } finally { | 46 | } finally { |
418 | 47 | 47 | ||
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 | 30 | 30 | ||
424 | 31 | private final IBzrBranch branch; | 31 | private final IBzrBranch branch; |
425 | 32 | private final BranchLocation location; | 32 | private final BranchLocation location; |
426 | 33 | private Option[] options; | ||
427 | 34 | 33 | ||
428 | 35 | public MergeCommand(IBzrBranch branch, BranchLocation location, Option...options) { | 34 | public MergeCommand(IBzrBranch branch, BranchLocation location, Option...options) { |
429 | 36 | super(); | 35 | super(); |
430 | 37 | this.branch = branch; | 36 | this.branch = branch; |
431 | 38 | this.location = location; | 37 | this.location = location; |
433 | 39 | this.options = options; | 38 | addOptions(options); |
434 | 40 | } | 39 | } |
435 | 41 | 40 | ||
436 | 42 | @Override | 41 | @Override |
437 | @@ -46,7 +45,7 @@ | |||
438 | 46 | monitor.setTaskName(CoreTexts.MergeCommand_taskName); | 45 | monitor.setTaskName(CoreTexts.MergeCommand_taskName); |
439 | 47 | IBazaarClient client = getClient(branch); | 46 | IBazaarClient client = getClient(branch); |
440 | 48 | monitor.worked(10); | 47 | monitor.worked(10); |
442 | 49 | client.merge(location, options); | 48 | client.merge(location, getOptions()); |
443 | 50 | } catch (BazaarClientException e) { | 49 | } catch (BazaarClientException e) { |
444 | 51 | if (!setPostCommandErrorOnConflicts(e.getMessage())) { | 50 | if (!setPostCommandErrorOnConflicts(e.getMessage())) { |
445 | 52 | throw BazaarException.wrapException(e); | 51 | throw BazaarException.wrapException(e); |
446 | @@ -59,7 +58,7 @@ | |||
447 | 59 | 58 | ||
448 | 60 | @Override | 59 | @Override |
449 | 61 | protected int getChangeType() { | 60 | protected int getChangeType() { |
451 | 62 | for (Option option : options) { | 61 | for (Option option : getOptions()) { |
452 | 63 | if(option.equals(IMergeOptions.PULL)) { | 62 | if(option.equals(IMergeOptions.PULL)) { |
453 | 64 | return BzrChangeStateEvent.BRANCH_STATE_MODIFY; | 63 | return BzrChangeStateEvent.BRANCH_STATE_MODIFY; |
454 | 65 | } | 64 | } |
455 | 66 | 65 | ||
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 | 9 | *******************************************************************************/ | 9 | *******************************************************************************/ |
461 | 10 | package org.vcs.bazaar.eclipse.core.commands; | 10 | package org.vcs.bazaar.eclipse.core.commands; |
462 | 11 | 11 | ||
463 | 12 | import java.util.ArrayList; | ||
464 | 13 | import java.util.List; | ||
465 | 14 | |||
466 | 15 | import org.eclipse.core.resources.IResource; | 12 | import org.eclipse.core.resources.IResource; |
467 | 16 | import org.eclipse.core.runtime.IProgressMonitor; | 13 | import org.eclipse.core.runtime.IProgressMonitor; |
468 | 17 | import org.vcs.bazaar.client.IBazaarClient; | 14 | import org.vcs.bazaar.client.IBazaarClient; |
469 | 18 | import org.vcs.bazaar.client.commandline.commands.options.Option; | ||
470 | 19 | import org.vcs.bazaar.client.commandline.syntax.IPullOptions; | 15 | import org.vcs.bazaar.client.commandline.syntax.IPullOptions; |
471 | 20 | import org.vcs.bazaar.client.core.BazaarClientException; | 16 | import org.vcs.bazaar.client.core.BazaarClientException; |
472 | 21 | import org.vcs.bazaar.client.core.BranchLocation; | 17 | import org.vcs.bazaar.client.core.BranchLocation; |
473 | @@ -45,14 +41,13 @@ | |||
474 | 45 | try { | 41 | try { |
475 | 46 | monitor.beginTask(CoreTexts.PullCommand_taskName, 100); | 42 | monitor.beginTask(CoreTexts.PullCommand_taskName, 100); |
476 | 47 | IBazaarClient client = getClient(branch); | 43 | IBazaarClient client = getClient(branch); |
477 | 48 | List<Option> options = new ArrayList<Option>(0); | ||
478 | 49 | if (remember) { | 44 | if (remember) { |
480 | 50 | options.add(IPullOptions.REMEMBER); | 45 | addOptions(IPullOptions.REMEMBER); |
481 | 51 | } | 46 | } |
482 | 52 | if (overwrite) { | 47 | if (overwrite) { |
484 | 53 | options.add(IPullOptions.OVERWRITE); | 48 | addOptions(IPullOptions.OVERWRITE); |
485 | 54 | } | 49 | } |
487 | 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()); |
488 | 56 | setPostCommandErrorOnConflicts(err); | 51 | setPostCommandErrorOnConflicts(err); |
489 | 57 | return BzrWorkspaceRoot.findProjectsInBranch(branch); | 52 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
490 | 58 | } catch (BazaarClientException e) { | 53 | } catch (BazaarClientException e) { |
491 | 59 | 54 | ||
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 | 9 | *******************************************************************************/ | 9 | *******************************************************************************/ |
497 | 10 | package org.vcs.bazaar.eclipse.core.commands; | 10 | package org.vcs.bazaar.eclipse.core.commands; |
498 | 11 | 11 | ||
499 | 12 | import java.util.ArrayList; | ||
500 | 13 | import java.util.List; | ||
501 | 14 | |||
502 | 15 | import org.eclipse.core.runtime.IProgressMonitor; | 12 | import org.eclipse.core.runtime.IProgressMonitor; |
503 | 16 | import org.vcs.bazaar.client.IBazaarClient; | 13 | import org.vcs.bazaar.client.IBazaarClient; |
504 | 17 | import org.vcs.bazaar.client.commandline.commands.options.Option; | ||
505 | 18 | import org.vcs.bazaar.client.commandline.syntax.IPushOptions; | 14 | import org.vcs.bazaar.client.commandline.syntax.IPushOptions; |
506 | 19 | import org.vcs.bazaar.client.core.BazaarClientException; | 15 | import org.vcs.bazaar.client.core.BazaarClientException; |
507 | 20 | import org.vcs.bazaar.client.core.BranchLocation; | 16 | import org.vcs.bazaar.client.core.BranchLocation; |
508 | @@ -42,17 +38,16 @@ | |||
509 | 42 | public void run(IProgressMonitor monitor) throws BazaarException { | 38 | public void run(IProgressMonitor monitor) throws BazaarException { |
510 | 43 | try { | 39 | try { |
511 | 44 | IBazaarClient client = getClient(branch); | 40 | IBazaarClient client = getClient(branch); |
512 | 45 | List<Option> options = new ArrayList<Option>(0); | ||
513 | 46 | if(remember) { | 41 | if(remember) { |
515 | 47 | options.add(IPushOptions.REMEMBER); | 42 | addOptions(IPushOptions.REMEMBER); |
516 | 48 | } | 43 | } |
517 | 49 | if(useExsitingDir) { | 44 | if(useExsitingDir) { |
519 | 50 | options.add(IPushOptions.USE_EXISTING_DIR); | 45 | addOptions(IPushOptions.USE_EXISTING_DIR); |
520 | 51 | } | 46 | } |
521 | 52 | if (overwrite) { | 47 | if (overwrite) { |
523 | 53 | options.add(IPushOptions.OVERWRITE); | 48 | addOptions(IPushOptions.OVERWRITE); |
524 | 54 | } | 49 | } |
526 | 55 | client.push(location, options.toArray(new Option[options.size()])); | 50 | client.push(location, getOptions()); |
527 | 56 | } catch (BazaarClientException e) { | 51 | } catch (BazaarClientException e) { |
528 | 57 | throw BazaarException.wrapException(e); | 52 | throw BazaarException.wrapException(e); |
529 | 58 | } finally { | 53 | } finally { |
530 | 59 | 54 | ||
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 | 22 | 22 | ||
536 | 23 | @Override | 23 | @Override |
537 | 24 | protected void executeInternally(IBazaarClient client) throws BazaarClientException { | 24 | protected void executeInternally(IBazaarClient client) throws BazaarClientException { |
539 | 25 | client.rebaseAbort(); | 25 | client.rebaseAbort(getOptions()); |
540 | 26 | } | 26 | } |
541 | 27 | 27 | ||
542 | 28 | } | 28 | } |
543 | 29 | 29 | ||
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 | 29 | 29 | ||
549 | 30 | private final IBzrBranch branch; | 30 | private final IBzrBranch branch; |
550 | 31 | private final BranchLocation location; | 31 | private final BranchLocation location; |
551 | 32 | private final Option[] options; | ||
552 | 33 | private BazaarException rebaseConflictsException; | 32 | private BazaarException rebaseConflictsException; |
553 | 34 | private static final Pattern CONFLICT_PATTERN = Pattern.compile("conflict occurred"); | 33 | private static final Pattern CONFLICT_PATTERN = Pattern.compile("conflict occurred"); |
554 | 35 | 34 | ||
555 | @@ -40,7 +39,7 @@ | |||
556 | 40 | public RebaseCommand(IBzrBranch branch, BranchLocation location, Option...options) { | 39 | public RebaseCommand(IBzrBranch branch, BranchLocation location, Option...options) { |
557 | 41 | this.branch = branch; | 40 | this.branch = branch; |
558 | 42 | this.location = location; | 41 | this.location = location; |
560 | 43 | this.options = options; | 42 | addOptions(options); |
561 | 44 | } | 43 | } |
562 | 45 | 44 | ||
563 | 46 | @Override | 45 | @Override |
564 | @@ -63,7 +62,7 @@ | |||
565 | 63 | } | 62 | } |
566 | 64 | 63 | ||
567 | 65 | protected void executeInternally(IBazaarClient client) throws BazaarClientException { | 64 | protected void executeInternally(IBazaarClient client) throws BazaarClientException { |
569 | 66 | client.rebase(location, options); | 65 | client.rebase(location, getOptions()); |
570 | 67 | } | 66 | } |
571 | 68 | 67 | ||
572 | 69 | @Override | 68 | @Override |
573 | 70 | 69 | ||
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 | 22 | 22 | ||
579 | 23 | @Override | 23 | @Override |
580 | 24 | protected void executeInternally(IBazaarClient client) throws BazaarClientException { | 24 | protected void executeInternally(IBazaarClient client) throws BazaarClientException { |
582 | 25 | client.rebaseContinue(); | 25 | client.rebaseContinue(getOptions()); |
583 | 26 | } | 26 | } |
584 | 27 | } | 27 | } |
585 | 28 | 28 | ||
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 | 29 | public void run(IProgressMonitor monitor) throws BazaarException { | 29 | public void run(IProgressMonitor monitor) throws BazaarException { |
591 | 30 | IBazaarClient client = getClient(branch, true); | 30 | IBazaarClient client = getClient(branch, true); |
592 | 31 | try { | 31 | try { |
594 | 32 | rebaseInterrupted = client.rebaseToDo(); | 32 | rebaseInterrupted = client.rebaseToDo(getOptions()); |
595 | 33 | } catch (BazaarClientException e) { | 33 | } catch (BazaarClientException e) { |
596 | 34 | throw BazaarException.wrapException(e); | 34 | throw BazaarException.wrapException(e); |
597 | 35 | } | 35 | } |
598 | 36 | 36 | ||
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 | 71 | BranchLocation remoteLocation = getBranchLocation(); | 71 | BranchLocation remoteLocation = getBranchLocation(); |
604 | 72 | if (remoteLocation != null) { | 72 | if (remoteLocation != null) { |
605 | 73 | // 1. run regular checkout | 73 | // 1. run regular checkout |
607 | 74 | client.checkout(remoteLocation, tempFolder, new CommandProgressListener(monitor)); | 74 | client.checkout(remoteLocation, tempFolder, new CommandProgressListener(monitor), getOptions()); |
608 | 75 | // 2. copy repository folder | 75 | // 2. copy repository folder |
609 | 76 | moveFolder(tempFolder, IBzrBranch.REPOSITORY_FOLDER); | 76 | moveFolder(tempFolder, IBzrBranch.REPOSITORY_FOLDER); |
610 | 77 | // 3. copy branch folder | 77 | // 3. copy branch folder |
611 | 78 | 78 | ||
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 | 43 | monitor.setTaskName(CoreTexts.RemoveCommand_removing); | 43 | monitor.setTaskName(CoreTexts.RemoveCommand_removing); |
617 | 44 | for (IBzrBranch branch : map.keySet()) { | 44 | for (IBzrBranch branch : map.keySet()) { |
618 | 45 | IBazaarClient client = getClient(branch); | 45 | IBazaarClient client = getClient(branch); |
620 | 46 | client.remove(map.get(branch).toArray(new File[0]), IRemoveOptions.KEEP); | 46 | addOptions(IRemoveOptions.KEEP); |
621 | 47 | client.remove(map.get(branch).toArray(new File[0]), getOptions()); | ||
622 | 47 | } | 48 | } |
623 | 48 | return getIResources(resources); | 49 | return getIResources(resources); |
624 | 49 | } catch (BazaarClientException e) { | 50 | } catch (BazaarClientException e) { |
625 | 50 | 51 | ||
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 | 32 | public class ResolveCommand extends ResourceChangeCommand { | 32 | public class ResolveCommand extends ResourceChangeCommand { |
631 | 33 | 33 | ||
632 | 34 | private final IBzrLocalResource[] resources; | 34 | private final IBzrLocalResource[] resources; |
633 | 35 | private final Option[] options; | ||
634 | 36 | 35 | ||
635 | 37 | /** | 36 | /** |
636 | 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) |
637 | @@ -48,7 +47,7 @@ | |||
638 | 48 | */ | 47 | */ |
639 | 49 | public ResolveCommand(IBzrLocalResource[] bzrResources, Option...options) { | 48 | public ResolveCommand(IBzrLocalResource[] bzrResources, Option...options) { |
640 | 50 | this.resources = bzrResources; | 49 | this.resources = bzrResources; |
642 | 51 | this.options = options; | 50 | addOptions(options); |
643 | 52 | } | 51 | } |
644 | 53 | 52 | ||
645 | 54 | public ResolveCommand(Collection<IResource> resources, Option...options) { | 53 | public ResolveCommand(Collection<IResource> resources, Option...options) { |
646 | @@ -81,7 +80,7 @@ | |||
647 | 81 | monitor.beginTask("Resolving", map.keySet().size()); | 80 | monitor.beginTask("Resolving", map.keySet().size()); |
648 | 82 | for (IBzrBranch branch : map.keySet()) { | 81 | for (IBzrBranch branch : map.keySet()) { |
649 | 83 | IBazaarClient client = getClient(branch); | 82 | IBazaarClient client = getClient(branch); |
651 | 84 | client.resolve(map.get(branch), options); | 83 | client.resolve(map.get(branch), getOptions()); |
652 | 85 | monitor.worked(1); | 84 | monitor.worked(1); |
653 | 86 | } | 85 | } |
654 | 87 | List<IResource> changed = new ArrayList<IResource>(resources.length); | 86 | List<IResource> changed = new ArrayList<IResource>(resources.length); |
655 | 88 | 87 | ||
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 | 32 | */ | 32 | */ |
661 | 33 | public class RevertCommand extends ResourceChangeCommand { | 33 | public class RevertCommand extends ResourceChangeCommand { |
662 | 34 | private List<IBzrLocalResource> resources; | 34 | private List<IBzrLocalResource> resources; |
663 | 35 | private Option[] options; | ||
664 | 36 | private boolean revertBranch; | 35 | private boolean revertBranch; |
665 | 37 | 36 | ||
666 | 38 | /** | 37 | /** |
667 | @@ -44,7 +43,7 @@ | |||
668 | 44 | public RevertCommand(List<IBzrLocalResource> resourcesToRevert, boolean revertBranch, Option[] options) { | 43 | public RevertCommand(List<IBzrLocalResource> resourcesToRevert, boolean revertBranch, Option[] options) { |
669 | 45 | super(); | 44 | super(); |
670 | 46 | this.resources = resourcesToRevert; | 45 | this.resources = resourcesToRevert; |
672 | 47 | this.options = options; | 46 | addOptions(options); |
673 | 48 | this.revertBranch = revertBranch; | 47 | this.revertBranch = revertBranch; |
674 | 49 | } | 48 | } |
675 | 50 | 49 | ||
676 | @@ -63,9 +62,9 @@ | |||
677 | 63 | for (IBzrBranch branch : map.keySet()) { | 62 | for (IBzrBranch branch : map.keySet()) { |
678 | 64 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); | 63 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); |
679 | 65 | if(revertBranch) { | 64 | if(revertBranch) { |
681 | 66 | client.revert(new File[]{branch.getFile()}, options); | 65 | client.revert(new File[]{branch.getFile()}, getOptions()); |
682 | 67 | } else { | 66 | } else { |
684 | 68 | client.revert(map.get(branch).toArray(new File[0]), options); | 67 | client.revert(map.get(branch).toArray(new File[0]), getOptions()); |
685 | 69 | } | 68 | } |
686 | 70 | resourcesToRefresh.addAll(Arrays.asList(BzrWorkspaceRoot.findProjectsInBranch(branch))); | 69 | resourcesToRefresh.addAll(Arrays.asList(BzrWorkspaceRoot.findProjectsInBranch(branch))); |
687 | 71 | } | 70 | } |
688 | 72 | 71 | ||
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 | 28 | 28 | ||
694 | 29 | private final IBzrLocalResource resource; | 29 | private final IBzrLocalResource resource; |
695 | 30 | private IBazaarAnnotation annotation; | 30 | private IBazaarAnnotation annotation; |
696 | 31 | private Option[] options; | ||
697 | 32 | private BranchLocation branchLocation; | 31 | private BranchLocation branchLocation; |
698 | 33 | 32 | ||
699 | 34 | 33 | ||
700 | 35 | public SendCommand(IBzrLocalResource bzrResource, Option[] options, BranchLocation branchLocation) { | 34 | public SendCommand(IBzrLocalResource bzrResource, Option[] options, BranchLocation branchLocation) { |
701 | 36 | this.resource = bzrResource; | 35 | this.resource = bzrResource; |
703 | 37 | this.options = options; | 36 | addOptions(options); |
704 | 38 | this.branchLocation = branchLocation; | 37 | this.branchLocation = branchLocation; |
705 | 39 | } | 38 | } |
706 | 40 | 39 | ||
707 | @@ -48,7 +47,7 @@ | |||
708 | 48 | monitor.beginTask(CoreTexts.SendCommand_send, 1000); | 47 | monitor.beginTask(CoreTexts.SendCommand_send, 1000); |
709 | 49 | IBazaarClient client = getClient(resource.getBranch()); | 48 | IBazaarClient client = getClient(resource.getBranch()); |
710 | 50 | 49 | ||
712 | 51 | client.send(branchLocation, options); | 50 | client.send(branchLocation, getOptions()); |
713 | 52 | 51 | ||
714 | 53 | } catch (BazaarClientException e) { | 52 | } catch (BazaarClientException e) { |
715 | 54 | throw BazaarException.wrapException(e, resource.getIResource()); | 53 | throw BazaarException.wrapException(e, resource.getIResource()); |
716 | 55 | 54 | ||
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 | 30 | public class ShelveCommand extends ResourceChangeCommand { | 30 | public class ShelveCommand extends ResourceChangeCommand { |
722 | 31 | 31 | ||
723 | 32 | private List<IBzrLocalResource> resources; | 32 | private List<IBzrLocalResource> resources; |
724 | 33 | private Option[] options; | ||
725 | 34 | private boolean shelveBranch; | 33 | private boolean shelveBranch; |
726 | 35 | 34 | ||
727 | 36 | public ShelveCommand(List<IBzrLocalResource> resourcesToShelve, boolean shelveBranch, Option[] options) { | 35 | public ShelveCommand(List<IBzrLocalResource> resourcesToShelve, boolean shelveBranch, Option[] options) { |
728 | 37 | this.resources = resourcesToShelve; | 36 | this.resources = resourcesToShelve; |
729 | 38 | this.shelveBranch = shelveBranch; | 37 | this.shelveBranch = shelveBranch; |
731 | 39 | this.options = options; | 38 | addOptions(options); |
732 | 40 | } | 39 | } |
733 | 41 | 40 | ||
734 | 42 | @Override | 41 | @Override |
735 | @@ -48,9 +47,9 @@ | |||
736 | 48 | for (IBzrBranch branch : map.keySet()) { | 47 | for (IBzrBranch branch : map.keySet()) { |
737 | 49 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); | 48 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); |
738 | 50 | if (shelveBranch) { | 49 | if (shelveBranch) { |
740 | 51 | client.shelve(new File[0], options); | 50 | client.shelve(new File[0], getOptions()); |
741 | 52 | } else { | 51 | } else { |
743 | 53 | client.shelve(map.get(branch).toArray(new File[0]), options); | 52 | client.shelve(map.get(branch).toArray(new File[0]), getOptions()); |
744 | 54 | } | 53 | } |
745 | 55 | resourcesToRefresh.addAll(Arrays.asList(BzrWorkspaceRoot.findProjectsInBranch(branch))); | 54 | resourcesToRefresh.addAll(Arrays.asList(BzrWorkspaceRoot.findProjectsInBranch(branch))); |
746 | 56 | } | 55 | } |
747 | 57 | 56 | ||
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 | 34 | try { | 34 | try { |
753 | 35 | monitor.beginTask(CoreTexts.ShelveListCommand_taskName, 100); | 35 | monitor.beginTask(CoreTexts.ShelveListCommand_taskName, 100); |
754 | 36 | IBazaarClient client = getClient(branch, true); | 36 | IBazaarClient client = getClient(branch, true); |
756 | 37 | shelves = client.shelveList(); | 37 | shelves = client.shelveList(getOptions()); |
757 | 38 | monitor.worked(100); | 38 | monitor.worked(100); |
758 | 39 | } catch (BazaarClientException e) { | 39 | } catch (BazaarClientException e) { |
759 | 40 | throw BazaarException.wrapException(e); | 40 | throw BazaarException.wrapException(e); |
760 | 41 | 41 | ||
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 | 33 | import org.vcs.bazaar.client.IBazaarRevisionSpec; | 33 | import org.vcs.bazaar.client.IBazaarRevisionSpec; |
766 | 34 | import org.vcs.bazaar.client.IBazaarStatus; | 34 | import org.vcs.bazaar.client.IBazaarStatus; |
767 | 35 | import org.vcs.bazaar.client.commandline.commands.options.KeywordOption; | 35 | import org.vcs.bazaar.client.commandline.commands.options.KeywordOption; |
768 | 36 | import org.vcs.bazaar.client.commandline.commands.options.Option; | ||
769 | 37 | import org.vcs.bazaar.client.commandline.syntax.IStatusOptions; | 36 | import org.vcs.bazaar.client.commandline.syntax.IStatusOptions; |
770 | 38 | import org.vcs.bazaar.client.core.BazaarClientException; | 37 | import org.vcs.bazaar.client.core.BazaarClientException; |
771 | 39 | import org.vcs.bazaar.eclipse.BzrWorkspaceRoot; | 38 | import org.vcs.bazaar.eclipse.BzrWorkspaceRoot; |
772 | @@ -59,7 +58,6 @@ | |||
773 | 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' */ |
774 | 60 | private boolean addNestedUnknown = true; | 59 | private boolean addNestedUnknown = true; |
775 | 61 | private List<IBazaarLogMessage> pendingMerges; | 60 | private List<IBazaarLogMessage> pendingMerges; |
776 | 62 | private Option[] options = new Option[0]; | ||
777 | 63 | 61 | ||
778 | 64 | /** | 62 | /** |
779 | 65 | * Invoked by StatusCommand | 63 | * Invoked by StatusCommand |
780 | @@ -84,7 +82,7 @@ | |||
781 | 84 | 82 | ||
782 | 85 | public StatusCommand(IBzrLocalResource[] resources, IBazaarRevisionSpec revision) { | 83 | public StatusCommand(IBzrLocalResource[] resources, IBazaarRevisionSpec revision) { |
783 | 86 | this(resources, true); | 84 | this(resources, true); |
785 | 87 | options = new KeywordOption[]{new KeywordOption(IStatusOptions.REVISION.getOption(), revision.toString())}; | 85 | addOptions(new KeywordOption(IStatusOptions.REVISION.getOption(), revision.toString())); |
786 | 88 | } | 86 | } |
787 | 89 | 87 | ||
788 | 90 | /* | 88 | /* |
789 | @@ -135,7 +133,7 @@ | |||
790 | 135 | */ | 133 | */ |
791 | 136 | private void executeAndFilterLogOutput(final IBzrBranch branch, File[] files) throws BazaarClientException, CoreException { | 134 | private void executeAndFilterLogOutput(final IBzrBranch branch, File[] files) throws BazaarClientException, CoreException { |
792 | 137 | IBazaarClient client = getClient(branch, noLog); | 135 | IBazaarClient client = getClient(branch, noLog); |
794 | 138 | BazaarTreeStatus treeStatus = client.status(files, options); | 136 | BazaarTreeStatus treeStatus = client.status(files, getOptions()); |
795 | 139 | pendingMerges = treeStatus.getPendingMerges(); | 137 | pendingMerges = treeStatus.getPendingMerges(); |
796 | 140 | IBazaarStatus[] statuses = treeStatus.getStatusAsArray(); | 138 | IBazaarStatus[] statuses = treeStatus.getStatusAsArray(); |
797 | 141 | Set<IContainer> unknown = new HashSet<IContainer>(); | 139 | Set<IContainer> unknown = new HashSet<IContainer>(); |
798 | 142 | 140 | ||
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 | 8 | package org.vcs.bazaar.eclipse.core.commands; | 8 | package org.vcs.bazaar.eclipse.core.commands; |
804 | 9 | 9 | ||
805 | 10 | import java.io.File; | 10 | import java.io.File; |
806 | 11 | import java.util.ArrayList; | ||
807 | 12 | import java.util.HashMap; | 11 | import java.util.HashMap; |
808 | 13 | import java.util.HashSet; | 12 | import java.util.HashSet; |
809 | 14 | import java.util.List; | ||
810 | 15 | import java.util.Map; | 13 | import java.util.Map; |
811 | 16 | import java.util.Set; | 14 | import java.util.Set; |
812 | 17 | 15 | ||
813 | @@ -28,7 +26,6 @@ | |||
814 | 28 | import org.vcs.bazaar.client.IBazaarItemInfo; | 26 | import org.vcs.bazaar.client.IBazaarItemInfo; |
815 | 29 | import org.vcs.bazaar.client.IBazaarLogMessage; | 27 | import org.vcs.bazaar.client.IBazaarLogMessage; |
816 | 30 | import org.vcs.bazaar.client.IBazaarStatus; | 28 | import org.vcs.bazaar.client.IBazaarStatus; |
817 | 31 | import org.vcs.bazaar.client.commandline.commands.options.Option; | ||
818 | 32 | import org.vcs.bazaar.client.commandline.syntax.ILsOptions; | 29 | import org.vcs.bazaar.client.commandline.syntax.ILsOptions; |
819 | 33 | import org.vcs.bazaar.client.core.BazaarClientException; | 30 | import org.vcs.bazaar.client.core.BazaarClientException; |
820 | 34 | import org.vcs.bazaar.eclipse.core.model.BzrStatus; | 31 | import org.vcs.bazaar.eclipse.core.model.BzrStatus; |
821 | @@ -88,17 +85,14 @@ | |||
822 | 88 | File file = resourceToRefresh.getLocation().toFile(); | 85 | File file = resourceToRefresh.getLocation().toFile(); |
823 | 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 */ |
824 | 90 | IBazaarItemInfo[] paths; | 87 | IBazaarItemInfo[] paths; |
829 | 91 | List<Option> options = new ArrayList<Option>(); | 88 | addOptions(ILsOptions.IGNORED, ILsOptions.VERSIONED, ILsOptions.UNKNOWN); |
826 | 92 | options.add(ILsOptions.IGNORED); | ||
827 | 93 | options.add(ILsOptions.VERSIONED); | ||
828 | 94 | options.add(ILsOptions.UNKNOWN); | ||
830 | 95 | if (shallow) { | 89 | if (shallow) { |
832 | 96 | options.add(ILsOptions.NON_RECURSIVE); | 90 | addOptions(ILsOptions.NON_RECURSIVE); |
833 | 97 | } | 91 | } |
834 | 98 | if (verbose) { | 92 | if (verbose) { |
836 | 99 | options.add(ILsOptions.VERBOSE); | 93 | addOptions(ILsOptions.VERBOSE); |
837 | 100 | } | 94 | } |
839 | 101 | paths = client.ls(file, null, options.toArray(new Option[0])); | 95 | paths = client.ls(file, null, getOptions()); |
840 | 102 | /* execute st command and turn its result into a status map */ | 96 | /* execute st command and turn its result into a status map */ |
841 | 103 | BazaarTreeStatus treeStatus = client.status(new File[]{file}); | 97 | BazaarTreeStatus treeStatus = client.status(new File[]{file}); |
842 | 104 | IBazaarStatus[] statuses = treeStatus.getStatusAsArray(); | 98 | IBazaarStatus[] statuses = treeStatus.getStatusAsArray(); |
843 | 105 | 99 | ||
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 | 9 | *******************************************************************************/ | 9 | *******************************************************************************/ |
849 | 10 | package org.vcs.bazaar.eclipse.core.commands; | 10 | package org.vcs.bazaar.eclipse.core.commands; |
850 | 11 | 11 | ||
851 | 12 | import java.util.ArrayList; | ||
852 | 13 | import java.util.List; | ||
853 | 14 | |||
854 | 15 | import org.eclipse.core.resources.IResource; | 12 | import org.eclipse.core.resources.IResource; |
855 | 16 | import org.eclipse.core.runtime.IProgressMonitor; | 13 | import org.eclipse.core.runtime.IProgressMonitor; |
856 | 17 | import org.vcs.bazaar.client.IBazaarClient; | 14 | import org.vcs.bazaar.client.IBazaarClient; |
857 | 18 | import org.vcs.bazaar.client.commandline.commands.options.Option; | ||
858 | 19 | import org.vcs.bazaar.client.commandline.syntax.ISwitchOptions; | 15 | import org.vcs.bazaar.client.commandline.syntax.ISwitchOptions; |
859 | 20 | import org.vcs.bazaar.client.core.BazaarClientException; | 16 | import org.vcs.bazaar.client.core.BazaarClientException; |
860 | 21 | import org.vcs.bazaar.client.core.BranchLocation; | 17 | import org.vcs.bazaar.client.core.BranchLocation; |
861 | @@ -47,14 +43,13 @@ | |||
862 | 47 | monitor.beginTask(CoreTexts.bind(CoreTexts.SwitchCommand_taskName, location.toString()), 100); | 43 | monitor.beginTask(CoreTexts.bind(CoreTexts.SwitchCommand_taskName, location.toString()), 100); |
863 | 48 | monitor.setTaskName(CoreTexts.bind(CoreTexts.SwitchCommand_taskName, location.toString())); | 44 | monitor.setTaskName(CoreTexts.bind(CoreTexts.SwitchCommand_taskName, location.toString())); |
864 | 49 | IBazaarClient client = getClient(branch); | 45 | IBazaarClient client = getClient(branch); |
865 | 50 | List<Option> options = new ArrayList<Option>(0); | ||
866 | 51 | if (force) { | 46 | if (force) { |
868 | 52 | options.add(ISwitchOptions.FORCE); | 47 | addOptions(ISwitchOptions.FORCE); |
869 | 53 | } | 48 | } |
870 | 54 | if (createBranch) { | 49 | if (createBranch) { |
872 | 55 | options.add(ISwitchOptions.CREATE_BRANCH); | 50 | addOptions(ISwitchOptions.CREATE_BRANCH); |
873 | 56 | } | 51 | } |
875 | 57 | client.switchBranch(location, new CommandProgressListener(monitor), options.toArray(new Option[options.size()])); | 52 | client.switchBranch(location, new CommandProgressListener(monitor), getOptions()); |
876 | 58 | return BzrWorkspaceRoot.findProjectsInBranch(branch); | 53 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
877 | 59 | } catch (BazaarClientException e) { | 54 | } catch (BazaarClientException e) { |
878 | 60 | throw BazaarException.wrapException(e); | 55 | throw BazaarException.wrapException(e); |
879 | 61 | 56 | ||
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 | 22 | 22 | ||
885 | 23 | private final IBzrBranch branch; | 23 | private final IBzrBranch branch; |
886 | 24 | private final String tagName; | 24 | private final String tagName; |
887 | 25 | private final Option[] options; | ||
888 | 26 | 25 | ||
889 | 27 | public TagCommand(IBzrBranch branch, String tagName, Option[] options) { | 26 | public TagCommand(IBzrBranch branch, String tagName, Option[] options) { |
890 | 28 | this.branch = branch; | 27 | this.branch = branch; |
891 | 29 | this.tagName = tagName; | 28 | this.tagName = tagName; |
893 | 30 | this.options = options; | 29 | addOptions(options); |
894 | 31 | } | 30 | } |
895 | 32 | 31 | ||
896 | 33 | @Override | 32 | @Override |
897 | @@ -36,7 +35,7 @@ | |||
898 | 36 | monitor.beginTask(CoreTexts.bind(CoreTexts.TagCommand_taskName, branch.getName()), 100); | 35 | monitor.beginTask(CoreTexts.bind(CoreTexts.TagCommand_taskName, branch.getName()), 100); |
899 | 37 | monitor.setTaskName(CoreTexts.bind(CoreTexts.TagCommand_taskName, branch.getName())); | 36 | monitor.setTaskName(CoreTexts.bind(CoreTexts.TagCommand_taskName, branch.getName())); |
900 | 38 | IBazaarClient client = getClient(branch); | 37 | IBazaarClient client = getClient(branch); |
902 | 39 | client.tag(tagName, options); | 38 | client.tag(tagName, getOptions()); |
903 | 40 | } catch (BazaarClientException e) { | 39 | } catch (BazaarClientException e) { |
904 | 41 | throw BazaarException.wrapException(e); | 40 | throw BazaarException.wrapException(e); |
905 | 42 | } finally { | 41 | } finally { |
906 | 43 | 42 | ||
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 | 36 | monitor.beginTask(CoreTexts.UnBindCommand_taskName, 1000); | 36 | monitor.beginTask(CoreTexts.UnBindCommand_taskName, 1000); |
912 | 37 | monitor.setTaskName(CoreTexts.UnBindCommand_taskName); | 37 | monitor.setTaskName(CoreTexts.UnBindCommand_taskName); |
913 | 38 | IBazaarClient client = getClient(branch); | 38 | IBazaarClient client = getClient(branch); |
915 | 39 | client.unBind(); | 39 | client.unBind(getOptions()); |
916 | 40 | monitor.worked(1000); | 40 | monitor.worked(1000); |
917 | 41 | return BzrWorkspaceRoot.findProjectsInBranch(branch); | 41 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
918 | 42 | } catch (BazaarClientException e) { | 42 | } catch (BazaarClientException e) { |
919 | 43 | 43 | ||
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 | 34 | try { | 34 | try { |
925 | 35 | monitor.beginTask(CoreTexts.UnCommitCommand_unCommiting, 100); | 35 | monitor.beginTask(CoreTexts.UnCommitCommand_unCommiting, 100); |
926 | 36 | monitor.setTaskName(CoreTexts.UnCommitCommand_unCommiting); | 36 | monitor.setTaskName(CoreTexts.UnCommitCommand_unCommiting); |
928 | 37 | BzrWorkspaceRoot.getClient(branch).unCommit(branch.getPath().toFile()); | 37 | BzrWorkspaceRoot.getClient(branch).unCommit(branch.getPath().toFile(), getOptions()); |
929 | 38 | monitor.worked(100); | 38 | monitor.worked(100); |
930 | 39 | return BzrWorkspaceRoot.findProjectsInBranch(branch); | 39 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
931 | 40 | } catch (BazaarClientException e) { | 40 | } catch (BazaarClientException e) { |
932 | 41 | 41 | ||
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 | 24 | 24 | ||
938 | 25 | private IBzrBranch branch; | 25 | private IBzrBranch branch; |
939 | 26 | private String shelfId; | 26 | private String shelfId; |
940 | 27 | private Option[] options; | ||
941 | 28 | 27 | ||
942 | 29 | public UnShelveCommand(IBzrBranch branch, String shelfId, Option[] options) { | 28 | public UnShelveCommand(IBzrBranch branch, String shelfId, Option[] options) { |
943 | 30 | this.branch = branch; | 29 | this.branch = branch; |
944 | 31 | this.shelfId = shelfId; | 30 | this.shelfId = shelfId; |
946 | 32 | this.options = options; | 31 | addOptions(options); |
947 | 33 | } | 32 | } |
948 | 34 | 33 | ||
949 | 35 | @Override | 34 | @Override |
950 | @@ -38,7 +37,7 @@ | |||
951 | 38 | monitor.beginTask(CoreTexts.UnShelveCommand_taskName, 100); | 37 | monitor.beginTask(CoreTexts.UnShelveCommand_taskName, 100); |
952 | 39 | monitor.setTaskName(CoreTexts.UnShelveCommand_taskName); | 38 | monitor.setTaskName(CoreTexts.UnShelveCommand_taskName); |
953 | 40 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); | 39 | IBazaarClient client = BzrWorkspaceRoot.getClient(branch); |
955 | 41 | client.unShelve(shelfId, options); | 40 | client.unShelve(shelfId, getOptions()); |
956 | 42 | monitor.worked(100); | 41 | monitor.worked(100); |
957 | 43 | return BzrWorkspaceRoot.findProjectsInBranch(branch); | 42 | return BzrWorkspaceRoot.findProjectsInBranch(branch); |
958 | 44 | } catch (BazaarClientException e) { | 43 | } catch (BazaarClientException e) { |
959 | 45 | 44 | ||
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 | 36 | monitor.beginTask("Update command", 100); | 36 | monitor.beginTask("Update command", 100); |
965 | 37 | monitor.setTaskName("Updating"); | 37 | monitor.setTaskName("Updating"); |
966 | 38 | IBazaarClient client = getClient(branch); | 38 | IBazaarClient client = getClient(branch); |
968 | 39 | client.update(branch.getFile(), new CommandProgressListener(monitor)); | 39 | client.update(branch.getFile(), new CommandProgressListener(monitor), getOptions()); |
969 | 40 | } catch (BazaarClientException e) { | 40 | } catch (BazaarClientException e) { |
970 | 41 | if (!setPostCommandErrorOnConflicts(e.getMessage())) { | 41 | if (!setPostCommandErrorOnConflicts(e.getMessage())) { |
971 | 42 | throw BazaarException.wrapException(e); | 42 | throw BazaarException.wrapException(e); |
972 | 43 | 43 | ||
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 | 77 | public static String BazaarPreferencesPage_disable_logs; | 77 | public static String BazaarPreferencesPage_disable_logs; |
978 | 78 | public static String BazaarPreferencesPage_xmlrpc_port; | 78 | public static String BazaarPreferencesPage_xmlrpc_port; |
979 | 79 | public static String BazaarPreferencesPage_client_type; | 79 | public static String BazaarPreferencesPage_client_type; |
980 | 80 | public static String BazaarPreferencesPage_ignore_ssl_errors; | ||
981 | 80 | 81 | ||
982 | 81 | // Console preferences | 82 | // Console preferences |
983 | 82 | public static String BazaarConsole_name; | 83 | public static String BazaarConsole_name; |
984 | 83 | 84 | ||
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 | 154 | final List<IBzrLocalResource> filesToCommit = getResources(commitDialog.getSelectedFiles()); | 154 | final List<IBzrLocalResource> filesToCommit = getResources(commitDialog.getSelectedFiles()); |
990 | 155 | final String commitText = commitDialog.getCommitMessage(); | 155 | final String commitText = commitDialog.getCommitMessage(); |
991 | 156 | final boolean pushAfterCommit = commitDialog.isPushAfterCommit(); | 156 | final boolean pushAfterCommit = commitDialog.isPushAfterCommit(); |
993 | 157 | final List<Option> options = commitDialog.getOptions(); | 157 | final Option[] options = commitDialog.getOptions().toArray(new Option[0]); |
994 | 158 | final boolean fullRefresh = !getUnknownOrAddedResources(commitDialog.getSelectedFiles()).isEmpty(); | 158 | final boolean fullRefresh = !getUnknownOrAddedResources(commitDialog.getSelectedFiles()).isEmpty(); |
995 | 159 | Job job = new Job("Running commit") { | 159 | Job job = new Job("Running commit") { |
996 | 160 | @Override | 160 | @Override |
997 | @@ -174,9 +174,9 @@ | |||
998 | 174 | if(commitableResources.getAllPendingMerges().size() > 0) { | 174 | if(commitableResources.getAllPendingMerges().size() > 0) { |
999 | 175 | // commit all modified files (including unknowns) | 175 | // commit all modified files (including unknowns) |
1000 | 176 | // currently we do this, by committing without passing any file to the commit cmd | 176 | // currently we do this, by committing without passing any file to the commit cmd |
1002 | 177 | commitCmd = new CommitCommand(filesToCommit, commitText, options, true, true); | 177 | commitCmd = new CommitCommand(filesToCommit, commitText, true, true, options); |
1003 | 178 | } else { | 178 | } else { |
1005 | 179 | commitCmd = new CommitCommand(filesToCommit, commitText, options, false, fullRefresh); | 179 | commitCmd = new CommitCommand(filesToCommit, commitText, false, fullRefresh, options); |
1006 | 180 | } | 180 | } |
1007 | 181 | commitCmd.run(EclipseBazaarCore.subProgressMonitorFor(monitor)); | 181 | commitCmd.run(EclipseBazaarCore.subProgressMonitorFor(monitor)); |
1008 | 182 | } | 182 | } |
1009 | 183 | 183 | ||
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 | 72 | createXmlRpClientConfigControl(); | 72 | createXmlRpClientConfigControl(); |
1015 | 73 | disableLogs = new BooleanFieldEditor(IBazaarCoreConstants.DISABLE_LOGS, UITexts.BazaarPreferencesPage_disable_logs, getFieldEditorParent()); | 73 | disableLogs = new BooleanFieldEditor(IBazaarCoreConstants.DISABLE_LOGS, UITexts.BazaarPreferencesPage_disable_logs, getFieldEditorParent()); |
1016 | 74 | addField(disableLogs); | 74 | addField(disableLogs); |
1017 | 75 | addField(new BooleanFieldEditor(IBazaarCoreConstants.IGNORE_SSL_ERRORS, UITexts.BazaarPreferencesPage_ignore_ssl_errors, getFieldEditorParent())); | ||
1018 | 75 | executable.getTextControl(getFieldEditorParent()).setEditable(false); | 76 | executable.getTextControl(getFieldEditorParent()).setEditable(false); |
1019 | 76 | email.getTextControl(getFieldEditorParent()).setEnabled(getPreferenceStore().getBoolean(IBazaarCoreConstants.OVERWRITE_EMAIL)); | 77 | email.getTextControl(getFieldEditorParent()).setEnabled(getPreferenceStore().getBoolean(IBazaarCoreConstants.OVERWRITE_EMAIL)); |
1020 | 77 | } | 78 | } |
1021 | 78 | 79 | ||
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 | 78 | BazaarPreferencesPage_disable_logs=&Disable logging to file (.bzr.log) | 78 | BazaarPreferencesPage_disable_logs=&Disable logging to file (.bzr.log) |
1027 | 79 | BazaarPreferencesPage_xmlrpc_port=XMLRpc service port | 79 | BazaarPreferencesPage_xmlrpc_port=XMLRpc service port |
1028 | 80 | BazaarPreferencesPage_client_type=Client type: | 80 | BazaarPreferencesPage_client_type=Client type: |
1029 | 81 | BazaarPreferencesPage_ignore_ssl_errors=Ignore SSL certificate errors for this workspace | ||
1030 | 81 | 82 | ||
1031 | 82 | #Console | 83 | #Console |
1032 | 83 | BazaarConsole_name=Bazaar Console | 84 | BazaarConsole_name=Bazaar Console |
1033 | 84 | 85 | ||
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 | 182 | } | 182 | } |
1039 | 183 | if (projectToUse != null) { | 183 | if (projectToUse != null) { |
1040 | 184 | op = new CreateBazaarProjectOperation(getContainer(), tempFolder, projectToUse); | 184 | op = new CreateBazaarProjectOperation(getContainer(), tempFolder, projectToUse); |
1041 | 185 | op.run(); | ||
1042 | 185 | } | 186 | } |
1043 | 186 | } else { | 187 | } else { |
1044 | 187 | op = new CreateBazaarProjectOperation(getContainer(), tempFolder, | 188 | op = new CreateBazaarProjectOperation(getContainer(), tempFolder, |
1045 | 188 | wizard.getProjectName(), wizard.getProjectLocation(), wizard.getWizardType() == ProjectWizardType.IMPORT_EXISTING); | 189 | wizard.getProjectName(), wizard.getProjectLocation(), wizard.getWizardType() == ProjectWizardType.IMPORT_EXISTING); |
1046 | 190 | op.run(); | ||
1047 | 189 | } | 191 | } |
1048 | 190 | op.run(); | ||
1049 | 191 | } | 192 | } |
1050 | 192 | // Clean up the mess | 193 | // Clean up the mess |
1051 | 193 | if (op == null) { | 194 | if (op == null) { |
Reviewed by Piotr over email