Browse Source

Merge branch 'stable-0.12'

* stable-0.12:
  Fix sorting of names in RefDirectory
  Make running static checks configurable in maven build
  Add constants for gerrit change id configuration
stable-1.0
Shawn O. Pearce 14 years ago
parent
commit
b9691b94a3
  1. 35
      org.eclipse.jgit.console/pom.xml
  2. 33
      org.eclipse.jgit.http.server/pom.xml
  3. 13
      org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefDirectoryTest.java
  4. 33
      org.eclipse.jgit.ui/pom.xml
  5. 47
      org.eclipse.jgit/pom.xml
  6. 6
      org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
  7. 2
      org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java
  8. 40
      pom.xml

35
org.eclipse.jgit.console/pom.xml

@ -107,39 +107,6 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<sourceEncoding>utf-8</sourceEncoding>
<minimumTokens>100</minimumTokens>
<targetJdk>1.5</targetJdk>
<format>xml</format>
<failOnViolation>false</failOnViolation>
</configuration>
<executions>
<execution>
<goals>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</plugins>
</build>
</project>

33
org.eclipse.jgit.http.server/pom.xml

@ -124,39 +124,6 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<sourceEncoding>utf-8</sourceEncoding>
<minimumTokens>100</minimumTokens>
<targetJdk>1.5</targetJdk>
<format>xml</format>
<failOnViolation>false</failOnViolation>
</configuration>
<executions>
<execution>
<goals>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

13
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefDirectoryTest.java

@ -455,6 +455,19 @@ public class RefDirectoryTest extends LocalDiskRepositoryTestCase {
assertEquals(v1_0, a.getObjectId());
}
@Test
public void testGetRefs_LooseSortedCorrectly() throws IOException {
Map<String, Ref> refs;
writeLooseRef("refs/heads/project1/A", A);
writeLooseRef("refs/heads/project1-B", B);
refs = refdir.getRefs(RefDatabase.ALL);
assertEquals(2, refs.size());
assertEquals(A, refs.get("refs/heads/project1/A").getObjectId());
assertEquals(B, refs.get("refs/heads/project1-B").getObjectId());
}
@Test
public void testGetRefs_TagsOnly_AllPacked() throws IOException {
Map<String, Ref> tags;

33
org.eclipse.jgit.ui/pom.xml

@ -98,39 +98,6 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<sourceEncoding>utf-8</sourceEncoding>
<minimumTokens>100</minimumTokens>
<targetJdk>1.5</targetJdk>
<format>xml</format>
<failOnViolation>false</failOnViolation>
</configuration>
<executions>
<execution>
<goals>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

47
org.eclipse.jgit/pom.xml

@ -141,42 +141,17 @@
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<failOnError>false</failOnError>
<excludeFilterFile>findBugs/FindBugsExcludeFilter.xml</excludeFilterFile>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<sourceEncoding>utf-8</sourceEncoding>
<minimumTokens>100</minimumTokens>
<targetJdk>1.5</targetJdk>
<format>xml</format>
<failOnViolation>false</failOnViolation>
</configuration>
<executions>
<execution>
<goals>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>findBugs/FindBugsExcludeFilter.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

6
org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java

@ -63,6 +63,9 @@ public class ConfigConstants {
/** The "user" section */
public static final String CONFIG_USER_SECTION = "user";
/** The "gerrit" section */
public static final String CONFIG_GERRIT_SECTION = "gerrit";
/** The "algorithm" key */
public static final String CONFIG_KEY_ALGORITHM = "algorithm";
@ -127,4 +130,7 @@ public class ConfigConstants {
/** The "local" key (used to configure {@link #CONFIG_KEY_AUTOSETUPREBASE} */
public static final String CONFIG_KEY_LOCAL = "local";
/** The "createchangeid" key */
public static final String CONFIG_KEY_CREATECHANGEID = "createchangeid";
}

2
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java

@ -288,6 +288,7 @@ public class RefDirectory extends RefDatabase {
RefList<LooseRef> loose;
if (scan.newLoose != null) {
scan.newLoose.sort();
loose = scan.newLoose.toRefList();
if (looseRefs.compareAndSet(oldLoose, loose))
modCnt.incrementAndGet();
@ -312,6 +313,7 @@ public class RefDirectory extends RefDatabase {
loose = loose.remove(toRemove);
}
}
symbolic.sort();
return new RefMap(prefix, packed, upcast(loose), symbolic.toRefList());
}

40
pom.xml

@ -226,12 +226,37 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.3.2-SNAPSHOT</version>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.5</version>
<configuration>
<sourceEncoding>utf-8</sourceEncoding>
<minimumTokens>100</minimumTokens>
<targetJdk>1.5</targetJdk>
<format>xml</format>
<failOnViolation>false</failOnViolation>
</configuration>
<executions>
<execution>
<goals>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
@ -361,6 +386,21 @@
<module>org.eclipse.jgit.console</module>
</modules>
</profile>
<profile>
<id>static-checks</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<modules>

Loading…
Cancel
Save