Merge lp:~frankoid/bzr4j/idea11-fixes into lp:bzr4j

Proposed by Francis Devereux
Status: Needs review
Proposed branch: lp:~frankoid/bzr4j/idea11-fixes
Merge into: lp:bzr4j
Diff against target: 907 lines (+229/-105)
22 files modified
modules/core/pom.xml (+1/-1)
modules/intellij/pom.xml (+1/-1)
modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrFileRevision.java (+13/-7)
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 (+3/-3)
modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrCommandResultNotifier.java (+2/-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/annotate/BzrAnnotation.java (+12/-2)
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/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 (+4/-0)
modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLineTest.java (+39/-0)
modules/teamcity/pom.xml (+1/-1)
pom.xml (+1/-1)
To merge this branch: bzr merge lp:~frankoid/bzr4j/idea11-fixes
Reviewer Review Type Date Requested Status
Harry Hirsch (community) Approve
Patrick Woodworth Pending
Review via email: mp+86172@code.launchpad.net

Description of the change

Update to work with IntelliJ 11.0

I don't know if this version will work with IntelliJ 10.0.

I've done basic testing against 11.0, i.e. I've tested diffing and committing.

To post a comment you must log in.
lp:~frankoid/bzr4j/idea11-fixes updated
61. By Harry Hirsch

Honour branch boundaries when determining ignored/unversion status of files

Revision history for this message
Harry Hirsch (bzr-unbunt) wrote :

Works for me and a few co-workers in PhpStorm 3.0.1. Also works for me in IDEA Community Edition 11.0.

To additionally support the current IDEA trunk (11.x) there's only one thing missing...

org.emergent.bzr4j.intellij.provider.commit.BzrCheckinEnvironment needs to implement
com.intellij.openapi.vcs.checkin.CheckinEnvironment.isRefreshAfterCommitNeeded:

  public boolean isRefreshAfterCommitNeeded() {
    return false;
  }

review: Approve
lp:~frankoid/bzr4j/idea11-fixes updated
62. By Francis Devereux

Add methods to BzrCheckinEnvironment to fix compilation against IntelliJ IDEA 11.1

Unmerged revisions

62. By Francis Devereux

Add methods to BzrCheckinEnvironment 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 BzrCheckinEnvironment.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 ContentRevisionCache

55. By Francis Devereux

VcsUtil.showErrorMessage has moved to VcsImplUtil

54. By Francis Devereux

Fixed IDEA 10 (latest git as of 14 Feb 2011) compile errors

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/core/pom.xml'
2--- modules/core/pom.xml 2011-02-15 12:12:50 +0000
3+++ modules/core/pom.xml 2012-04-15 19:06:23 +0000
4@@ -6,7 +6,7 @@
5
6 <groupId>org.emergent.bzr4j</groupId>
7 <artifactId>bzr4j-core</artifactId>
8- <version>2.6.1</version>
9+ <version>2.6.2-SNAPSHOT</version>
10 <packaging>jar</packaging>
11 <name>Bzr4J Core Library</name>
12 <url>http://launchpad.net/bzr4j</url>
13
14=== modified file 'modules/intellij/pom.xml'
15--- modules/intellij/pom.xml 2011-02-15 12:12:50 +0000
16+++ modules/intellij/pom.xml 2012-04-15 19:06:23 +0000
17@@ -6,7 +6,7 @@
18
19 <groupId>org.emergent.bzr4j</groupId>
20 <artifactId>bzr4intellij</artifactId>
21- <version>2.6.1</version>
22+ <version>2.6.2-SNAPSHOT</version>
23 <packaging>jar</packaging>
24 <name>Bzr4IntelliJ Plugin</name>
25 <url>http://bzr4j.emergent.org/</url>
26
27=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrFileRevision.java'
28--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrFileRevision.java 2010-03-02 20:44:47 +0000
29+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrFileRevision.java 2012-04-15 19:06:23 +0000
30@@ -1,9 +1,10 @@
31 package org.emergent.bzr4j.intellij;
32
33-import com.intellij.openapi.diagnostic.Logger;
34 import com.intellij.openapi.project.Project;
35+import com.intellij.openapi.util.Throwable2Computable;
36 import com.intellij.openapi.vcs.VcsException;
37 import com.intellij.openapi.vcs.history.VcsFileRevision;
38+import com.intellij.openapi.vcs.impl.ContentRevisionCache;
39 import org.apache.commons.lang.builder.EqualsBuilder;
40 import org.apache.commons.lang.builder.HashCodeBuilder;
41 import org.emergent.bzr4j.core.utils.StringUtil;
42@@ -24,7 +25,6 @@
43 private final Date revisionDate;
44 private final String author;
45 private final String commitMessage;
46- private byte[] content;
47
48 public BzrFileRevision(Project project, BzrFile file, BzrRevisionNumber revisionNumber,
49 String branchName, String revisionDate, String author, String commitMessage) throws ParseException {
50@@ -62,22 +62,28 @@
51 return commitMessage;
52 }
53
54- public void loadContent() throws VcsException {
55+ public byte[] loadContent() throws VcsException {
56 try {
57 Charset charset = m_file.toFilePath().getCharset();
58 String result = new BzrCatCommand(m_project).execute(m_file, m_revisionNumber, charset);
59 if (result == null) {
60- content = new byte[0];
61+ return new byte[0];
62 } else {
63- content = result.getBytes(charset.name());
64+ return result.getBytes(charset.name());
65 }
66 } catch (UnsupportedEncodingException e) {
67 throw new VcsException(e);
68 }
69 }
70
71- public byte[] getContent() throws IOException {
72- return content;
73+ public byte[] getContent() throws IOException, VcsException {
74+ return ContentRevisionCache.getOrLoadAsBytes(m_project, m_file.toFilePath(), getRevisionNumber(), BzrVcs.getKey(),
75+ ContentRevisionCache.UniqueType.REPOSITORY_CONTENT,
76+ new Throwable2Computable<byte[], VcsException, IOException>() {
77+ public byte[] compute() throws VcsException, IOException {
78+ return loadContent();
79+ }
80+ });
81 }
82
83 @Override
84
85=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrVcs.java'
86--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrVcs.java 2011-01-22 16:02:47 +0000
87+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/BzrVcs.java 2012-04-15 19:06:23 +0000
88@@ -33,6 +33,7 @@
89 import com.intellij.openapi.vcs.AbstractVcs;
90 import com.intellij.openapi.vcs.ProjectLevelVcsManager;
91 import com.intellij.openapi.vcs.VcsException;
92+import com.intellij.openapi.vcs.VcsKey;
93 import com.intellij.openapi.vcs.annotate.AnnotationProvider;
94 import com.intellij.openapi.vcs.changes.ChangeListManager;
95 import com.intellij.openapi.vcs.changes.ChangeProvider;
96@@ -90,6 +91,8 @@
97
98 public static final String VCS_METADATA_DIR = ".bzr";
99
100+ private final static VcsKey ourKey = createKey(VCS_NAME);
101+
102 public static final Topic<BzrUpdater> BRANCH_TOPIC = new Topic<BzrUpdater>("bzr4intellij.branch", BzrUpdater.class);
103 public static final Topic<BzrUpdater> INCOMING_TOPIC =
104 new Topic<BzrUpdater>("bzr4intellij.incoming", BzrUpdater.class);
105@@ -488,4 +491,8 @@
106 public BzrRootTracker getMyRootTracker() {
107 return myRootTracker;
108 }
109+
110+ public static VcsKey getKey() {
111+ return ourKey;
112+ }
113 }
114
115=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrAbstractGlobalAction.java'
116--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrAbstractGlobalAction.java 2010-03-02 20:44:47 +0000
117+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrAbstractGlobalAction.java 2012-04-15 19:06:23 +0000
118@@ -23,10 +23,10 @@
119 import com.intellij.openapi.vcs.VcsRoot;
120 import com.intellij.openapi.vcs.changes.VcsDirtyScopeManager;
121 import com.intellij.openapi.vfs.VirtualFile;
122-import com.intellij.vcsUtil.VcsUtil;
123-import org.emergent.bzr4j.intellij.util.BzrDebug;
124+import com.intellij.vcsUtil.VcsImplUtil;
125 import org.emergent.bzr4j.intellij.BzrVcs;
126 import org.emergent.bzr4j.intellij.command.BzrCommandException;
127+import org.emergent.bzr4j.intellij.util.BzrDebug;
128 import org.jetbrains.annotations.Nullable;
129
130 import java.util.Collection;
131@@ -54,7 +54,7 @@
132 try {
133 command.execute();
134 } catch (BzrCommandException e) {
135- VcsUtil.showErrorMessage(project, e.getMessage(), "Error");
136+ VcsImplUtil.showErrorMessage(project, e.getMessage(), "Error");
137 }
138 VcsDirtyScopeManager vcsDirtyScopeManager = VcsDirtyScopeManager.getInstance(project);
139 vcsDirtyScopeManager.dirDirtyRecursively(command.getRepo());
140
141=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrCommandResultNotifier.java'
142--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrCommandResultNotifier.java 2010-03-02 20:44:47 +0000
143+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/action/BzrCommandResultNotifier.java 2012-04-15 19:06:23 +0000
144@@ -13,6 +13,7 @@
145 package org.emergent.bzr4j.intellij.action;
146
147 import com.intellij.openapi.project.Project;
148+import com.intellij.vcsUtil.VcsImplUtil;
149 import com.intellij.vcsUtil.VcsUtil;
150 import org.apache.commons.lang.StringUtils;
151 import org.emergent.bzr4j.core.cli.BzrStandardResult;
152@@ -34,7 +35,7 @@
153 VcsUtil.showStatusMessage(project, out.get(out.size() - 1));
154 }
155 if (!err.isEmpty()) {
156- VcsUtil.showErrorMessage(
157+ VcsImplUtil.showErrorMessage(
158 project, "<html>" + StringUtils.join(err, "<br>") + "</html>", "Error"
159 );
160 }
161
162=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPullCommand.java'
163--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPullCommand.java 2010-03-02 20:44:47 +0000
164+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPullCommand.java 2012-04-15 19:06:23 +0000
165@@ -14,7 +14,7 @@
166
167 import com.intellij.openapi.project.Project;
168 import com.intellij.openapi.vfs.VirtualFile;
169-import com.intellij.vcsUtil.VcsUtil;
170+import com.intellij.vcsUtil.VcsImplUtil;
171 import org.apache.commons.lang.StringUtils;
172 import org.emergent.bzr4j.core.cli.BzrStandardResult;
173 import org.emergent.bzr4j.intellij.BzrVcs;
174@@ -88,7 +88,7 @@
175 }
176 }
177 } catch (URISyntaxException e) {
178- VcsUtil.showErrorMessage(project, "Invalid source: " + source, "Error");
179+ VcsImplUtil.showErrorMessage(project, "Invalid source: " + source, "Error");
180 }
181 }
182
183
184=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPushCommand.java'
185--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPushCommand.java 2010-03-02 20:44:47 +0000
186+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/BzrPushCommand.java 2012-04-15 19:06:23 +0000
187@@ -14,7 +14,7 @@
188
189 import com.intellij.openapi.project.Project;
190 import com.intellij.openapi.vfs.VirtualFile;
191-import com.intellij.vcsUtil.VcsUtil;
192+import com.intellij.vcsUtil.VcsImplUtil;
193 import org.apache.commons.lang.StringUtils;
194 import org.emergent.bzr4j.core.cli.BzrStandardResult;
195 import org.emergent.bzr4j.intellij.BzrVcs;
196@@ -67,7 +67,7 @@
197 }
198 }
199 } catch (URISyntaxException e) {
200- VcsUtil.showErrorMessage(project, "Invalid destination: " + destination, "Error");
201+ VcsImplUtil.showErrorMessage(project, "Invalid destination: " + destination, "Error");
202 }
203 }
204
205
206=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/ShellCommandService.java'
207--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/ShellCommandService.java 2010-03-02 20:44:47 +0000
208+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/command/ShellCommandService.java 2012-04-15 19:06:23 +0000
209@@ -15,9 +15,8 @@
210 import com.intellij.openapi.diagnostic.Logger;
211 import com.intellij.openapi.project.Project;
212 import com.intellij.openapi.vfs.VirtualFile;
213-import com.intellij.vcsUtil.VcsUtil;
214+import com.intellij.vcsUtil.VcsImplUtil;
215 import org.emergent.bzr4j.core.cli.BzrAbstractResult;
216-import org.emergent.bzr4j.core.cli.BzrExecException;
217 import org.emergent.bzr4j.core.cli.BzrExecService;
218 import org.emergent.bzr4j.core.cli.BzrStandardResult;
219 import org.emergent.bzr4j.core.cli.BzrXmlResult;
220@@ -26,7 +25,6 @@
221 import org.emergent.bzr4j.intellij.BzrVcsMessages;
222 import org.jetbrains.annotations.NotNull;
223 import org.jetbrains.annotations.Nullable;
224-import org.xml.sax.helpers.DefaultHandler;
225
226 import java.io.File;
227 import java.util.List;
228@@ -141,7 +139,7 @@
229 .append(e.getMessage());
230
231 Object[] params = new Object[] { };
232- VcsUtil.showErrorMessage(
233+ VcsImplUtil.showErrorMessage(
234 project,
235 message.toString(),
236 BzrVcsMessages.message("bzr4intellij.error", params)
237
238=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/BzrChangeProvider.java'
239--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/BzrChangeProvider.java 2010-07-29 10:15:04 +0000
240+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/BzrChangeProvider.java 2012-04-15 19:06:23 +0000
241@@ -46,12 +46,7 @@
242 import org.xml.sax.SAXParseException;
243
244 import java.io.File;
245-import java.util.Collection;
246-import java.util.HashMap;
247-import java.util.LinkedHashMap;
248-import java.util.LinkedList;
249-import java.util.List;
250-import java.util.Map;
251+import java.util.*;
252
253 public class BzrChangeProvider implements ChangeProvider {
254
255@@ -93,7 +88,20 @@
256 }
257
258 for (Map.Entry<VirtualFile,FilePath> rootEntry : rootsMap.entrySet()) {
259- process(builder, rootEntry.getKey(), rootEntry.getValue(), rootRevnos);
260+ VirtualFile virtualRoot = rootEntry.getKey();
261+ FilePath rootPath = rootEntry.getValue();
262+
263+ HashMap<VirtualFile, FilePath> subRoots = new HashMap<VirtualFile, FilePath>();
264+ for (Map.Entry<VirtualFile, FilePath> subEntry : rootsMap.entrySet()) {
265+ VirtualFile virtualSubRoot = subEntry.getKey();
266+ FilePath subPath = subEntry.getValue();
267+ if (!subPath.isUnder(rootPath, true)) {
268+ continue;
269+ }
270+ subRoots.put(virtualSubRoot, subPath);
271+ }
272+
273+ process(builder, virtualRoot, rootPath, rootRevnos, subRoots);
274 }
275 } catch (BzrExecException e) {
276 LOG.debug(e);
277@@ -133,7 +141,7 @@
278 ChangelistBuilder builder,
279 VirtualFile vcsVirtualRoot,
280 FilePath filePath,
281- Map<File, BzrRevisionNumber> processedRoots) throws BzrExecException {
282+ Map<File, BzrRevisionNumber> processedRoots, HashMap<VirtualFile, FilePath> subRoots) throws BzrExecException {
283
284 if (filePath.isNonLocal()) {
285 CHANGES.debug("no processing (nonlocal path): " + String.valueOf(filePath));
286@@ -150,6 +158,18 @@
287
288 final File ioRoot = bzrRoot.getFile();
289
290+ Set<File> ioSubRoots = new HashSet<File>();
291+ for (FilePath path : subRoots.values()) {
292+ BazaarRoot bzrSubRoot = BazaarRoot.findBranchLocation(path.getIOFile());
293+ if (bzrSubRoot == null) {
294+ continue;
295+ }
296+ File ioSubRoot = bzrSubRoot.getFile();
297+ if (!ioRoot.equals(ioSubRoot)) {
298+ ioSubRoots.add(ioSubRoot);
299+ }
300+ }
301+
302 final String relpath = target.equals(ioRoot) ? null : BzrUtil.relativePath(ioRoot,target);
303
304 CHANGES.debug("is processing: " + String.valueOf(filePath));
305@@ -162,7 +182,7 @@
306
307 final ShellCommandService service = ShellCommandService.getInstance(m_project);
308
309- MyIgnoredHandler ignoredHandler = new MyIgnoredHandler(builder, ioRoot);
310+ MyIgnoredHandler ignoredHandler = new MyIgnoredHandler(builder, ioRoot, ioSubRoots);
311
312 BzrIdeaExec ignoredExec = new BzrIdeaExec(bzrRoot, "xmlls");
313 ignoredExec.addArguments("--ignored");
314@@ -171,7 +191,7 @@
315 service.executeUnsafe(ignoredExec, BzrXmlResult.createBzrXmlResult(ignoredHandler));
316 ignoredHandler.processResults();
317
318- MyStatusHandler statusHandler = new MyStatusHandler(vcsVirtualRoot, builder, ioRoot, revno);
319+ MyStatusHandler statusHandler = new MyStatusHandler(vcsVirtualRoot, builder, ioRoot, revno, ioSubRoots);
320
321 BzrIdeaExec statusExec = new BzrIdeaExec(bzrRoot, "xmlstatus");
322 statusExec.setStderrValidationEnabled(false);
323@@ -186,11 +206,13 @@
324
325 private ChangelistBuilder m_builder;
326 private File m_bzrRoot;
327+ private Set<File> m_bzrSubRoots;
328 private final Collection<String> m_ignoredList = new LinkedList<String>();
329
330- public MyIgnoredHandler(ChangelistBuilder builder, File bzrRoot) {
331+ public MyIgnoredHandler(ChangelistBuilder builder, File bzrRoot, Set<File> ioSubRoots) {
332 m_builder = builder;
333 m_bzrRoot = bzrRoot;
334+ m_bzrSubRoots = ioSubRoots;
335 }
336
337 public void processResults() {
338@@ -211,6 +233,9 @@
339
340 private void processIgnore(String path) {
341 File ignored = new File(m_bzrRoot, path);
342+ if (m_bzrSubRoots.contains(ignored)) {
343+ return;
344+ }
345 IGNORED.debug(String.format("%10s \"%s\"", "ignored", ignored));
346 m_builder.processIgnoredFile(VcsUtil.getVirtualFile(ignored));
347 }
348@@ -223,12 +248,14 @@
349 private VirtualFile m_vcsRoot;
350 private File m_bzrRoot;
351 private final Collection<GenericChange> m_changes = new LinkedList<GenericChange>();
352+ private Set<File> m_bzrSubRoots;
353
354- public MyStatusHandler(VirtualFile vcsRoot, ChangelistBuilder builder, File bzrRoot, BzrRevisionNumber bzrRev) {
355+ public MyStatusHandler(VirtualFile vcsRoot, ChangelistBuilder builder, File bzrRoot, BzrRevisionNumber bzrRev, Set<File> ioSubRoots) {
356 m_vcsRoot = vcsRoot;
357 m_builder = builder;
358 m_bzrRoot = bzrRoot;
359 m_bzrRev = bzrRev;
360+ m_bzrSubRoots = ioSubRoots;
361 }
362
363 public void processResults() {
364@@ -324,6 +351,10 @@
365 UNKNOWN.debug(String.format("%10s \"%s\"", "unknown", vFile));
366 builder.processUnversionedFile(vFile);
367 if (vFile.isDirectory()) {
368+ File ioFile = VcsUtil.getFilePath(vFile.getPath(), true).getIOFile();
369+ if (this.m_bzrSubRoots.contains(ioFile)) {
370+ return;
371+ }
372 for (VirtualFile child : vFile.getChildren()) {
373 processRecursive(builder, child);
374 }
375
376=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotation.java'
377--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotation.java 2011-01-22 16:02:47 +0000
378+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotation.java 2012-04-15 19:06:23 +0000
379@@ -23,8 +23,8 @@
380 import com.intellij.openapi.vcs.history.VcsRevisionNumber;
381 import org.apache.commons.lang.StringUtils;
382 import org.emergent.bzr4j.intellij.BzrFile;
383-import org.emergent.bzr4j.intellij.BzrFileRevision;
384
385+import java.util.Date;
386 import java.util.LinkedList;
387 import java.util.List;
388
389@@ -103,12 +103,23 @@
390 return annotationLine.getVcsRevisionNumber();
391 }
392
393+ public Date getLineDate(int lineNumber) {
394+ if (lineNumber >= lines.size() || lineNumber < 0) {
395+ return null;
396+ }
397+ return lines.get(lineNumber).getDate();
398+ }
399+
400 public List<VcsFileRevision> getRevisions() {
401 List<VcsFileRevision> result = new LinkedList<VcsFileRevision>();
402 result.addAll(vcsFileRevisions);
403 return result;
404 }
405
406+ public int getLineCount() {
407+ return lines.size();
408+ }
409+
410 class HgLineAnnotationAspect implements LineAnnotationAspect {
411
412 private final FIELD aspectType;
413@@ -139,5 +150,4 @@
414 return false;
415 }
416 }
417-
418 }
419
420=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLine.java'
421--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLine.java 2010-01-05 02:18:38 +0000
422+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLine.java 2012-04-15 19:06:23 +0000
423@@ -14,6 +14,9 @@
424
425 import com.intellij.openapi.vcs.history.VcsRevisionNumber;
426
427+import java.text.ParseException;
428+import java.text.SimpleDateFormat;
429+import java.util.Date;
430 import java.util.EnumMap;
431
432 public class BzrAnnotationLine {
433@@ -21,6 +24,13 @@
434 private EnumMap<BzrAnnotation.FIELD, Object> fields =
435 new EnumMap<BzrAnnotation.FIELD, Object>(BzrAnnotation.FIELD.class);
436
437+ private ThreadLocal<SimpleDateFormat> dateFormat = new ThreadLocal<SimpleDateFormat>() {
438+ @Override
439+ public SimpleDateFormat get() {
440+ return new SimpleDateFormat("yyyyMMdd");
441+ }
442+ };
443+
444 public BzrAnnotationLine(String user, VcsRevisionNumber revision, String date, Integer line, String content) {
445 fields.put(BzrAnnotation.FIELD.USER, user);
446
447@@ -38,4 +48,17 @@
448 return fields.get(field);
449 }
450
451+ public Date getDate() {
452+ String sDate = (String)get(BzrAnnotation.FIELD.DATE);
453+ if (sDate != null) {
454+ try {
455+ return dateFormat.get().parse(sDate);
456+ } catch (ParseException e) {
457+ return null;
458+ }
459+ }
460+ else {
461+ return null;
462+ }
463+ }
464 }
465
466=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCheckinEnvironment.java'
467--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCheckinEnvironment.java 2010-09-29 23:00:58 +0000
468+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCheckinEnvironment.java 2012-04-15 19:06:23 +0000
469@@ -37,6 +37,7 @@
470 import java.util.LinkedList;
471 import java.util.List;
472 import java.util.Map;
473+import java.util.Set;
474
475 public class BzrCheckinEnvironment implements CheckinEnvironment {
476
477@@ -75,7 +76,11 @@
478 }
479
480 @SuppressWarnings({ "ThrowableInstanceNeverThrown" })
481- public List<VcsException> commit(List<Change> changes, String preparedComment, @NotNull NullableFunction<Object, Object> parametersHolder) {
482+ public List<VcsException> commit(
483+ List<Change> changes,
484+ String preparedComment,
485+ @NotNull NullableFunction<Object, Object> parametersHolder,
486+ Set<String> feedback) {
487 List<VcsException> exceptions = new LinkedList<VcsException>();
488 for (Map.Entry<VirtualFile, List<BzrFile>> entry : getFilesByRepository(changes).entrySet()) {
489 BzrCommitCommand command = new BzrCommitCommand(project, entry.getKey(), preparedComment);
490@@ -121,6 +126,10 @@
491 return false;
492 }
493
494+ public boolean isRefreshAfterCommitNeeded() {
495+ return false;
496+ }
497+
498 private Map<VirtualFile, List<BzrFile>> getFilesByRepository(List<Change> changes) {
499 Map<VirtualFile, List<BzrFile>> result = new HashMap<VirtualFile, List<BzrFile>>();
500 for (Change change : changes) {
501
502=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCommitSession.java'
503--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCommitSession.java 2010-01-05 02:18:38 +0000
504+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/provider/commit/BzrCommitSession.java 2012-04-15 19:06:23 +0000
505@@ -19,6 +19,7 @@
506 import com.intellij.openapi.vcs.changes.ContentRevision;
507 import com.intellij.openapi.vcs.changes.VcsDirtyScopeManager;
508 import com.intellij.openapi.vfs.VirtualFile;
509+import com.intellij.vcsUtil.VcsImplUtil;
510 import com.intellij.vcsUtil.VcsUtil;
511 import org.apache.commons.lang.StringUtils;
512 import org.emergent.bzr4j.intellij.BzrVcsMessages;
513@@ -64,7 +65,7 @@
514 vcsDirtyScopeManager.dirDirtyRecursively(root);
515 root.refresh(true, true);
516 } catch (BzrCommandException e) {
517- VcsUtil.showErrorMessage(project, e.getMessage(), "Error");
518+ VcsImplUtil.showErrorMessage(project, e.getMessage(), "Error");
519 }
520 }
521 }
522@@ -97,4 +98,7 @@
523 return result;
524 }
525
526+ public String getHelpId() {
527+ return null;
528+ }
529 }
530
531=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationIdePanel.java'
532--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationIdePanel.java 2010-03-02 20:44:47 +0000
533+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationIdePanel.java 2012-04-15 19:06:23 +0000
534@@ -200,8 +200,8 @@
535 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
536 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
537 panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
538- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
539- "bzr4intellij.path_to_executable.text")));
540+ ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
541+ .getString("bzr4intellij.path_to_executable.text")));
542 pathSelector = new TextFieldWithBrowseButton();
543 pathSelector.setEnabled(true);
544 panel1.add(pathSelector,
545@@ -210,9 +210,8 @@
546 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, new Dimension(100, -1), null,
547 null, 0, false));
548 pathDefaultButton = new JButton();
549- this.$$$loadButtonText$$$(pathDefaultButton,
550- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
551- "configdialog.default_path_button.text"));
552+ this.$$$loadButtonText$$$(pathDefaultButton, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
553+ .getString("configdialog.default_path_button.text"));
554 panel1.add(pathDefaultButton,
555 new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
556 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
557@@ -232,12 +231,12 @@
558 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
559 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
560 panel2.setBorder(BorderFactory.createTitledBorder(
561- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
562- "configpanel.miscellaneous_group.text")));
563+ ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
564+ .getString("configpanel.miscellaneous_group.text")));
565 m_trimAnnotationCheckBox = new JCheckBox();
566 this.$$$loadButtonText$$$(m_trimAnnotationCheckBox,
567- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
568- "configpanel.trim_annotation_author.text"));
569+ ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
570+ .getString("configpanel.trim_annotation_author.text"));
571 panel2.add(m_trimAnnotationCheckBox,
572 new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
573 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
574@@ -247,8 +246,8 @@
575 GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
576 m_modalErrorPopupEnabledCheckBox = new JCheckBox();
577 this.$$$loadButtonText$$$(m_modalErrorPopupEnabledCheckBox,
578- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
579- "configpanel.allow_modal_error_popup.text"));
580+ ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
581+ .getString("configpanel.allow_modal_error_popup.text"));
582 panel2.add(m_modalErrorPopupEnabledCheckBox,
583 new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
584 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
585@@ -259,8 +258,8 @@
586 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
587 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
588 panel3.setBorder(BorderFactory.createTitledBorder(
589- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
590- "configpanel.envvars_group.text")));
591+ ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
592+ .getString("configpanel.envvars_group.text")));
593 m_envBzrEmailTextField = new JTextField();
594 m_envBzrEmailTextField.setEnabled(true);
595 m_envBzrEmailTextField.setText("");
596@@ -298,12 +297,12 @@
597 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
598 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
599 panel4.setBorder(BorderFactory.createTitledBorder(
600- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
601- "configpanel.experimental_group.text")));
602+ ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
603+ .getString("configpanel.experimental_group.text")));
604 m_granularExecLockingCheckBox = new JCheckBox();
605 this.$$$loadButtonText$$$(m_granularExecLockingCheckBox,
606- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
607- "configpanel.fine_grained_exec_locking.text"));
608+ ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
609+ .getString("configpanel.fine_grained_exec_locking.text"));
610 panel4.add(m_granularExecLockingCheckBox,
611 new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
612 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
613
614=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationProjectPanel.java'
615--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationProjectPanel.java 2010-03-02 20:44:47 +0000
616+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrConfigurationProjectPanel.java 2012-04-15 19:06:23 +0000
617@@ -76,8 +76,9 @@
618 m_panel = new JPanel();
619 m_panel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
620 final Spacer spacer1 = new Spacer();
621- m_panel.add(spacer1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
622- GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
623+ m_panel.add(spacer1,
624+ new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
625+ GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
626 final JPanel panel1 = new JPanel();
627 panel1.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
628 m_panel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
629@@ -108,12 +109,11 @@
630 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
631 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
632 panel2.setBorder(BorderFactory.createTitledBorder(
633- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
634- "configpanel.miscellaneous_group.text")));
635+ ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
636+ .getString("configpanel.miscellaneous_group.text")));
637 m_autoFixRootsCbx = new JCheckBox();
638- this.$$$loadButtonText$$$(m_autoFixRootsCbx,
639- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
640- "configpanel.check_roots_enabled.text"));
641+ this.$$$loadButtonText$$$(m_autoFixRootsCbx, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
642+ .getString("configpanel.check_roots_enabled.text"));
643 panel2.add(m_autoFixRootsCbx,
644 new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
645 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
646
647=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrIntegrateDialog.java'
648--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrIntegrateDialog.java 2010-01-05 02:18:38 +0000
649+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrIntegrateDialog.java 2012-04-15 19:06:23 +0000
650@@ -170,61 +170,55 @@
651 contentPanel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
652 final JPanel panel1 = new JPanel();
653 panel1.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
654- contentPanel.add(panel1,
655- new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
656- GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
657- GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null,
658- 0, false));
659+ contentPanel.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
660+ GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
661+ GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
662 panel1.setBorder(BorderFactory.createTitledBorder(
663- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
664- "dialog.integrate.merge_from")));
665+ ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
666+ .getString("dialog.integrate.merge_from")));
667 branchOption = new JRadioButton();
668 branchOption.setSelected(true);
669 branchOption.setText("Branch");
670 branchOption.setMnemonic('B');
671 branchOption.setDisplayedMnemonicIndex(0);
672 panel1.add(branchOption, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
673- GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
674- GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
675+ GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED,
676+ null, null, null, 0, false));
677 tagOption = new JRadioButton();
678 tagOption.setText("Tag");
679 tagOption.setMnemonic('T');
680 tagOption.setDisplayedMnemonicIndex(0);
681 panel1.add(tagOption, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
682- GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
683- GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
684+ GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED,
685+ null, null, null, 0, false));
686 branchSelector = new JComboBox();
687 branchSelector.setEditable(true);
688 branchSelector.setEnabled(true);
689 panel1.add(branchSelector,
690 new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
691- GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
692- false));
693+ GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
694 tagSelector = new JComboBox();
695 tagSelector.setEnabled(false);
696 panel1.add(tagSelector,
697 new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
698- GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
699- false));
700+ GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
701 final Spacer spacer1 = new Spacer();
702- panel1.add(spacer1,
703- new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
704- GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
705+ panel1.add(spacer1, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
706+ GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
707 revisionTxt = new JTextField();
708 revisionTxt.setEnabled(false);
709 panel1.add(revisionTxt,
710 new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
711- GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,
712- new Dimension(150, -1), null, 0, false));
713+ GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null,
714+ 0, false));
715 revisionOption = new JRadioButton();
716 revisionOption.setSelected(false);
717 revisionOption.setText("Revision");
718 revisionOption.setMnemonic('R');
719 revisionOption.setDisplayedMnemonicIndex(0);
720- panel1.add(revisionOption,
721- new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
722- GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
723- GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
724+ panel1.add(revisionOption, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
725+ GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED,
726+ null, null, null, 0, false));
727 final Spacer spacer2 = new Spacer();
728 contentPanel.add(spacer2,
729 new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
730@@ -233,8 +227,7 @@
731 contentPanel.add(repositorySelectorComponent.$$$getRootComponent$$$(),
732 new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
733 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
734- GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null,
735- 0, false));
736+ GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
737 ButtonGroup buttonGroup;
738 buttonGroup = new ButtonGroup();
739 buttonGroup.add(revisionOption);
740
741=== modified file 'modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrSendErrorForm.java'
742--- modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrSendErrorForm.java 2010-03-02 20:49:34 +0000
743+++ modules/intellij/src/main/java/org/emergent/bzr4j/intellij/ui/BzrSendErrorForm.java 2012-04-15 19:06:23 +0000
744@@ -147,8 +147,8 @@
745 myMainPanel = new JPanel();
746 myMainPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));
747 final JLabel label1 = new JLabel();
748- this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
749- "diagnostic.error.report.prompt"));
750+ this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
751+ .getString("diagnostic.error.report.prompt"));
752 myMainPanel.add(label1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
753 GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
754 final JScrollPane scrollPane1 = new JScrollPane();
755@@ -170,21 +170,21 @@
756 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
757 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
758 panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
759- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
760- "diagnostic.error.report.login.group")));
761+ ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
762+ .getString("diagnostic.error.report.login.group")));
763 final JPanel panel2 = new JPanel();
764 panel2.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
765 panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
766 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
767 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
768 final JLabel label2 = new JLabel();
769- this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
770- "diagnostic.error.report.login.password"));
771+ this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
772+ .getString("diagnostic.error.report.login.password"));
773 panel2.add(label2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
774 GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
775 final JLabel label3 = new JLabel();
776- this.$$$loadLabelText$$$(label3, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
777- "diagnostic.error.report.login.name"));
778+ this.$$$loadLabelText$$$(label3, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
779+ .getString("diagnostic.error.report.login.name"));
780 panel2.add(label3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
781 GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
782 myItnLoginTextField = new JTextField();
783@@ -198,13 +198,13 @@
784 GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null,
785 0, false));
786 final JLabel label4 = new JLabel();
787- this.$$$loadLabelText$$$(label4, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
788- "diagnostic.error.report.smtp.server"));
789+ this.$$$loadLabelText$$$(label4, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
790+ .getString("diagnostic.error.report.smtp.server"));
791 panel2.add(label4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
792 GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
793 final JLabel label5 = new JLabel();
794- this.$$$loadLabelText$$$(label5, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
795- "diagnostic.error.report.email"));
796+ this.$$$loadLabelText$$$(label5, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
797+ .getString("diagnostic.error.report.email"));
798 panel2.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
799 GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
800 myItnServerTextField = new JTextField();
801@@ -220,15 +220,15 @@
802 0, false));
803 myRememberITNPasswordCheckBox = new JCheckBox();
804 this.$$$loadButtonText$$$(myRememberITNPasswordCheckBox,
805- ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
806- "diagnostic.error.report.login.remember.password.checkbox"));
807+ ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
808+ .getString("diagnostic.error.report.login.remember.password.checkbox"));
809 panel1.add(myRememberITNPasswordCheckBox,
810 new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
811 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
812 GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
813 final JLabel label6 = new JLabel();
814- this.$$$loadLabelText$$$(label6, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages").getString(
815- "diagnostic.error.report.description"));
816+ this.$$$loadLabelText$$$(label6, ResourceBundle.getBundle("org/emergent/bzr4j/intellij/BzrVcsMessages")
817+ .getString("diagnostic.error.report.description"));
818 myMainPanel.add(label6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
819 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
820 GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
821
822=== modified file 'modules/intellij/src/main/resources/META-INF/plugin.xml'
823--- modules/intellij/src/main/resources/META-INF/plugin.xml 2011-02-15 12:12:50 +0000
824+++ modules/intellij/src/main/resources/META-INF/plugin.xml 2012-04-15 19:06:23 +0000
825@@ -95,6 +95,10 @@
826
827 <change-notes>
828 <![CDATA[
829+ <h3>Changes since 2.6.1</h3>
830+ <ul>
831+ <li>[feature] Supports IntelliJ IDEA 11.0</li>
832+ </ul>
833 <h3>Changes since 2.6.0</h3>
834 <ul>
835 <li>[bugfix] <a href="https://launchpad.net/bugs/716279">716279</a>
836
837=== added directory 'modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider'
838=== added directory 'modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider/annotate'
839=== added file 'modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLineTest.java'
840--- modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLineTest.java 1970-01-01 00:00:00 +0000
841+++ modules/intellij/src/test/java/org/emergent/bzr4j/intellij/provider/annotate/BzrAnnotationLineTest.java 2012-04-15 19:06:23 +0000
842@@ -0,0 +1,39 @@
843+/*
844+ * Copyright (c) 2011 Francis Devereux
845+ *
846+ * Licensed under the Apache License, Version 2.0 (the "License"); you
847+ * may not use this file except in compliance with the License. You may
848+ * obtain a copy of the License at
849+ *
850+ * http://www.apache.org/licenses/LICENSE-2.0
851+ *
852+ * Unless required by applicable law or agreed to in writing, software
853+ * distributed under the License is distributed on an "AS IS" BASIS,
854+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
855+ * implied. See the License for the specific language governing
856+ * permissions and limitations under the License.
857+ */
858+
859+package org.emergent.bzr4j.intellij.provider.annotate;
860+
861+import static org.testng.Assert.*;
862+import org.testng.annotations.Test;
863+
864+import java.util.Calendar;
865+import java.util.Date;
866+
867+/**
868+ * @author Francis Devereux
869+ */
870+public class BzrAnnotationLineTest {
871+ @Test
872+ public void testGetDate() {
873+ BzrAnnotationLine line = new BzrAnnotationLine("user", null, "20091210", 32, " public static void main(String args[])");
874+ Date d = line.getDate();
875+ Calendar c = Calendar.getInstance();
876+ c.setTime(d);
877+ assertEquals(2009, c.get(Calendar.YEAR));
878+ assertEquals(11, c.get(Calendar.MONTH));
879+ assertEquals(10, c.get(Calendar.DAY_OF_MONTH));
880+ }
881+}
882
883=== modified file 'modules/teamcity/pom.xml'
884--- modules/teamcity/pom.xml 2011-02-15 12:12:50 +0000
885+++ modules/teamcity/pom.xml 2012-04-15 19:06:23 +0000
886@@ -6,7 +6,7 @@
887
888 <groupId>org.emergent.bzr4j</groupId>
889 <artifactId>bzr4teamcity</artifactId>
890- <version>2.6.1</version>
891+ <version>2.6.2-SNAPSHOT</version>
892 <packaging>jar</packaging>
893 <name>Bzr4TeamCity Plugin</name>
894 <url>http://launchpad.net/bzr4j</url>
895
896=== modified file 'pom.xml'
897--- pom.xml 2011-02-15 12:12:50 +0000
898+++ pom.xml 2012-04-15 19:06:23 +0000
899@@ -5,7 +5,7 @@
900
901 <groupId>org.emergent.bzr4j</groupId>
902 <artifactId>bzr4j</artifactId>
903- <version>2.6.1</version>
904+ <version>2.6.2-SNAPSHOT</version>
905 <packaging>pom</packaging>
906 <name>Bzr4J Aggregator Project</name>
907 <url>http://launchpad.net/bzr4j</url>

Subscribers

People subscribed via source and target branches