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
This commit is contained in:
commit
b9691b94a3
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -455,6 +455,19 @@ public void testGetRefs_TagsOnly_AllLoose() throws IOException {
|
|||
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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -288,6 +288,7 @@ public Map<String, Ref> getRefs(String prefix) throws IOException {
|
|||
|
||||
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 Map<String, Ref> getRefs(String prefix) throws IOException {
|
|||
loose = loose.remove(toRemove);
|
||||
}
|
||||
}
|
||||
symbolic.sort();
|
||||
|
||||
return new RefMap(prefix, packed, upcast(loose), symbolic.toRefList());
|
||||
}
|
||||
|
|
40
pom.xml
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…
Reference in New Issue