Merge lp:~ggascoigne/bzr4j/bzr4j into lp:bzr4j
- bzr4j
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~ggascoigne/bzr4j/bzr4j |
Merge into: | lp:bzr4j |
Diff against target: |
1394 lines (+374/-199) 29 files modified
BUILDING.txt (+3/-0) modules/core/pom.xml (+2/-1) modules/intellij/pom.xml (+40/-32) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrFileRevision.java (+19/-7) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrIncomingStatusUpdater.java (+2/-1) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrOutgoingStatusUpdater.java (+2/-1) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrRevisionNumber.java (+3/-11) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrVcs.java (+7/-0) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrAbstractGlobalAction.java (+7/-6) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrCommandResultNotifier.java (+2/-1) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrAnnotateCommand.java (+4/-1) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPullCommand.java (+2/-2) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPushCommand.java (+2/-2) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/ShellCommandService.java (+2/-4) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/BzrChangeProvider.java (+43/-12) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/BzrHistoryProvider.java (+12/-8) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotation.java (+67/-32) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLine.java (+23/-0) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationProvider.java (+7/-5) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCheckinEnvironment.java (+10/-1) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCommitSession.java (+5/-1) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationIdePanel.java (+16/-17) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationProjectPanel.java (+7/-7) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrIntegrateDialog.java (+19/-26) modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrSendErrorForm.java (+16/-16) modules/intellij/src/main/resources/META-INF/plugin.xml (+10/-2) modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLineTest.java (+39/-0) modules/teamcity/pom.xml (+1/-1) pom.xml (+2/-2) |
To merge this branch: | bzr merge lp:~ggascoigne/bzr4j/bzr4j |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Patrick Woodworth | Pending | ||
Review via email: mp+118270@code.launchpad.net |
Commit message
Description of the change
I think that this is a complete roll up merge of all of the proposed changes to this branch as well as my latest changed to support Idea 12.
- 65. By Guy Gascoigne-Piggford
-
Add methods to fix compilation against IntelliJ IDEA 12.1
Bumped version number to 2.6.4
Unmerged revisions
- 65. By Guy Gascoigne-Piggford
-
Add methods to fix compilation against IntelliJ IDEA 12.1
Bumped version number to 2.6.4 - 64. By Guy Gascoigne-Piggford
-
Add methods to fix compilation against IntelliJ IDEA 12.0
Bumped version number to 2.6.3
Bumped minimum idea version up to 120.00 - 63. By Guy Gascoigne-Piggford
-
Fix annotations. Previously they just showed the check in number by default, and gave a fairly verbose additional information.
Default:
5 *With Additional Info:
revno:62 20120415 francis 5 *Now the date format matches that of the command line, the revision # is trimmed. You can also select the element that you wish to display from the context menu.
Default:
62 2012-04-15 francis 5 *The additional info option shows all fields, the normal has configurable fields.
- 62. By Francis Devereux
-
Add methods to BzrCheckinEnvir
onment to fix compilation against IntelliJ IDEA 11.1 - 61. By Harry Hirsch
-
Honour branch boundaries when determining ignored/unversion status of files
- 60. By Francis Devereux
-
Update <change-notes> in plugin.xml and bump version to 2.6.2-SNAPSHOT
- 59. By Francis Devereux
-
Add methods to BzrAnnotation to fix compilation against IntelliJ IDEA 11.0
- 58. By Francis Devereux
-
Add Set<String> feedback argument to BzrCheckinEnvir
onment. commit so that it compiles against IntelliJ IDEA 11.0 - 57. By Francis Devereux
-
Form changes made automatically when building with IntelliJ 11.0
- 56. By Francis Devereux
-
Update BzrFileRevision to compile against IntelliJ IDEA 11.0 SDK and to use ContentRevision
Cache
Preview Diff
1 | === modified file 'BUILDING.txt' |
2 | --- BUILDING.txt 2010-03-02 20:44:47 +0000 |
3 | +++ BUILDING.txt 2013-04-16 16:02:26 +0000 |
4 | @@ -4,6 +4,9 @@ |
5 | set BZR4J_IDEA_SDK_DIR=C:\Program Files\JetBrains\ideaIU-93.67-jdk15 |
6 | set BZR4J_TEAMCITY_SDK_DIR=C:\TeamCity |
7 | |
8 | +or: |
9 | + export BZR4J_IDEA_SDK_DIR=/Applications/IntelliJ\ IDEA\ 11\ CE.app/ |
10 | + |
11 | Build the custom maven-idea-plugin: |
12 | |
13 | pushd extras\maven-idea-plugin |
14 | |
15 | === modified file 'modules/core/pom.xml' |
16 | --- modules/core/pom.xml 2011-02-15 12:12:50 +0000 |
17 | +++ modules/core/pom.xml 2013-04-16 16:02:26 +0000 |
18 | @@ -6,7 +6,7 @@ |
19 | |
20 | <groupId>org.emergent.bzr4j</groupId> |
21 | <artifactId>bzr4j-core</artifactId> |
22 | - <version>2.6.1</version> |
23 | + <version>2.6.4-SNAPSHOT</version> |
24 | <packaging>jar</packaging> |
25 | <name>Bzr4J Core Library</name> |
26 | <url>http://launchpad.net/bzr4j</url> |
27 | @@ -62,6 +62,7 @@ |
28 | <plugins> |
29 | <plugin> |
30 | <artifactId>maven-compiler-plugin</artifactId> |
31 | + <version>2.3.2</version> |
32 | <configuration> |
33 | <source>1.5</source> |
34 | <target>1.5</target> |
35 | |
36 | === modified file 'modules/intellij/pom.xml' |
37 | --- modules/intellij/pom.xml 2011-02-15 12:12:50 +0000 |
38 | +++ modules/intellij/pom.xml 2013-04-16 16:02:26 +0000 |
39 | @@ -6,14 +6,14 @@ |
40 | |
41 | <groupId>org.emergent.bzr4j</groupId> |
42 | <artifactId>bzr4intellij</artifactId> |
43 | - <version>2.6.1</version> |
44 | + <version>2.6.4-SNAPSHOT</version> |
45 | <packaging>jar</packaging> |
46 | <name>Bzr4IntelliJ Plugin</name> |
47 | <url>http://bzr4j.emergent.org/</url> |
48 | |
49 | <properties> |
50 | <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding> |
51 | - <idea.sdk.version>93.94</idea.sdk.version> |
52 | + <idea.sdk.version>117.281</idea.sdk.version> |
53 | <idea.sdk.dir>${env.BZR4J_IDEA_SDK_DIR}</idea.sdk.dir> |
54 | </properties> |
55 | |
56 | @@ -74,9 +74,9 @@ |
57 | </dependency> |
58 | |
59 | <dependency> |
60 | - <groupId>commons-codec</groupId> |
61 | - <artifactId>commons-codec</artifactId> |
62 | - <version>1.3</version> |
63 | + <groupId>commons-codec</groupId> |
64 | + <artifactId>commons-codec</artifactId> |
65 | + <version>1.3</version> |
66 | </dependency> |
67 | |
68 | <dependency> |
69 | @@ -86,27 +86,27 @@ |
70 | </dependency> |
71 | |
72 | <dependency> |
73 | - <groupId>org.jdom</groupId> |
74 | - <artifactId>jdom</artifactId> |
75 | - <version>1.1</version> |
76 | - </dependency> |
77 | - |
78 | - <dependency> |
79 | - <groupId>org.apache.commons</groupId> |
80 | - <artifactId>commons-io</artifactId> |
81 | - <version>1.3.2</version> |
82 | - </dependency> |
83 | - |
84 | - <dependency> |
85 | - <groupId>javax.mail</groupId> |
86 | - <artifactId>mail</artifactId> |
87 | - <version>1.4.1</version> |
88 | - </dependency> |
89 | - |
90 | - <dependency> |
91 | - <groupId>javax.activation</groupId> |
92 | - <artifactId>activation</artifactId> |
93 | - <version>1.1</version> |
94 | + <groupId>org.jdom</groupId> |
95 | + <artifactId>jdom</artifactId> |
96 | + <version>1.1</version> |
97 | + </dependency> |
98 | + |
99 | + <dependency> |
100 | + <groupId>org.apache.commons</groupId> |
101 | + <artifactId>commons-io</artifactId> |
102 | + <version>1.3.2</version> |
103 | + </dependency> |
104 | + |
105 | + <dependency> |
106 | + <groupId>javax.mail</groupId> |
107 | + <artifactId>mail</artifactId> |
108 | + <version>1.4.1</version> |
109 | + </dependency> |
110 | + |
111 | + <dependency> |
112 | + <groupId>javax.activation</groupId> |
113 | + <artifactId>activation</artifactId> |
114 | + <version>1.1</version> |
115 | </dependency> |
116 | |
117 | <dependency> |
118 | @@ -116,6 +116,11 @@ |
119 | <version>5.8</version> |
120 | <scope>test</scope> |
121 | </dependency> |
122 | + <dependency> |
123 | + <groupId>org.emergent.bzr4j</groupId> |
124 | + <artifactId>bzr4j-core</artifactId> |
125 | + <version>2.6.4-SNAPSHOT</version> |
126 | + </dependency> |
127 | |
128 | </dependencies> |
129 | |
130 | @@ -141,6 +146,7 @@ |
131 | <plugins> |
132 | <plugin> |
133 | <artifactId>maven-compiler-plugin</artifactId> |
134 | + <version>2.3.2</version> |
135 | <configuration> |
136 | <source>1.5</source> |
137 | <target>${javac.target.level}</target> |
138 | @@ -178,13 +184,14 @@ |
139 | <include name="${project.artifactId}*"/> |
140 | </fileset> |
141 | </delete> |
142 | -<!-- |
143 | - <copy overwrite="true" verbose="true" preservelastmodified="true" |
144 | - file="${project.build.directory}/install-bundles/${project.artifactId}-jarbundle.jar" |
145 | - tofile="${idea.plugins.dir}/${project.artifactId}.jar"/> |
146 | ---> |
147 | + <!-- |
148 | + <copy overwrite="true" verbose="true" preservelastmodified="true" |
149 | + file="${project.build.directory}/install-bundles/${project.artifactId}-jarbundle.jar" |
150 | + tofile="${idea.plugins.dir}/${project.artifactId}.jar"/> |
151 | + --> |
152 | <copy todir="${idea.plugins.dir}" preservelastmodified="true"> |
153 | - <zipfileset src="${project.build.directory}/install-bundles/bzr4intellij-zipbundle.zip"/> |
154 | + <zipfileset |
155 | + src="${project.build.directory}/install-bundles/bzr4intellij-zipbundle.zip"/> |
156 | </copy> |
157 | </tasks> |
158 | </configuration> |
159 | @@ -196,6 +203,7 @@ |
160 | </plugin> |
161 | <plugin> |
162 | <artifactId>maven-clean-plugin</artifactId> |
163 | + <version>2.4.1</version> |
164 | <configuration> |
165 | <filesets> |
166 | <fileset> |
167 | |
168 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrFileRevision.java' |
169 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrFileRevision.java 2010-03-02 20:44:47 +0000 |
170 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrFileRevision.java 2013-04-16 16:02:26 +0000 |
171 | @@ -1,9 +1,11 @@ |
172 | package org.emergent.bzr4j.intellij; |
173 | |
174 | -import com.intellij.openapi.diagnostic.Logger; |
175 | import com.intellij.openapi.project.Project; |
176 | +import com.intellij.openapi.util.Throwable2Computable; |
177 | +import com.intellij.openapi.vcs.RepositoryLocation; |
178 | import com.intellij.openapi.vcs.VcsException; |
179 | import com.intellij.openapi.vcs.history.VcsFileRevision; |
180 | +import com.intellij.openapi.vcs.impl.ContentRevisionCache; |
181 | import org.apache.commons.lang.builder.EqualsBuilder; |
182 | import org.apache.commons.lang.builder.HashCodeBuilder; |
183 | import org.emergent.bzr4j.core.utils.StringUtil; |
184 | @@ -24,7 +26,6 @@ |
185 | private final Date revisionDate; |
186 | private final String author; |
187 | private final String commitMessage; |
188 | - private byte[] content; |
189 | |
190 | public BzrFileRevision(Project project, BzrFile file, BzrRevisionNumber revisionNumber, |
191 | String branchName, String revisionDate, String author, String commitMessage) throws ParseException { |
192 | @@ -62,22 +63,28 @@ |
193 | return commitMessage; |
194 | } |
195 | |
196 | - public void loadContent() throws VcsException { |
197 | + public byte[] loadContent() throws VcsException { |
198 | try { |
199 | Charset charset = m_file.toFilePath().getCharset(); |
200 | String result = new BzrCatCommand(m_project).execute(m_file, m_revisionNumber, charset); |
201 | if (result == null) { |
202 | - content = new byte[0]; |
203 | + return new byte[0]; |
204 | } else { |
205 | - content = result.getBytes(charset.name()); |
206 | + return result.getBytes(charset.name()); |
207 | } |
208 | } catch (UnsupportedEncodingException e) { |
209 | throw new VcsException(e); |
210 | } |
211 | } |
212 | |
213 | - public byte[] getContent() throws IOException { |
214 | - return content; |
215 | + public byte[] getContent() throws IOException, VcsException { |
216 | + return ContentRevisionCache.getOrLoadAsBytes(m_project, m_file.toFilePath(), getRevisionNumber(), BzrVcs.getKey(), |
217 | + ContentRevisionCache.UniqueType.REPOSITORY_CONTENT, |
218 | + new Throwable2Computable<byte[], VcsException, IOException>() { |
219 | + public byte[] compute() throws VcsException, IOException { |
220 | + return loadContent(); |
221 | + } |
222 | + }); |
223 | } |
224 | |
225 | @Override |
226 | @@ -102,4 +109,9 @@ |
227 | .append(m_revisionNumber, that.m_revisionNumber) |
228 | .isEquals(); |
229 | } |
230 | + |
231 | + @Override |
232 | + public RepositoryLocation getChangedRepositoryPath() { |
233 | + return null; // use initial url.. |
234 | + } |
235 | } |
236 | |
237 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrIncomingStatusUpdater.java' |
238 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrIncomingStatusUpdater.java 2010-01-05 02:18:38 +0000 |
239 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrIncomingStatusUpdater.java 2013-04-16 16:02:26 +0000 |
240 | @@ -50,7 +50,8 @@ |
241 | VcsRoot[] roots = ProjectLevelVcsManager.getInstance(project).getAllVcsRoots(); |
242 | List<BzrFileRevision> changesets = new LinkedList<BzrFileRevision>(); |
243 | for (VcsRoot root : roots) { |
244 | - BzrFile hgFile = new BzrFile(root.path, new File(".")); |
245 | + @SuppressWarnings("ConstantConditions") |
246 | + BzrFile hgFile = new BzrFile(root.getPath(), new File(".")); |
247 | changesets.addAll(command.execute(hgFile, LIMIT - changesets.size())); |
248 | } |
249 | status.setChanges(changesets.size(), new IncomingChangesetFormatter(changesets)); |
250 | |
251 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrOutgoingStatusUpdater.java' |
252 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrOutgoingStatusUpdater.java 2010-01-05 02:18:38 +0000 |
253 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrOutgoingStatusUpdater.java 2013-04-16 16:02:26 +0000 |
254 | @@ -50,7 +50,8 @@ |
255 | VcsRoot[] roots = ProjectLevelVcsManager.getInstance(project).getAllVcsRoots(); |
256 | List<BzrFileRevision> outgoing = new LinkedList<BzrFileRevision>(); |
257 | for (VcsRoot root : roots) { |
258 | - BzrFile hgFile = new BzrFile(root.path, new File(".")); |
259 | + @SuppressWarnings("ConstantConditions") |
260 | + BzrFile hgFile = new BzrFile(root.getPath(), new File(".")); |
261 | outgoing.addAll(command.execute(hgFile, LIMIT - outgoing.size())); |
262 | } |
263 | status.setChanges(outgoing.size(), new OutgoingChangesetFormatter(outgoing)); |
264 | |
265 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrRevisionNumber.java' |
266 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrRevisionNumber.java 2010-03-02 20:44:47 +0000 |
267 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrRevisionNumber.java 2013-04-16 16:02:26 +0000 |
268 | @@ -24,9 +24,9 @@ |
269 | |
270 | private BzrRevisionNumber(@NotNull String rev) { |
271 | m_rev = rev; |
272 | - if (rev.length() > 0 && rev.indexOf(':') < 0) { |
273 | - m_rev = "revno:" + m_rev; |
274 | - } |
275 | +// if (rev.length() > 0 && rev.indexOf(':') < 0) { |
276 | +// m_rev = "revno:" + m_rev; |
277 | +// } |
278 | } |
279 | |
280 | public String asString() { |
281 | @@ -42,13 +42,6 @@ |
282 | return -1; |
283 | } |
284 | |
285 | -// BzrRevisionNumber hgRevisionNumber = (BzrRevisionNumber)o; |
286 | -// if (changeset.equals(hgRevisionNumber.changeset)) { |
287 | -// return 0; |
288 | -// } |
289 | - |
290 | -// return revision.compareTo(hgRevisionNumber.revision); |
291 | - |
292 | return NaturalOrderComparator.compareObjects(asString(), o.asString()); |
293 | } |
294 | |
295 | @@ -61,7 +54,6 @@ |
296 | public int hashCode() { |
297 | return new HashCodeBuilder() |
298 | .append(m_rev) |
299 | -// .append(changeset) |
300 | .toHashCode(); |
301 | } |
302 | |
303 | |
304 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrVcs.java' |
305 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrVcs.java 2011-01-22 16:02:47 +0000 |
306 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrVcs.java 2013-04-16 16:02:26 +0000 |
307 | @@ -33,6 +33,7 @@ |
308 | import com.intellij.openapi.vcs.AbstractVcs; |
309 | import com.intellij.openapi.vcs.ProjectLevelVcsManager; |
310 | import com.intellij.openapi.vcs.VcsException; |
311 | +import com.intellij.openapi.vcs.VcsKey; |
312 | import com.intellij.openapi.vcs.annotate.AnnotationProvider; |
313 | import com.intellij.openapi.vcs.changes.ChangeListManager; |
314 | import com.intellij.openapi.vcs.changes.ChangeProvider; |
315 | @@ -90,6 +91,8 @@ |
316 | |
317 | public static final String VCS_METADATA_DIR = ".bzr"; |
318 | |
319 | + private final static VcsKey ourKey = createKey(VCS_NAME); |
320 | + |
321 | public static final Topic<BzrUpdater> BRANCH_TOPIC = new Topic<BzrUpdater>("bzr4intellij.branch", BzrUpdater.class); |
322 | public static final Topic<BzrUpdater> INCOMING_TOPIC = |
323 | new Topic<BzrUpdater>("bzr4intellij.incoming", BzrUpdater.class); |
324 | @@ -488,4 +491,8 @@ |
325 | public BzrRootTracker getMyRootTracker() { |
326 | return myRootTracker; |
327 | } |
328 | + |
329 | + public static VcsKey getKey() { |
330 | + return ourKey; |
331 | + } |
332 | } |
333 | |
334 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrAbstractGlobalAction.java' |
335 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrAbstractGlobalAction.java 2010-03-02 20:44:47 +0000 |
336 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrAbstractGlobalAction.java 2013-04-16 16:02:26 +0000 |
337 | @@ -23,10 +23,10 @@ |
338 | import com.intellij.openapi.vcs.VcsRoot; |
339 | import com.intellij.openapi.vcs.changes.VcsDirtyScopeManager; |
340 | import com.intellij.openapi.vfs.VirtualFile; |
341 | -import com.intellij.vcsUtil.VcsUtil; |
342 | -import org.emergent.bzr4j.intellij.util.BzrDebug; |
343 | +import com.intellij.vcsUtil.VcsImplUtil; |
344 | import org.emergent.bzr4j.intellij.BzrVcs; |
345 | import org.emergent.bzr4j.intellij.command.BzrCommandException; |
346 | +import org.emergent.bzr4j.intellij.util.BzrDebug; |
347 | import org.jetbrains.annotations.Nullable; |
348 | |
349 | import java.util.Collection; |
350 | @@ -54,7 +54,7 @@ |
351 | try { |
352 | command.execute(); |
353 | } catch (BzrCommandException e) { |
354 | - VcsUtil.showErrorMessage(project, e.getMessage(), "Error"); |
355 | + VcsImplUtil.showErrorMessage(project, e.getMessage(), "Error"); |
356 | } |
357 | VcsDirtyScopeManager vcsDirtyScopeManager = VcsDirtyScopeManager.getInstance(project); |
358 | vcsDirtyScopeManager.dirDirtyRecursively(command.getRepo()); |
359 | @@ -83,7 +83,7 @@ |
360 | |
361 | BzrVcs vcs = (BzrVcs)ProjectLevelVcsManager.getInstance(project).findVcsByName(BzrVcs.VCS_NAME); |
362 | |
363 | - if (!vcs.isStarted()) { |
364 | + if (vcs == null || !vcs.isStarted()) { |
365 | presentation.setEnabled(false); |
366 | } |
367 | } |
368 | @@ -92,8 +92,9 @@ |
369 | List<VirtualFile> repos = new LinkedList<VirtualFile>(); |
370 | VcsRoot[] roots = ProjectLevelVcsManager.getInstance(project).getAllVcsRoots(); |
371 | for (VcsRoot root : roots) { |
372 | - if (BzrVcs.VCS_NAME.equals(root.vcs.getName())) { |
373 | - repos.add(root.path); |
374 | + //noinspection ConstantConditions |
375 | + if (BzrVcs.VCS_NAME.equals(root.getVcs().getName())) { |
376 | + repos.add(root.getPath()); |
377 | } |
378 | } |
379 | return repos; |
380 | |
381 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrCommandResultNotifier.java' |
382 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrCommandResultNotifier.java 2010-03-02 20:44:47 +0000 |
383 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrCommandResultNotifier.java 2013-04-16 16:02:26 +0000 |
384 | @@ -13,6 +13,7 @@ |
385 | package org.emergent.bzr4j.intellij.action; |
386 | |
387 | import com.intellij.openapi.project.Project; |
388 | +import com.intellij.vcsUtil.VcsImplUtil; |
389 | import com.intellij.vcsUtil.VcsUtil; |
390 | import org.apache.commons.lang.StringUtils; |
391 | import org.emergent.bzr4j.core.cli.BzrStandardResult; |
392 | @@ -34,7 +35,7 @@ |
393 | VcsUtil.showStatusMessage(project, out.get(out.size() - 1)); |
394 | } |
395 | if (!err.isEmpty()) { |
396 | - VcsUtil.showErrorMessage( |
397 | + VcsImplUtil.showErrorMessage( |
398 | project, "<html>" + StringUtils.join(err, "<br>") + "</html>", "Error" |
399 | ); |
400 | } |
401 | |
402 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrAnnotateCommand.java' |
403 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrAnnotateCommand.java 2010-03-02 20:44:47 +0000 |
404 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrAnnotateCommand.java 2013-04-16 16:02:26 +0000 |
405 | @@ -51,7 +51,10 @@ |
406 | if (atIdx > 0 && BzrGlobalSettings.getInstance().isAnnotationTrimmingEnabled()) { |
407 | user = user.substring(0, atIdx); |
408 | } |
409 | - BzrAnnotationLine annotationLine = new BzrAnnotationLine(user, revision, date, annotations.size(), content); |
410 | + // convert the strftime'%Y%m%d' - '%Y-%m-%d' to match the command line tool |
411 | + String expandedDate = date.substring(0, 4) + "-" + date.substring(4, 6) + "-" + date.substring(6, 8); |
412 | + BzrAnnotationLine annotationLine = new BzrAnnotationLine(user, revision, expandedDate, |
413 | + annotations.size(), content); |
414 | annotations.add(annotationLine); |
415 | } |
416 | }; |
417 | |
418 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPullCommand.java' |
419 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPullCommand.java 2010-03-02 20:44:47 +0000 |
420 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPullCommand.java 2013-04-16 16:02:26 +0000 |
421 | @@ -14,7 +14,7 @@ |
422 | |
423 | import com.intellij.openapi.project.Project; |
424 | import com.intellij.openapi.vfs.VirtualFile; |
425 | -import com.intellij.vcsUtil.VcsUtil; |
426 | +import com.intellij.vcsUtil.VcsImplUtil; |
427 | import org.apache.commons.lang.StringUtils; |
428 | import org.emergent.bzr4j.core.cli.BzrStandardResult; |
429 | import org.emergent.bzr4j.intellij.BzrVcs; |
430 | @@ -88,7 +88,7 @@ |
431 | } |
432 | } |
433 | } catch (URISyntaxException e) { |
434 | - VcsUtil.showErrorMessage(project, "Invalid source: " + source, "Error"); |
435 | + VcsImplUtil.showErrorMessage(project, "Invalid source: " + source, "Error"); |
436 | } |
437 | } |
438 | |
439 | |
440 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPushCommand.java' |
441 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPushCommand.java 2010-03-02 20:44:47 +0000 |
442 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPushCommand.java 2013-04-16 16:02:26 +0000 |
443 | @@ -14,7 +14,7 @@ |
444 | |
445 | import com.intellij.openapi.project.Project; |
446 | import com.intellij.openapi.vfs.VirtualFile; |
447 | -import com.intellij.vcsUtil.VcsUtil; |
448 | +import com.intellij.vcsUtil.VcsImplUtil; |
449 | import org.apache.commons.lang.StringUtils; |
450 | import org.emergent.bzr4j.core.cli.BzrStandardResult; |
451 | import org.emergent.bzr4j.intellij.BzrVcs; |
452 | @@ -67,7 +67,7 @@ |
453 | } |
454 | } |
455 | } catch (URISyntaxException e) { |
456 | - VcsUtil.showErrorMessage(project, "Invalid destination: " + destination, "Error"); |
457 | + VcsImplUtil.showErrorMessage(project, "Invalid destination: " + destination, "Error"); |
458 | } |
459 | } |
460 | |
461 | |
462 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/ShellCommandService.java' |
463 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/ShellCommandService.java 2010-03-02 20:44:47 +0000 |
464 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/ShellCommandService.java 2013-04-16 16:02:26 +0000 |
465 | @@ -15,9 +15,8 @@ |
466 | import com.intellij.openapi.diagnostic.Logger; |
467 | import com.intellij.openapi.project.Project; |
468 | import com.intellij.openapi.vfs.VirtualFile; |
469 | -import com.intellij.vcsUtil.VcsUtil; |
470 | +import com.intellij.vcsUtil.VcsImplUtil; |
471 | import org.emergent.bzr4j.core.cli.BzrAbstractResult; |
472 | -import org.emergent.bzr4j.core.cli.BzrExecException; |
473 | import org.emergent.bzr4j.core.cli.BzrExecService; |
474 | import org.emergent.bzr4j.core.cli.BzrStandardResult; |
475 | import org.emergent.bzr4j.core.cli.BzrXmlResult; |
476 | @@ -26,7 +25,6 @@ |
477 | import org.emergent.bzr4j.intellij.BzrVcsMessages; |
478 | import org.jetbrains.annotations.NotNull; |
479 | import org.jetbrains.annotations.Nullable; |
480 | -import org.xml.sax.helpers.DefaultHandler; |
481 | |
482 | import java.io.File; |
483 | import java.util.List; |
484 | @@ -141,7 +139,7 @@ |
485 | .append(e.getMessage()); |
486 | |
487 | Object[] params = new Object[] { }; |
488 | - VcsUtil.showErrorMessage( |
489 | + VcsImplUtil.showErrorMessage( |
490 | project, |
491 | message.toString(), |
492 | BzrVcsMessages.message("bzr4intellij.error", params) |
493 | |
494 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/BzrChangeProvider.java' |
495 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/BzrChangeProvider.java 2010-07-29 10:15:04 +0000 |
496 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/BzrChangeProvider.java 2013-04-16 16:02:26 +0000 |
497 | @@ -46,12 +46,7 @@ |
498 | import org.xml.sax.SAXParseException; |
499 | |
500 | import java.io.File; |
501 | -import java.util.Collection; |
502 | -import java.util.HashMap; |
503 | -import java.util.LinkedHashMap; |
504 | -import java.util.LinkedList; |
505 | -import java.util.List; |
506 | -import java.util.Map; |
507 | +import java.util.*; |
508 | |
509 | public class BzrChangeProvider implements ChangeProvider { |
510 | |
511 | @@ -93,7 +88,20 @@ |
512 | } |
513 | |
514 | for (Map.Entry<VirtualFile,FilePath> rootEntry : rootsMap.entrySet()) { |
515 | - process(builder, rootEntry.getKey(), rootEntry.getValue(), rootRevnos); |
516 | + VirtualFile virtualRoot = rootEntry.getKey(); |
517 | + FilePath rootPath = rootEntry.getValue(); |
518 | + |
519 | + HashMap<VirtualFile, FilePath> subRoots = new HashMap<VirtualFile, FilePath>(); |
520 | + for (Map.Entry<VirtualFile, FilePath> subEntry : rootsMap.entrySet()) { |
521 | + VirtualFile virtualSubRoot = subEntry.getKey(); |
522 | + FilePath subPath = subEntry.getValue(); |
523 | + if (!subPath.isUnder(rootPath, true)) { |
524 | + continue; |
525 | + } |
526 | + subRoots.put(virtualSubRoot, subPath); |
527 | + } |
528 | + |
529 | + process(builder, virtualRoot, rootPath, rootRevnos, subRoots); |
530 | } |
531 | } catch (BzrExecException e) { |
532 | LOG.debug(e); |
533 | @@ -133,7 +141,7 @@ |
534 | ChangelistBuilder builder, |
535 | VirtualFile vcsVirtualRoot, |
536 | FilePath filePath, |
537 | - Map<File, BzrRevisionNumber> processedRoots) throws BzrExecException { |
538 | + Map<File, BzrRevisionNumber> processedRoots, HashMap<VirtualFile, FilePath> subRoots) throws BzrExecException { |
539 | |
540 | if (filePath.isNonLocal()) { |
541 | CHANGES.debug("no processing (nonlocal path): " + String.valueOf(filePath)); |
542 | @@ -150,6 +158,18 @@ |
543 | |
544 | final File ioRoot = bzrRoot.getFile(); |
545 | |
546 | + Set<File> ioSubRoots = new HashSet<File>(); |
547 | + for (FilePath path : subRoots.values()) { |
548 | + BazaarRoot bzrSubRoot = BazaarRoot.findBranchLocation(path.getIOFile()); |
549 | + if (bzrSubRoot == null) { |
550 | + continue; |
551 | + } |
552 | + File ioSubRoot = bzrSubRoot.getFile(); |
553 | + if (!ioRoot.equals(ioSubRoot)) { |
554 | + ioSubRoots.add(ioSubRoot); |
555 | + } |
556 | + } |
557 | + |
558 | final String relpath = target.equals(ioRoot) ? null : BzrUtil.relativePath(ioRoot,target); |
559 | |
560 | CHANGES.debug("is processing: " + String.valueOf(filePath)); |
561 | @@ -162,7 +182,7 @@ |
562 | |
563 | final ShellCommandService service = ShellCommandService.getInstance(m_project); |
564 | |
565 | - MyIgnoredHandler ignoredHandler = new MyIgnoredHandler(builder, ioRoot); |
566 | + MyIgnoredHandler ignoredHandler = new MyIgnoredHandler(builder, ioRoot, ioSubRoots); |
567 | |
568 | BzrIdeaExec ignoredExec = new BzrIdeaExec(bzrRoot, "xmlls"); |
569 | ignoredExec.addArguments("--ignored"); |
570 | @@ -171,7 +191,7 @@ |
571 | service.executeUnsafe(ignoredExec, BzrXmlResult.createBzrXmlResult(ignoredHandler)); |
572 | ignoredHandler.processResults(); |
573 | |
574 | - MyStatusHandler statusHandler = new MyStatusHandler(vcsVirtualRoot, builder, ioRoot, revno); |
575 | + MyStatusHandler statusHandler = new MyStatusHandler(vcsVirtualRoot, builder, ioRoot, revno, ioSubRoots); |
576 | |
577 | BzrIdeaExec statusExec = new BzrIdeaExec(bzrRoot, "xmlstatus"); |
578 | statusExec.setStderrValidationEnabled(false); |
579 | @@ -186,11 +206,13 @@ |
580 | |
581 | private ChangelistBuilder m_builder; |
582 | private File m_bzrRoot; |
583 | + private Set<File> m_bzrSubRoots; |
584 | private final Collection<String> m_ignoredList = new LinkedList<String>(); |
585 | |
586 | - public MyIgnoredHandler(ChangelistBuilder builder, File bzrRoot) { |
587 | + public MyIgnoredHandler(ChangelistBuilder builder, File bzrRoot, Set<File> ioSubRoots) { |
588 | m_builder = builder; |
589 | m_bzrRoot = bzrRoot; |
590 | + m_bzrSubRoots = ioSubRoots; |
591 | } |
592 | |
593 | public void processResults() { |
594 | @@ -211,6 +233,9 @@ |
595 | |
596 | private void processIgnore(String path) { |
597 | File ignored = new File(m_bzrRoot, path); |
598 | + if (m_bzrSubRoots.contains(ignored)) { |
599 | + return; |
600 | + } |
601 | IGNORED.debug(String.format("%10s \"%s\"", "ignored", ignored)); |
602 | m_builder.processIgnoredFile(VcsUtil.getVirtualFile(ignored)); |
603 | } |
604 | @@ -223,12 +248,14 @@ |
605 | private VirtualFile m_vcsRoot; |
606 | private File m_bzrRoot; |
607 | private final Collection<GenericChange> m_changes = new LinkedList<GenericChange>(); |
608 | + private Set<File> m_bzrSubRoots; |
609 | |
610 | - public MyStatusHandler(VirtualFile vcsRoot, ChangelistBuilder builder, File bzrRoot, BzrRevisionNumber bzrRev) { |
611 | + public MyStatusHandler(VirtualFile vcsRoot, ChangelistBuilder builder, File bzrRoot, BzrRevisionNumber bzrRev, Set<File> ioSubRoots) { |
612 | m_vcsRoot = vcsRoot; |
613 | m_builder = builder; |
614 | m_bzrRoot = bzrRoot; |
615 | m_bzrRev = bzrRev; |
616 | + m_bzrSubRoots = ioSubRoots; |
617 | } |
618 | |
619 | public void processResults() { |
620 | @@ -324,6 +351,10 @@ |
621 | UNKNOWN.debug(String.format("%10s \"%s\"", "unknown", vFile)); |
622 | builder.processUnversionedFile(vFile); |
623 | if (vFile.isDirectory()) { |
624 | + File ioFile = VcsUtil.getFilePath(vFile.getPath(), true).getIOFile(); |
625 | + if (this.m_bzrSubRoots.contains(ioFile)) { |
626 | + return; |
627 | + } |
628 | for (VirtualFile child : vFile.getChildren()) { |
629 | processRecursive(builder, child); |
630 | } |
631 | |
632 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/BzrHistoryProvider.java' |
633 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/BzrHistoryProvider.java 2010-09-17 01:44:34 +0000 |
634 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/BzrHistoryProvider.java 2013-04-16 16:02:26 +0000 |
635 | @@ -17,14 +17,7 @@ |
636 | import com.intellij.openapi.project.Project; |
637 | import com.intellij.openapi.vcs.FilePath; |
638 | import com.intellij.openapi.vcs.VcsException; |
639 | -import com.intellij.openapi.vcs.history.HistoryAsTreeProvider; |
640 | -import com.intellij.openapi.vcs.history.VcsAbstractHistorySession; |
641 | -import com.intellij.openapi.vcs.history.VcsAppendableHistorySessionPartner; |
642 | -import com.intellij.openapi.vcs.history.VcsDependentHistoryComponents; |
643 | -import com.intellij.openapi.vcs.history.VcsFileRevision; |
644 | -import com.intellij.openapi.vcs.history.VcsHistoryProvider; |
645 | -import com.intellij.openapi.vcs.history.VcsHistorySession; |
646 | -import com.intellij.openapi.vcs.history.VcsRevisionNumber; |
647 | +import com.intellij.openapi.vcs.history.*; |
648 | import com.intellij.openapi.vfs.VirtualFile; |
649 | import com.intellij.util.Consumer; |
650 | import com.intellij.util.ui.ColumnInfo; |
651 | @@ -32,6 +25,7 @@ |
652 | import org.emergent.bzr4j.intellij.BzrFile; |
653 | import org.emergent.bzr4j.intellij.command.BzrLogCommand; |
654 | import org.emergent.bzr4j.intellij.command.BzrMiscCommand; |
655 | +import org.jetbrains.annotations.NotNull; |
656 | |
657 | import javax.swing.*; |
658 | import java.util.Collections; |
659 | @@ -117,4 +111,14 @@ |
660 | public boolean supportsHistoryForDirectories() { |
661 | return true; |
662 | } |
663 | + |
664 | + @Override |
665 | + public DiffFromHistoryHandler getHistoryDiffHandler() { |
666 | + return null; |
667 | + } |
668 | + |
669 | + @Override |
670 | + public boolean canShowHistoryFor(@NotNull VirtualFile file) { |
671 | + return true; |
672 | + } |
673 | } |
674 | |
675 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotation.java' |
676 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotation.java 2011-01-22 16:02:47 +0000 |
677 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotation.java 2013-04-16 16:02:26 +0000 |
678 | @@ -13,22 +13,24 @@ |
679 | package org.emergent.bzr4j.intellij.provider.annotate; |
680 | |
681 | import com.intellij.openapi.diagnostic.Logger; |
682 | +import com.intellij.openapi.project.Project; |
683 | import com.intellij.openapi.vcs.VcsException; |
684 | -import com.intellij.openapi.vcs.annotate.AnnotationListener; |
685 | -import com.intellij.openapi.vcs.annotate.AnnotationSourceSwitcher; |
686 | -import com.intellij.openapi.vcs.annotate.FileAnnotation; |
687 | -import com.intellij.openapi.vcs.annotate.LineAnnotationAspect; |
688 | +import com.intellij.openapi.vcs.annotate.*; |
689 | import com.intellij.openapi.vcs.changes.CurrentContentRevision; |
690 | import com.intellij.openapi.vcs.history.VcsFileRevision; |
691 | import com.intellij.openapi.vcs.history.VcsRevisionNumber; |
692 | +import com.intellij.openapi.vfs.LocalFileSystem; |
693 | +import com.intellij.openapi.vfs.VirtualFile; |
694 | import org.apache.commons.lang.StringUtils; |
695 | import org.emergent.bzr4j.intellij.BzrFile; |
696 | -import org.emergent.bzr4j.intellij.BzrFileRevision; |
697 | +import org.jetbrains.annotations.NotNull; |
698 | +import org.jetbrains.annotations.Nullable; |
699 | |
700 | +import java.util.Date; |
701 | import java.util.LinkedList; |
702 | import java.util.List; |
703 | |
704 | -public class BzrAnnotation implements FileAnnotation { |
705 | +public class BzrAnnotation extends FileAnnotation { |
706 | |
707 | private static final Logger LOG = Logger.getInstance(BzrAnnotation.class.getName()); |
708 | |
709 | @@ -45,12 +47,17 @@ |
710 | |
711 | private final List<BzrAnnotationLine> lines; |
712 | private final List<VcsFileRevision> vcsFileRevisions; |
713 | - private final BzrFile hgFile; |
714 | - |
715 | - public BzrAnnotation(BzrFile hgFile, List<BzrAnnotationLine> lines, List<VcsFileRevision> vcsFileRevisions) { |
716 | + private final BzrFile bzrFile; |
717 | + private final VcsRevisionNumber currentRevision; |
718 | + |
719 | + |
720 | + public BzrAnnotation(@NotNull Project project, BzrFile bzrFile, List<BzrAnnotationLine> lines, List<VcsFileRevision> vcsFileRevisions, |
721 | + VcsRevisionNumber revision) { |
722 | + super(project); |
723 | this.lines = lines; |
724 | this.vcsFileRevisions = vcsFileRevisions; |
725 | - this.hgFile = hgFile; |
726 | + this.bzrFile = bzrFile; |
727 | + this.currentRevision = revision; |
728 | } |
729 | |
730 | public AnnotationSourceSwitcher getAnnotationSourceSwitcher() { |
731 | @@ -61,21 +68,21 @@ |
732 | return getLineRevisionNumber(lineNumber); |
733 | } |
734 | |
735 | + @Nullable |
736 | + @Override |
737 | + public VcsRevisionNumber getCurrentRevision() { |
738 | + return currentRevision; |
739 | + } |
740 | + |
741 | public boolean revisionsNotEmpty() { |
742 | return true; |
743 | } |
744 | |
745 | - public void addListener(AnnotationListener listener) { |
746 | - } |
747 | - |
748 | - public void removeListener(AnnotationListener listener) { |
749 | - } |
750 | - |
751 | public void dispose() { |
752 | } |
753 | |
754 | public LineAnnotationAspect[] getAspects() { |
755 | - return new LineAnnotationAspect[] { |
756 | + return new LineAnnotationAspect[]{ |
757 | revisionAnnotationAspect, |
758 | dateAnnotationAspect, |
759 | userAnnotationAspect |
760 | @@ -88,7 +95,7 @@ |
761 | |
762 | public String getAnnotatedContent() { |
763 | try { |
764 | - return CurrentContentRevision.create(hgFile.toFilePath()).getContent(); |
765 | + return CurrentContentRevision.create(bzrFile.toFilePath()).getContent(); |
766 | } catch (VcsException e) { |
767 | LOG.error(e); |
768 | return StringUtils.EMPTY; |
769 | @@ -103,17 +110,48 @@ |
770 | return annotationLine.getVcsRevisionNumber(); |
771 | } |
772 | |
773 | + @Override |
774 | + public Date getLineDate(int lineNumber) { |
775 | + if (lineNumber >= lines.size() || lineNumber < 0) { |
776 | + return null; |
777 | + } |
778 | + return lines.get(lineNumber).getDate(); |
779 | + } |
780 | + |
781 | public List<VcsFileRevision> getRevisions() { |
782 | List<VcsFileRevision> result = new LinkedList<VcsFileRevision>(); |
783 | result.addAll(vcsFileRevisions); |
784 | return result; |
785 | } |
786 | |
787 | - class HgLineAnnotationAspect implements LineAnnotationAspect { |
788 | + @Override |
789 | + public int getLineCount() { |
790 | + return lines.size(); |
791 | + } |
792 | + |
793 | + private static String id(FIELD field) { |
794 | + switch (field) { |
795 | + case USER: |
796 | + return LineAnnotationAspect.AUTHOR; |
797 | + case REVISION: |
798 | + return LineAnnotationAspect.REVISION; |
799 | + case DATE: |
800 | + return LineAnnotationAspect.DATE; |
801 | + default: |
802 | + return null; |
803 | + } |
804 | + } |
805 | + |
806 | + private static boolean isShowByDefault(FIELD aspectType) { |
807 | + return aspectType == FIELD.DATE || aspectType == FIELD.USER; |
808 | + } |
809 | + |
810 | + class HgLineAnnotationAspect extends LineAnnotationAspectAdapter { |
811 | |
812 | private final FIELD aspectType; |
813 | |
814 | public HgLineAnnotationAspect(FIELD aspectType) { |
815 | + super(id(aspectType), BzrAnnotation.isShowByDefault(aspectType)); |
816 | this.aspectType = aspectType; |
817 | } |
818 | |
819 | @@ -127,17 +165,14 @@ |
820 | : annotationLine.get(aspectType).toString(); |
821 | } |
822 | |
823 | - public String getTooltipText(int lineNumber) { |
824 | - return null; |
825 | - } |
826 | - |
827 | - public String getId() { |
828 | - return null; |
829 | - } |
830 | - |
831 | - public boolean isShowByDefault() { |
832 | - return false; |
833 | - } |
834 | - } |
835 | - |
836 | + @Override |
837 | + protected void showAffectedPaths(int lineNum) { |
838 | + // todo |
839 | + } |
840 | + } |
841 | + |
842 | + @Override |
843 | + public VirtualFile getFile() { |
844 | + return LocalFileSystem.getInstance().refreshAndFindFileByIoFile(bzrFile.getFile()); |
845 | + } |
846 | } |
847 | |
848 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLine.java' |
849 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLine.java 2010-01-05 02:18:38 +0000 |
850 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLine.java 2013-04-16 16:02:26 +0000 |
851 | @@ -14,6 +14,9 @@ |
852 | |
853 | import com.intellij.openapi.vcs.history.VcsRevisionNumber; |
854 | |
855 | +import java.text.ParseException; |
856 | +import java.text.SimpleDateFormat; |
857 | +import java.util.Date; |
858 | import java.util.EnumMap; |
859 | |
860 | public class BzrAnnotationLine { |
861 | @@ -21,6 +24,13 @@ |
862 | private EnumMap<BzrAnnotation.FIELD, Object> fields = |
863 | new EnumMap<BzrAnnotation.FIELD, Object>(BzrAnnotation.FIELD.class); |
864 | |
865 | + private ThreadLocal<SimpleDateFormat> dateFormat = new ThreadLocal<SimpleDateFormat>() { |
866 | + @Override |
867 | + public SimpleDateFormat get() { |
868 | + return new SimpleDateFormat("yyyyMMdd"); |
869 | + } |
870 | + }; |
871 | + |
872 | public BzrAnnotationLine(String user, VcsRevisionNumber revision, String date, Integer line, String content) { |
873 | fields.put(BzrAnnotation.FIELD.USER, user); |
874 | |
875 | @@ -38,4 +48,17 @@ |
876 | return fields.get(field); |
877 | } |
878 | |
879 | + public Date getDate() { |
880 | + String sDate = (String)get(BzrAnnotation.FIELD.DATE); |
881 | + if (sDate != null) { |
882 | + try { |
883 | + return dateFormat.get().parse(sDate); |
884 | + } catch (ParseException e) { |
885 | + return null; |
886 | + } |
887 | + } |
888 | + else { |
889 | + return null; |
890 | + } |
891 | + } |
892 | } |
893 | |
894 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationProvider.java' |
895 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationProvider.java 2010-03-03 00:18:15 +0000 |
896 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationProvider.java 2013-04-16 16:02:26 +0000 |
897 | @@ -33,6 +33,10 @@ |
898 | } |
899 | |
900 | public FileAnnotation annotate(VirtualFile file) throws VcsException { |
901 | + return annotate(file, null); |
902 | + } |
903 | + |
904 | + public FileAnnotation annotate(VirtualFile file, VcsFileRevision revision) throws VcsException { |
905 | VirtualFile vcsRoot = VcsUtil.getVcsRootFor(project, file); |
906 | if (vcsRoot == null) { |
907 | throw new VcsException("vcs root is null"); |
908 | @@ -41,16 +45,14 @@ |
909 | BzrAnnotateCommand hgAnnotateCommand = new BzrAnnotateCommand(project); |
910 | BzrLogCommand hgLogCommand = new BzrLogCommand(project); |
911 | return new BzrAnnotation( |
912 | + project, |
913 | hgFile, |
914 | hgAnnotateCommand.execute(hgFile), |
915 | - hgLogCommand.execute(hgFile) |
916 | + hgLogCommand.execute(hgFile), |
917 | + null |
918 | ); |
919 | } |
920 | |
921 | - public FileAnnotation annotate(VirtualFile file, VcsFileRevision revision) throws VcsException { |
922 | - return annotate(file); |
923 | - } |
924 | - |
925 | public boolean isAnnotationValid(VcsFileRevision rev) { |
926 | return true; |
927 | } |
928 | |
929 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCheckinEnvironment.java' |
930 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCheckinEnvironment.java 2010-09-29 23:00:58 +0000 |
931 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCheckinEnvironment.java 2013-04-16 16:02:26 +0000 |
932 | @@ -37,6 +37,7 @@ |
933 | import java.util.LinkedList; |
934 | import java.util.List; |
935 | import java.util.Map; |
936 | +import java.util.Set; |
937 | |
938 | public class BzrCheckinEnvironment implements CheckinEnvironment { |
939 | |
940 | @@ -75,7 +76,11 @@ |
941 | } |
942 | |
943 | @SuppressWarnings({ "ThrowableInstanceNeverThrown" }) |
944 | - public List<VcsException> commit(List<Change> changes, String preparedComment, @NotNull NullableFunction<Object, Object> parametersHolder) { |
945 | + public List<VcsException> commit( |
946 | + List<Change> changes, |
947 | + String preparedComment, |
948 | + @NotNull NullableFunction<Object, Object> parametersHolder, |
949 | + Set<String> feedback) { |
950 | List<VcsException> exceptions = new LinkedList<VcsException>(); |
951 | for (Map.Entry<VirtualFile, List<BzrFile>> entry : getFilesByRepository(changes).entrySet()) { |
952 | BzrCommitCommand command = new BzrCommitCommand(project, entry.getKey(), preparedComment); |
953 | @@ -121,6 +126,10 @@ |
954 | return false; |
955 | } |
956 | |
957 | + public boolean isRefreshAfterCommitNeeded() { |
958 | + return false; |
959 | + } |
960 | + |
961 | private Map<VirtualFile, List<BzrFile>> getFilesByRepository(List<Change> changes) { |
962 | Map<VirtualFile, List<BzrFile>> result = new HashMap<VirtualFile, List<BzrFile>>(); |
963 | for (Change change : changes) { |
964 | |
965 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCommitSession.java' |
966 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCommitSession.java 2010-01-05 02:18:38 +0000 |
967 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCommitSession.java 2013-04-16 16:02:26 +0000 |
968 | @@ -19,6 +19,7 @@ |
969 | import com.intellij.openapi.vcs.changes.ContentRevision; |
970 | import com.intellij.openapi.vcs.changes.VcsDirtyScopeManager; |
971 | import com.intellij.openapi.vfs.VirtualFile; |
972 | +import com.intellij.vcsUtil.VcsImplUtil; |
973 | import com.intellij.vcsUtil.VcsUtil; |
974 | import org.apache.commons.lang.StringUtils; |
975 | import org.emergent.bzr4j.intellij.BzrVcsMessages; |
976 | @@ -64,7 +65,7 @@ |
977 | vcsDirtyScopeManager.dirDirtyRecursively(root); |
978 | root.refresh(true, true); |
979 | } catch (BzrCommandException e) { |
980 | - VcsUtil.showErrorMessage(project, e.getMessage(), "Error"); |
981 | + VcsImplUtil.showErrorMessage(project, e.getMessage(), "Error"); |
982 | } |
983 | } |
984 | } |
985 | @@ -97,4 +98,7 @@ |
986 | return result; |
987 | } |
988 | |
989 | + public String getHelpId() { |
990 | + return null; |
991 | + } |
992 | } |
993 | |
994 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationIdePanel.java' |
995 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationIdePanel.java 2010-03-02 20:44:47 +0000 |
996 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationIdePanel.java 2013-04-16 16:02:26 +0000 |
997 | @@ -200,8 +200,8 @@ |
998 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
999 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); |
1000 | panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), |
1001 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1002 | - "bzr4intellij.path_to_executable.text"))); |
1003 | + ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1004 | + .getString("bzr4intellij.path_to_executable.text"))); |
1005 | pathSelector = new TextFieldWithBrowseButton(); |
1006 | pathSelector.setEnabled(true); |
1007 | panel1.add(pathSelector, |
1008 | @@ -210,9 +210,8 @@ |
1009 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, new Dimension(100, -1), null, |
1010 | null, 0, false)); |
1011 | pathDefaultButton = new JButton(); |
1012 | - this.$$$loadButtonText$$$(pathDefaultButton, |
1013 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1014 | - "configdialog.default_path_button.text")); |
1015 | + this.$$$loadButtonText$$$(pathDefaultButton, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1016 | + .getString("configdialog.default_path_button.text")); |
1017 | panel1.add(pathDefaultButton, |
1018 | new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, |
1019 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1020 | @@ -232,12 +231,12 @@ |
1021 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1022 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); |
1023 | panel2.setBorder(BorderFactory.createTitledBorder( |
1024 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1025 | - "configpanel.miscellaneous_group.text"))); |
1026 | + ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1027 | + .getString("configpanel.miscellaneous_group.text"))); |
1028 | m_trimAnnotationCheckBox = new JCheckBox(); |
1029 | this.$$$loadButtonText$$$(m_trimAnnotationCheckBox, |
1030 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1031 | - "configpanel.trim_annotation_author.text")); |
1032 | + ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1033 | + .getString("configpanel.trim_annotation_author.text")); |
1034 | panel2.add(m_trimAnnotationCheckBox, |
1035 | new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1036 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1037 | @@ -247,8 +246,8 @@ |
1038 | GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); |
1039 | m_modalErrorPopupEnabledCheckBox = new JCheckBox(); |
1040 | this.$$$loadButtonText$$$(m_modalErrorPopupEnabledCheckBox, |
1041 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1042 | - "configpanel.allow_modal_error_popup.text")); |
1043 | + ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1044 | + .getString("configpanel.allow_modal_error_popup.text")); |
1045 | panel2.add(m_modalErrorPopupEnabledCheckBox, |
1046 | new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1047 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1048 | @@ -259,8 +258,8 @@ |
1049 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1050 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); |
1051 | panel3.setBorder(BorderFactory.createTitledBorder( |
1052 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1053 | - "configpanel.envvars_group.text"))); |
1054 | + ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1055 | + .getString("configpanel.envvars_group.text"))); |
1056 | m_envBzrEmailTextField = new JTextField(); |
1057 | m_envBzrEmailTextField.setEnabled(true); |
1058 | m_envBzrEmailTextField.setText(""); |
1059 | @@ -298,12 +297,12 @@ |
1060 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1061 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); |
1062 | panel4.setBorder(BorderFactory.createTitledBorder( |
1063 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1064 | - "configpanel.experimental_group.text"))); |
1065 | + ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1066 | + .getString("configpanel.experimental_group.text"))); |
1067 | m_granularExecLockingCheckBox = new JCheckBox(); |
1068 | this.$$$loadButtonText$$$(m_granularExecLockingCheckBox, |
1069 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1070 | - "configpanel.fine_grained_exec_locking.text")); |
1071 | + ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1072 | + .getString("configpanel.fine_grained_exec_locking.text")); |
1073 | panel4.add(m_granularExecLockingCheckBox, |
1074 | new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1075 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1076 | |
1077 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationProjectPanel.java' |
1078 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationProjectPanel.java 2010-03-02 20:44:47 +0000 |
1079 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationProjectPanel.java 2013-04-16 16:02:26 +0000 |
1080 | @@ -76,8 +76,9 @@ |
1081 | m_panel = new JPanel(); |
1082 | m_panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1)); |
1083 | final Spacer spacer1 = new Spacer(); |
1084 | - m_panel.add(spacer1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, |
1085 | - GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); |
1086 | + m_panel.add(spacer1, |
1087 | + new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, |
1088 | + GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); |
1089 | final JPanel panel1 = new JPanel(); |
1090 | panel1.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1)); |
1091 | m_panel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, |
1092 | @@ -108,12 +109,11 @@ |
1093 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1094 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); |
1095 | panel2.setBorder(BorderFactory.createTitledBorder( |
1096 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1097 | - "configpanel.miscellaneous_group.text"))); |
1098 | + ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1099 | + .getString("configpanel.miscellaneous_group.text"))); |
1100 | m_autoFixRootsCbx = new JCheckBox(); |
1101 | - this.$$$loadButtonText$$$(m_autoFixRootsCbx, |
1102 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1103 | - "configpanel.check_roots_enabled.text")); |
1104 | + this.$$$loadButtonText$$$(m_autoFixRootsCbx, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1105 | + .getString("configpanel.check_roots_enabled.text")); |
1106 | panel2.add(m_autoFixRootsCbx, |
1107 | new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1108 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1109 | |
1110 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrIntegrateDialog.java' |
1111 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrIntegrateDialog.java 2010-01-05 02:18:38 +0000 |
1112 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrIntegrateDialog.java 2013-04-16 16:02:26 +0000 |
1113 | @@ -170,61 +170,55 @@ |
1114 | contentPanel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1)); |
1115 | final JPanel panel1 = new JPanel(); |
1116 | panel1.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1)); |
1117 | - contentPanel.add(panel1, |
1118 | - new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, |
1119 | - GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1120 | - GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, |
1121 | - 0, false)); |
1122 | + contentPanel.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, |
1123 | + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1124 | + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); |
1125 | panel1.setBorder(BorderFactory.createTitledBorder( |
1126 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1127 | - "dialog.integrate.merge_from"))); |
1128 | + ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1129 | + .getString("dialog.integrate.merge_from"))); |
1130 | branchOption = new JRadioButton(); |
1131 | branchOption.setSelected(true); |
1132 | branchOption.setText("Branch"); |
1133 | branchOption.setMnemonic('B'); |
1134 | branchOption.setDisplayedMnemonicIndex(0); |
1135 | panel1.add(branchOption, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1136 | - GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1137 | - GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
1138 | + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, |
1139 | + null, null, null, 0, false)); |
1140 | tagOption = new JRadioButton(); |
1141 | tagOption.setText("Tag"); |
1142 | tagOption.setMnemonic('T'); |
1143 | tagOption.setDisplayedMnemonicIndex(0); |
1144 | panel1.add(tagOption, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1145 | - GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1146 | - GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
1147 | + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, |
1148 | + null, null, null, 0, false)); |
1149 | branchSelector = new JComboBox(); |
1150 | branchSelector.setEditable(true); |
1151 | branchSelector.setEnabled(true); |
1152 | panel1.add(branchSelector, |
1153 | new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, |
1154 | - GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, |
1155 | - false)); |
1156 | + GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
1157 | tagSelector = new JComboBox(); |
1158 | tagSelector.setEnabled(false); |
1159 | panel1.add(tagSelector, |
1160 | new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, |
1161 | - GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, |
1162 | - false)); |
1163 | + GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
1164 | final Spacer spacer1 = new Spacer(); |
1165 | - panel1.add(spacer1, |
1166 | - new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, |
1167 | - GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); |
1168 | + panel1.add(spacer1, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, |
1169 | + GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); |
1170 | revisionTxt = new JTextField(); |
1171 | revisionTxt.setEnabled(false); |
1172 | panel1.add(revisionTxt, |
1173 | new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, |
1174 | - GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, |
1175 | - new Dimension(150, -1), null, 0, false)); |
1176 | + GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, |
1177 | + 0, false)); |
1178 | revisionOption = new JRadioButton(); |
1179 | revisionOption.setSelected(false); |
1180 | revisionOption.setText("Revision"); |
1181 | revisionOption.setMnemonic('R'); |
1182 | revisionOption.setDisplayedMnemonicIndex(0); |
1183 | - panel1.add(revisionOption, |
1184 | - new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1185 | - GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1186 | - GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
1187 | + panel1.add(revisionOption, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1188 | + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, |
1189 | + null, null, null, 0, false)); |
1190 | final Spacer spacer2 = new Spacer(); |
1191 | contentPanel.add(spacer2, |
1192 | new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, |
1193 | @@ -233,8 +227,7 @@ |
1194 | contentPanel.add(repositorySelectorComponent.$$$getRootComponent$$$(), |
1195 | new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, |
1196 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, |
1197 | - GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, |
1198 | - 0, false)); |
1199 | + GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); |
1200 | ButtonGroup buttonGroup; |
1201 | buttonGroup = new ButtonGroup(); |
1202 | buttonGroup.add(revisionOption); |
1203 | |
1204 | === modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrSendErrorForm.java' |
1205 | --- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrSendErrorForm.java 2010-03-02 20:49:34 +0000 |
1206 | +++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrSendErrorForm.java 2013-04-16 16:02:26 +0000 |
1207 | @@ -147,8 +147,8 @@ |
1208 | myMainPanel = new JPanel(); |
1209 | myMainPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1)); |
1210 | final JLabel label1 = new JLabel(); |
1211 | - this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1212 | - "diagnostic.error.report.prompt")); |
1213 | + this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1214 | + .getString("diagnostic.error.report.prompt")); |
1215 | myMainPanel.add(label1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1216 | GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
1217 | final JScrollPane scrollPane1 = new JScrollPane(); |
1218 | @@ -170,21 +170,21 @@ |
1219 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1220 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); |
1221 | panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), |
1222 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1223 | - "diagnostic.error.report.login.group"))); |
1224 | + ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1225 | + .getString("diagnostic.error.report.login.group"))); |
1226 | final JPanel panel2 = new JPanel(); |
1227 | panel2.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1)); |
1228 | panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, |
1229 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1230 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); |
1231 | final JLabel label2 = new JLabel(); |
1232 | - this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1233 | - "diagnostic.error.report.login.password")); |
1234 | + this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1235 | + .getString("diagnostic.error.report.login.password")); |
1236 | panel2.add(label2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1237 | GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
1238 | final JLabel label3 = new JLabel(); |
1239 | - this.$$$loadLabelText$$$(label3, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1240 | - "diagnostic.error.report.login.name")); |
1241 | + this.$$$loadLabelText$$$(label3, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1242 | + .getString("diagnostic.error.report.login.name")); |
1243 | panel2.add(label3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1244 | GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
1245 | myItnLoginTextField = new JTextField(); |
1246 | @@ -198,13 +198,13 @@ |
1247 | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, |
1248 | 0, false)); |
1249 | final JLabel label4 = new JLabel(); |
1250 | - this.$$$loadLabelText$$$(label4, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1251 | - "diagnostic.error.report.smtp.server")); |
1252 | + this.$$$loadLabelText$$$(label4, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1253 | + .getString("diagnostic.error.report.smtp.server")); |
1254 | panel2.add(label4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1255 | GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
1256 | final JLabel label5 = new JLabel(); |
1257 | - this.$$$loadLabelText$$$(label5, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1258 | - "diagnostic.error.report.email")); |
1259 | + this.$$$loadLabelText$$$(label5, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1260 | + .getString("diagnostic.error.report.email")); |
1261 | panel2.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1262 | GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
1263 | myItnServerTextField = new JTextField(); |
1264 | @@ -220,15 +220,15 @@ |
1265 | 0, false)); |
1266 | myRememberITNPasswordCheckBox = new JCheckBox(); |
1267 | this.$$$loadButtonText$$$(myRememberITNPasswordCheckBox, |
1268 | - ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1269 | - "diagnostic.error.report.login.remember.password.checkbox")); |
1270 | + ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1271 | + .getString("diagnostic.error.report.login.remember.password.checkbox")); |
1272 | panel1.add(myRememberITNPasswordCheckBox, |
1273 | new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1274 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1275 | GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); |
1276 | final JLabel label6 = new JLabel(); |
1277 | - this.$$$loadLabelText$$$(label6, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString( |
1278 | - "diagnostic.error.report.description")); |
1279 | + this.$$$loadLabelText$$$(label6, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages") |
1280 | + .getString("diagnostic.error.report.description")); |
1281 | myMainPanel.add(label6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, |
1282 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, |
1283 | GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); |
1284 | |
1285 | === modified file 'modules/intellij/src/main/resources/META-INF/plugin.xml' |
1286 | --- modules/intellij/src/main/resources/META-INF/plugin.xml 2011-02-15 12:12:50 +0000 |
1287 | +++ modules/intellij/src/main/resources/META-INF/plugin.xml 2013-04-16 16:02:26 +0000 |
1288 | @@ -9,8 +9,8 @@ |
1289 | <p> |
1290 | System Requirements: |
1291 | <ul> |
1292 | - <li>IntelliJ IDEA 10+ (Ultimate or Community) |
1293 | - <li>Java 5+ |
1294 | + <li>IntelliJ IDEA 12+ (Ultimate or Community) |
1295 | + <li>Java 6+ |
1296 | <li>Bazaar 2.0+ |
1297 | <ul> |
1298 | <li>xmloutput plugin |
1299 | @@ -95,6 +95,14 @@ |
1300 | |
1301 | <change-notes> |
1302 | <![CDATA[ |
1303 | + <h3>Changes since 2.6.3</h3> |
1304 | + <ul> |
1305 | + <li>[feature] Supports IntelliJ IDEA 12.1</li> |
1306 | + </ul> |
1307 | + <h3>Changes since 2.6.1</h3> |
1308 | + <ul> |
1309 | + <li>[feature] Supports IntelliJ IDEA 11.0</li> |
1310 | + </ul> |
1311 | <h3>Changes since 2.6.0</h3> |
1312 | <ul> |
1313 | <li>[bugfix] <a href="https://launchpad.net/bugs/716279">716279</a> |
1314 | |
1315 | === added directory 'modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider' |
1316 | === added directory 'modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider/annotate' |
1317 | === added file 'modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLineTest.java' |
1318 | --- modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLineTest.java 1970-01-01 00:00:00 +0000 |
1319 | +++ modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLineTest.java 2013-04-16 16:02:26 +0000 |
1320 | @@ -0,0 +1,39 @@ |
1321 | +/* |
1322 | + * Copyright (c) 2011 Francis Devereux |
1323 | + * |
1324 | + * Licensed under the Apache License, Version 2.0 (the "License"); you |
1325 | + * may not use this file except in compliance with the License. You may |
1326 | + * obtain a copy of the License at |
1327 | + * |
1328 | + * http://www.apache.org/licenses/LICENSE-2.0 |
1329 | + * |
1330 | + * Unless required by applicable law or agreed to in writing, software |
1331 | + * distributed under the License is distributed on an "AS IS" BASIS, |
1332 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
1333 | + * implied. See the License for the specific language governing |
1334 | + * permissions and limitations under the License. |
1335 | + */ |
1336 | + |
1337 | +package org.emergent.bzr4j.intellij.provider.annotate; |
1338 | + |
1339 | +import static org.testng.Assert.*; |
1340 | +import org.testng.annotations.Test; |
1341 | + |
1342 | +import java.util.Calendar; |
1343 | +import java.util.Date; |
1344 | + |
1345 | +/** |
1346 | + * @author Francis Devereux |
1347 | + */ |
1348 | +public class BzrAnnotationLineTest { |
1349 | + @Test |
1350 | + public void testGetDate() { |
1351 | + BzrAnnotationLine line = new BzrAnnotationLine("user", null, "20091210", 32, " public static void main(String args[])"); |
1352 | + Date d = line.getDate(); |
1353 | + Calendar c = Calendar.getInstance(); |
1354 | + c.setTime(d); |
1355 | + assertEquals(2009, c.get(Calendar.YEAR)); |
1356 | + assertEquals(11, c.get(Calendar.MONTH)); |
1357 | + assertEquals(10, c.get(Calendar.DAY_OF_MONTH)); |
1358 | + } |
1359 | +} |
1360 | |
1361 | === modified file 'modules/teamcity/pom.xml' |
1362 | --- modules/teamcity/pom.xml 2011-02-15 12:12:50 +0000 |
1363 | +++ modules/teamcity/pom.xml 2013-04-16 16:02:26 +0000 |
1364 | @@ -6,7 +6,7 @@ |
1365 | |
1366 | <groupId>org.emergent.bzr4j</groupId> |
1367 | <artifactId>bzr4teamcity</artifactId> |
1368 | - <version>2.6.1</version> |
1369 | + <version>2.6.4-SNAPSHOT</version> |
1370 | <packaging>jar</packaging> |
1371 | <name>Bzr4TeamCity Plugin</name> |
1372 | <url>http://launchpad.net/bzr4j</url> |
1373 | |
1374 | === modified file 'pom.xml' |
1375 | --- pom.xml 2011-02-15 12:12:50 +0000 |
1376 | +++ pom.xml 2013-04-16 16:02:26 +0000 |
1377 | @@ -5,7 +5,7 @@ |
1378 | |
1379 | <groupId>org.emergent.bzr4j</groupId> |
1380 | <artifactId>bzr4j</artifactId> |
1381 | - <version>2.6.1</version> |
1382 | + <version>2.6.4-SNAPSHOT</version> |
1383 | <packaging>pom</packaging> |
1384 | <name>Bzr4J Aggregator Project</name> |
1385 | <url>http://launchpad.net/bzr4j</url> |
1386 | @@ -39,7 +39,7 @@ |
1387 | <artifactId>maven-idea-plugin</artifactId> |
1388 | <version>2.3-bzr4j</version> |
1389 | <configuration> |
1390 | - <jdkLevel>1.5</jdkLevel> |
1391 | + <jdkLevel>1.6</jdkLevel> |
1392 | <jdkName>${java.specification.version}</jdkName> |
1393 | <downloadSources>true</downloadSources> |
1394 | <exclude>target</exclude> |