The Unified and Autonomous Development Platform
Merge branch 'master' of https://git.pmease.com/p/robin/commons.git
robin shine1d13bccb1b80
diff --cc commons.git/pom.xmlindex ecd54c14f0,ecd54c14f0..c2bbc2ca26--- a/commons.git/pom.xml+++ b/commons.git/pom.xml@@@ -1,67 -1,67 +1,67 @@@--<?xml version="1.0" encoding="UTF-8"?>----<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"-- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">-- <modelVersion>4.0.0</modelVersion>-- <artifactId>commons.git</artifactId>-- <version>1.0.0</version>-- <parent>-- <groupId>com.pmease</groupId>-- <artifactId>parent.general</artifactId>-- <version>1.0.31</version>-- </parent>-- <build>-- <plugins>-- <plugin>-- <groupId>com.pmease</groupId>-- <artifactId>plugin.maven</artifactId>-- </plugin>-- <!-- Uncomment below if you'd like to publish an archetype based on your-- plugin -->-- <!--plugin> <artifactId>maven-archetype-plugin</artifactId> </plugin -->-- <plugin>-- <artifactId>maven-source-plugin</artifactId>-- </plugin>-- <plugin>-- <artifactId>maven-javadoc-plugin</artifactId>-- </plugin>-- </plugins>-- </build>-- <dependencies>-- <dependency>-- <groupId>com.pmease</groupId>-- <artifactId>commons.loader</artifactId>-- <version>1.0.31</version>-- </dependency>-- <dependency>-- <groupId>org.eclipse.jgit</groupId>-- <artifactId>org.eclipse.jgit.http.server</artifactId>-- <version>3.0.0.201306101825-r</version>-- </dependency>-- <dependency>-- <groupId>com.pmease</groupId>-- <artifactId>commons.util</artifactId>-- <version>1.0.31</version>-- </dependency>-- </dependencies>-- <repositories>-- <repository>-- <id>pmeaseRepo</id>-- <name>PMEase Repository</name>-- <releases>-- <enabled>true</enabled>-- <updatePolicy>never</updatePolicy>-- <checksumPolicy>fail</checksumPolicy>-- </releases>-- <snapshots>-- <enabled>true</enabled>-- <updatePolicy>always</updatePolicy>-- <checksumPolicy>fail</checksumPolicy>-- </snapshots>-- <url>http://artifact.pmease.com/</url>-- </repository>-- </repositories>-- <properties>-- <moduleClass>com.pmease.commons.git.GitModule</moduleClass>-- </properties>--</project>++<?xml version="1.0" encoding="UTF-8"?>++++<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"++ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">++ <modelVersion>4.0.0</modelVersion>++ <artifactId>commons.git</artifactId>++ <version>1.0.0</version>++ <parent>++ <groupId>com.pmease</groupId>++ <artifactId>parent.general</artifactId>++ <version>1.0.31</version>++ </parent>++ <build>++ <plugins>++ <plugin>++ <groupId>com.pmease</groupId>++ <artifactId>plugin.maven</artifactId>++ </plugin>++ <!-- Uncomment below if you'd like to publish an archetype based on your++ plugin -->++ <!--plugin> <artifactId>maven-archetype-plugin</artifactId> </plugin -->++ <plugin>++ <artifactId>maven-source-plugin</artifactId>++ </plugin>++ <plugin>++ <artifactId>maven-javadoc-plugin</artifactId>++ </plugin>++ </plugins>++ </build>++ <dependencies>++ <dependency>++ <groupId>com.pmease</groupId>++ <artifactId>commons.loader</artifactId>++ <version>1.0.31</version>++ </dependency>++ <dependency>++ <groupId>org.eclipse.jgit</groupId>++ <artifactId>org.eclipse.jgit.http.server</artifactId>++ <version>3.0.0.201306101825-r</version>++ </dependency>++ <dependency>++ <groupId>com.pmease</groupId>++ <artifactId>commons.util</artifactId>++ <version>1.0.31</version>++ </dependency>++ </dependencies>++ <repositories>++ <repository>++ <id>pmeaseRepo</id>++ <name>PMEase Repository</name>++ <releases>++ <enabled>true</enabled>++ <updatePolicy>never</updatePolicy>++ <checksumPolicy>fail</checksumPolicy>++ </releases>++ <snapshots>++ <enabled>true</enabled>++ <updatePolicy>always</updatePolicy>++ <checksumPolicy>fail</checksumPolicy>++ </snapshots>++ <url>http://artifact.pmease.com/</url>++ </repository>++ </repositories>++ <properties>++ <moduleClass>com.pmease.commons.git.GitModule</moduleClass>++ </properties>++</project>diff --cc commons.git/src/main/java/com/pmease/commons/git/GitModule.javaindex 818659e343,818659e343..5c7bfee77f--- a/commons.git/src/main/java/com/pmease/commons/git/GitModule.java+++ b/commons.git/src/main/java/com/pmease/commons/git/GitModule.java@@@ -1,18 -1,18 +1,18 @@@--package com.pmease.commons.git;----import com.pmease.commons.loader.AbstractPluginModule;----/**-- * NOTE: Do not forget to rename moduleClass property defined in the pom if you've renamed this class.-- *-- */--public class GitModule extends AbstractPluginModule {---- @Override-- protected void configure() {-- super.configure();---- // put your guice bindings here-- }----}++package com.pmease.commons.git;++++import com.pmease.commons.loader.AbstractPluginModule;++++/**++ * NOTE: Do not forget to rename moduleClass property defined in the pom if you've renamed this class.++ *++ */++public class GitModule extends AbstractPluginModule {++++ @Override++ protected void configure() {++ super.configure();++++ // put your guice bindings here++ }++++}diff --cc commons.util/pom.xmlindex 8e2cd01f71,8e2cd01f71..913cedf74f--- a/commons.util/pom.xml+++ b/commons.util/pom.xml@@@ -1,106 -1,106 +1,106 @@@--<?xml version="1.0" encoding="UTF-8"?>----<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"-- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">-- <modelVersion>4.0.0</modelVersion>-- <parent>-- <groupId>com.pmease</groupId>-- <artifactId>parent.general</artifactId>-- <version>1.0.31</version>-- </parent>-- <artifactId>commons.util</artifactId>-- <build>-- <plugins>-- <plugin>-- <groupId>com.pmease</groupId>-- <artifactId>plugin.maven</artifactId>-- </plugin>-- <plugin>-- <artifactId>maven-source-plugin</artifactId>-- </plugin>-- <plugin>-- <artifactId>maven-javadoc-plugin</artifactId>-- </plugin>-- </plugins>-- </build>-- <dependencies>-- <dependency>-- <groupId>org.apache.commons</groupId>-- <artifactId>commons-lang3</artifactId>-- </dependency>-- <dependency>-- <groupId>commons-codec</groupId>-- <artifactId>commons-codec</artifactId>-- </dependency>-- <dependency>-- <groupId>javax.servlet</groupId>-- <artifactId>javax.servlet-api</artifactId>-- </dependency>-- <dependency>-- <groupId>commons-io</groupId>-- <artifactId>commons-io</artifactId>-- </dependency>-- <dependency>-- <groupId>com.google.code.findbugs</groupId>-- <artifactId>jsr305</artifactId>-- </dependency>-- <dependency>-- <groupId>com.google.guava</groupId>-- <artifactId>guava</artifactId>-- </dependency>-- <dependency>-- <groupId>org.quartz-scheduler</groupId>-- <artifactId>quartz</artifactId>-- </dependency>-- <dependency>-- <groupId>com.pmease</groupId>-- <artifactId>commons.bootstrap</artifactId>-- <version>1.0.31</version>-- </dependency>-- <dependency>-- <groupId>dom4j</groupId>-- <artifactId>dom4j</artifactId>-- </dependency>-- <dependency>-- <groupId>org.apache.commons</groupId>-- <artifactId>commons-lang3</artifactId>-- </dependency>-- <dependency>-- <groupId>commons-httpclient</groupId>-- <artifactId>commons-httpclient</artifactId>-- </dependency>-- <dependency>-- <groupId>joda-time</groupId>-- <artifactId>joda-time</artifactId>-- </dependency>-- <dependency>-- <groupId>commons-collections</groupId>-- <artifactId>commons-collections</artifactId>-- </dependency>-- <dependency>-- <groupId>org.apache.ant</groupId>-- <artifactId>ant</artifactId>-- </dependency>-- <dependency>-- <groupId>org.javassist</groupId>-- <artifactId>javassist</artifactId>-- </dependency>-- </dependencies>-- <repositories>-- <repository>-- <id>pmeaseRepo</id>-- <name>PMEase Repository</name>-- <releases>-- <enabled>true</enabled>-- <updatePolicy>never</updatePolicy>-- <checksumPolicy>fail</checksumPolicy>-- </releases>-- <snapshots>-- <enabled>true</enabled>-- <updatePolicy>always</updatePolicy>-- <checksumPolicy>fail</checksumPolicy>-- </snapshots>-- <url>http://artifact.pmease.com/</url>-- </repository>-- </repositories>--</project>++<?xml version="1.0" encoding="UTF-8"?>++++<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"++ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">++ <modelVersion>4.0.0</modelVersion>++ <parent>++ <groupId>com.pmease</groupId>++ <artifactId>parent.general</artifactId>++ <version>1.0.31</version>++ </parent>++ <artifactId>commons.util</artifactId>++ <build>++ <plugins>++ <plugin>++ <groupId>com.pmease</groupId>++ <artifactId>plugin.maven</artifactId>++ </plugin>++ <plugin>++ <artifactId>maven-source-plugin</artifactId>++ </plugin>++ <plugin>++ <artifactId>maven-javadoc-plugin</artifactId>++ </plugin>++ </plugins>++ </build>++ <dependencies>++ <dependency>++ <groupId>org.apache.commons</groupId>++ <artifactId>commons-lang3</artifactId>++ </dependency>++ <dependency>++ <groupId>commons-codec</groupId>++ <artifactId>commons-codec</artifactId>++ </dependency>++ <dependency>++ <groupId>javax.servlet</groupId>++ <artifactId>javax.servlet-api</artifactId>++ </dependency>++ <dependency>++ <groupId>commons-io</groupId>++ <artifactId>commons-io</artifactId>++ </dependency>++ <dependency>++ <groupId>com.google.code.findbugs</groupId>++ <artifactId>jsr305</artifactId>++ </dependency>++ <dependency>++ <groupId>com.google.guava</groupId>++ <artifactId>guava</artifactId>++ </dependency>++ <dependency>++ <groupId>org.quartz-scheduler</groupId>++ <artifactId>quartz</artifactId>++ </dependency>++ <dependency>++ <groupId>com.pmease</groupId>++ <artifactId>commons.bootstrap</artifactId>++ <version>1.0.31</version>++ </dependency>++ <dependency>++ <groupId>dom4j</groupId>++ <artifactId>dom4j</artifactId>++ </dependency>++ <dependency>++ <groupId>org.apache.commons</groupId>++ <artifactId>commons-lang3</artifactId>++ </dependency>++ <dependency>++ <groupId>commons-httpclient</groupId>++ <artifactId>commons-httpclient</artifactId>++ </dependency>++ <dependency>++ <groupId>joda-time</groupId>++ <artifactId>joda-time</artifactId>++ </dependency>++ <dependency>++ <groupId>commons-collections</groupId>++ <artifactId>commons-collections</artifactId>++ </dependency>++ <dependency>++ <groupId>org.apache.ant</groupId>++ <artifactId>ant</artifactId>++ </dependency>++ <dependency>++ <groupId>org.javassist</groupId>++ <artifactId>javassist</artifactId>++ </dependency>++ </dependencies>++ <repositories>++ <repository>++ <id>pmeaseRepo</id>++ <name>PMEase Repository</name>++ <releases>++ <enabled>true</enabled>++ <updatePolicy>never</updatePolicy>++ <checksumPolicy>fail</checksumPolicy>++ </releases>++ <snapshots>++ <enabled>true</enabled>++ <updatePolicy>always</updatePolicy>++ <checksumPolicy>fail</checksumPolicy>++ </snapshots>++ <url>http://artifact.pmease.com/</url>++ </repository>++ </repositories>++</project>diff --cc commons.util/src/main/java/com/pmease/commons/util/diff/DiffChunk.javaindex 479c4a5523,479c4a5523..2da363d3ed--- a/commons.util/src/main/java/com/pmease/commons/util/diff/DiffChunk.java+++ b/commons.util/src/main/java/com/pmease/commons/util/diff/DiffChunk.java@@@ -1,61 -1,61 +1,61 @@@--package com.pmease.commons.util.diff;----import java.util.ArrayList;--import java.util.Collections;--import java.util.List;----public class DiffChunk {---- private final int start1;---- private final int start2;---- public final List<DiffUnit> diffUnits;---- public DiffChunk(int start1, int start2, List<DiffUnit> diffUnits) {-- this.start1 = start1;-- this.start2 = start2;-- this.diffUnits = new ArrayList<>(diffUnits);-- }---- /**-- * Get starting row number of original part of this diff chunk. <tt>0</tt> represents-- * the first row.-- *-- * @return-- * starting row number of original part of the diff chunk-- */-- public int getStart1() {-- return start1;-- }---- /**-- * Get starting row number of revised part of this diff chunk. <tt>0</tt> represents-- * the first row.-- *-- * @return-- * starting row number of revised part of the diff chunk-- */-- public int getStart2() {-- return start2;-- }---- public List<DiffUnit> getDiffUnits() {-- return Collections.unmodifiableList(diffUnits);-- }---- /**-- * Get string representation of this diff chunk. It will mimics the unified diff format,-- * so row number will be increased by one, that is, the first row will be represented-- * by <tt>1</tt>.-- */-- @Override-- public String toString() {-- StringBuffer buffer = new StringBuffer();-- buffer.append("@@ -").append(start1+1).append(" +").append(start2+1).append(" @@\n");-- for (DiffUnit token: diffUnits)-- buffer.append(token).append("\n");-- return buffer.toString();-- }----}++package com.pmease.commons.util.diff;++++import java.util.ArrayList;++import java.util.Collections;++import java.util.List;++++public class DiffChunk {++++ private final int start1;++++ private final int start2;++++ public final List<DiffUnit> diffUnits;++++ public DiffChunk(int start1, int start2, List<DiffUnit> diffUnits) {++ this.start1 = start1;++ this.start2 = start2;++ this.diffUnits = new ArrayList<>(diffUnits);++ }++++ /**++ * Get starting row number of original part of this diff chunk. <tt>0</tt> represents++ * the first row.++ *++ * @return++ * starting row number of original part of the diff chunk++ */++ public int getStart1() {++ return start1;++ }++++ /**++ * Get starting row number of revised part of this diff chunk. <tt>0</tt> represents++ * the first row.++ *++ * @return++ * starting row number of revised part of the diff chunk++ */++ public int getStart2() {++ return start2;++ }++++ public List<DiffUnit> getDiffUnits() {++ return Collections.unmodifiableList(diffUnits);++ }++++ /**++ * Get string representation of this diff chunk. It will mimics the unified diff format,++ * so row number will be increased by one, that is, the first row will be represented++ * by <tt>1</tt>.++ */++ @Override++ public String toString() {++ StringBuffer buffer = new StringBuffer();++ buffer.append("@@ -").append(start1+1).append(" +").append(start2+1).append(" @@\n");++ for (DiffUnit token: diffUnits)++ buffer.append(token).append("\n");++ return buffer.toString();++ }++++}diff --cc commons.util/src/main/java/com/pmease/commons/util/diff/DiffUnit.javaindex 3ccc9065d2,3ccc9065d2..4434be5601--- a/commons.util/src/main/java/com/pmease/commons/util/diff/DiffUnit.java+++ b/commons.util/src/main/java/com/pmease/commons/util/diff/DiffUnit.java@@@ -1,81 -1,81 +1,81 @@@--package com.pmease.commons.util.diff;----import javax.annotation.Nullable;----public class DiffUnit {---- public enum Action {-- INSERT,-- EQUAL,-- DELETE;---- public static Action fromOperation(DiffMatchPatch.Operation operation) {-- if (operation == DiffMatchPatch.Operation.DELETE)-- return DELETE;-- else if (operation == DiffMatchPatch.Operation.EQUAL)-- return EQUAL;-- else-- return INSERT;-- }---- public DiffMatchPatch.Operation toOperation() {-- if (this == INSERT)-- return DiffMatchPatch.Operation.INSERT;-- else if (this == EQUAL)-- return DiffMatchPatch.Operation.EQUAL;-- else-- return DiffMatchPatch.Operation.DELETE;-- }-- }---- private final Action action;---- private final String text;---- private final String warnings;---- public DiffUnit(Action action, String text, @Nullable String warnings) {-- this.action = action;-- this.text = text;-- this.warnings = warnings;-- }---- public DiffUnit(Action action, String text) {-- this(action, text, null);-- }---- public Action getAction() {-- return action;-- }---- public String getText() {-- return text;-- }---- /**-- * Get warnings attached to this diff unit.-- *-- * @return-- * warnings attached to this diff unit. Multiple warnings are separated-- * by new line character. <tt>null</tt> will be returned if no warnings.-- */-- public @Nullable String getWarnings() {-- return warnings;-- }---- @Override-- public String toString() {-- StringBuffer buffer = new StringBuffer();-- if (action == Action.DELETE)-- buffer.append("-").append(text);-- else if (action == Action.EQUAL)-- buffer.append(" ").append(text);-- else-- buffer.append("+").append(text);---- if (warnings != null)-- buffer.append("\n").append(warnings);---- return buffer.toString();-- }--}++package com.pmease.commons.util.diff;++++import javax.annotation.Nullable;++++public class DiffUnit {++++ public enum Action {++ INSERT,++ EQUAL,++ DELETE;++++ public static Action fromOperation(DiffMatchPatch.Operation operation) {++ if (operation == DiffMatchPatch.Operation.DELETE)++ return DELETE;++ else if (operation == DiffMatchPatch.Operation.EQUAL)++ return EQUAL;++ else++ return INSERT;++ }++++ public DiffMatchPatch.Operation toOperation() {++ if (this == INSERT)++ return DiffMatchPatch.Operation.INSERT;++ else if (this == EQUAL)++ return DiffMatchPatch.Operation.EQUAL;++ else++ return DiffMatchPatch.Operation.DELETE;++ }++ }++++ private final Action action;++++ private final String text;++++ private final String warnings;++++ public DiffUnit(Action action, String text, @Nullable String warnings) {++ this.action = action;++ this.text = text;++ this.warnings = warnings;++ }++++ public DiffUnit(Action action, String text) {++ this(action, text, null);++ }++++ public Action getAction() {++ return action;++ }++++ public String getText() {++ return text;++ }++++ /**++ * Get warnings attached to this diff unit.++ *++ * @return++ * warnings attached to this diff unit. Multiple warnings are separated++ * by new line character. <tt>null</tt> will be returned if no warnings.++ */++ public @Nullable String getWarnings() {++ return warnings;++ }++++ @Override++ public String toString() {++ StringBuffer buffer = new StringBuffer();++ if (action == Action.DELETE)++ buffer.append("-").append(text);++ else if (action == Action.EQUAL)++ buffer.append(" ").append(text);++ else++ buffer.append("+").append(text);++++ if (warnings != null)++ buffer.append("\n").append(warnings);++++ return buffer.toString();++ }++}diff --cc commons.util/src/test/java/com/pmease/commons/util/diff/DiffUtilsTest.javaindex f4cadededd,f4cadededd..c51354364a--- a/commons.util/src/test/java/com/pmease/commons/util/diff/DiffUtilsTest.java+++ b/commons.util/src/test/java/com/pmease/commons/util/diff/DiffUtilsTest.java@@@ -1,116 -1,116 +1,116 @@@--package com.pmease.commons.util.diff;----import static org.junit.Assert.*;----import java.util.ArrayList;--import java.util.List;----import org.junit.Test;----import com.pmease.commons.util.diff.DiffUnit.Action;----public class DiffUtilsTest {---- @Test-- public void shouldGenerateDiffUnitsCorrectly() {-- List<String> text1 = new ArrayList<>();-- text1.add("this is the 1st line");-- text1.add("this is the 2nd line");-- text1.add("this is the 3rd line");-- text1.add("this is the 4th line");-- text1.add("this is the 5th line");-- text1.add("this is the 6th line");-- text1.add("this is the 7th line");-- text1.add("this is the 8th line");-- text1.add("this is the 9th line");-- text1.add("this is the 10th line");---- List<String> text2 = new ArrayList<>();-- text2.add("this is the 1st line");-- text2.add("this is the second line");-- text2.add("this is the 3rd line");-- text2.add("this is the 4th line");-- text2.add("this is the 5th line");-- text2.add("this is the 6th line");-- text2.add("this is the 7th line");-- text2.add("this is the 8th line");-- text2.add("this is the nineth line");-- text2.add("this is the 10th line");-- text2.add("this is the 11th line");---- List<DiffUnit> diffUnits = DiffUtils.diff(text1, text2);-- assertEquals(13, diffUnits.size());---- assertEquals(Action.DELETE, diffUnits.get(1).getAction());-- assertEquals(Action.INSERT, diffUnits.get(2).getAction());-- assertEquals(Action.INSERT, diffUnits.get(12).getAction());-- }---- @Test-- public void shouldGenerateDiffChunksCorrectly() {-- List<String> text1 = new ArrayList<>();-- text1.add("this is the 1st line");-- text1.add("this is the 2nd line");-- text1.add("this is the 3rd line");-- text1.add("this is the 4th line");-- text1.add("this is the 5th line");-- text1.add("this is the 6th line");-- text1.add("this is the 7th line");-- text1.add("this is the 8th line");-- text1.add("this is the 9th line");-- text1.add("this is the 10th line");---- List<String> text2 = new ArrayList<>();-- text2.add("this is the 1st line");-- text2.add("this is the second line");-- text2.add("this is the 3rd line");-- text2.add("this is the 4th line");-- text2.add("this is the 5th line");-- text2.add("this is the 6th line");-- text2.add("this is the 7th line");-- text2.add("this is the 8th line");-- text2.add("this is the nineth line");-- text2.add("this is the 10th line");-- text2.add("this is the 11th line");---- List<DiffChunk> diffChunks = DiffUtils.diffAsChunks(text1, text2, 3);-- assertEquals(1, diffChunks.size());-- assertEquals(-- "@@ -1 +1 @@\n" +-- " this is the 1st line\n" +-- "-this is the 2nd line\n" +-- "+this is the second line\n" +-- " this is the 3rd line\n" +-- " this is the 4th line\n" +-- " this is the 5th line\n" +-- " this is the 6th line\n" +-- " this is the 7th line\n" +-- " this is the 8th line\n" +-- "-this is the 9th line\n" +-- "+this is the nineth line\n" +-- " this is the 10th line\n" +-- "+this is the 11th line\n",-- diffChunks.get(0).toString());---- diffChunks = DiffUtils.diffAsChunks(text1, text2, 2);-- assertEquals(2, diffChunks.size());-- assertEquals(-- "@@ -1 +1 @@\n" +-- " this is the 1st line\n" +-- "-this is the 2nd line\n" +-- "+this is the second line\n" +-- " this is the 3rd line\n" +-- " this is the 4th line\n",-- diffChunks.get(0).toString());-- assertEquals(-- "@@ -7 +7 @@\n" +-- " this is the 7th line\n" +-- " this is the 8th line\n" +-- "-this is the 9th line\n" +-- "+this is the nineth line\n" +-- " this is the 10th line\n" +-- "+this is the 11th line\n",-- diffChunks.get(1).toString());-- }----}++package com.pmease.commons.util.diff;++++import static org.junit.Assert.*;++++import java.util.ArrayList;++import java.util.List;++++import org.junit.Test;++++import com.pmease.commons.util.diff.DiffUnit.Action;++++public class DiffUtilsTest {++++ @Test++ public void shouldGenerateDiffUnitsCorrectly() {++ List<String> text1 = new ArrayList<>();++ text1.add("this is the 1st line");++ text1.add("this is the 2nd line");++ text1.add("this is the 3rd line");++ text1.add("this is the 4th line");++ text1.add("this is the 5th line");++ text1.add("this is the 6th line");++ text1.add("this is the 7th line");++ text1.add("this is the 8th line");++ text1.add("this is the 9th line");++ text1.add("this is the 10th line");++++ List<String> text2 = new ArrayList<>();++ text2.add("this is the 1st line");++ text2.add("this is the second line");++ text2.add("this is the 3rd line");++ text2.add("this is the 4th line");++ text2.add("this is the 5th line");++ text2.add("this is the 6th line");++ text2.add("this is the 7th line");++ text2.add("this is the 8th line");++ text2.add("this is the nineth line");++ text2.add("this is the 10th line");++ text2.add("this is the 11th line");++++ List<DiffUnit> diffUnits = DiffUtils.diff(text1, text2);++ assertEquals(13, diffUnits.size());++++ assertEquals(Action.DELETE, diffUnits.get(1).getAction());++ assertEquals(Action.INSERT, diffUnits.get(2).getAction());++ assertEquals(Action.INSERT, diffUnits.get(12).getAction());++ }++++ @Test++ public void shouldGenerateDiffChunksCorrectly() {++ List<String> text1 = new ArrayList<>();++ text1.add("this is the 1st line");++ text1.add("this is the 2nd line");++ text1.add("this is the 3rd line");++ text1.add("this is the 4th line");++ text1.add("this is the 5th line");++ text1.add("this is the 6th line");++ text1.add("this is the 7th line");++ text1.add("this is the 8th line");++ text1.add("this is the 9th line");++ text1.add("this is the 10th line");++++ List<String> text2 = new ArrayList<>();++ text2.add("this is the 1st line");++ text2.add("this is the second line");++ text2.add("this is the 3rd line");++ text2.add("this is the 4th line");++ text2.add("this is the 5th line");++ text2.add("this is the 6th line");++ text2.add("this is the 7th line");++ text2.add("this is the 8th line");++ text2.add("this is the nineth line");++ text2.add("this is the 10th line");++ text2.add("this is the 11th line");++++ List<DiffChunk> diffChunks = DiffUtils.diffAsChunks(text1, text2, 3);++ assertEquals(1, diffChunks.size());++ assertEquals(++ "@@ -1 +1 @@\n" +++ " this is the 1st line\n" +++ "-this is the 2nd line\n" +++ "+this is the second line\n" +++ " this is the 3rd line\n" +++ " this is the 4th line\n" +++ " this is the 5th line\n" +++ " this is the 6th line\n" +++ " this is the 7th line\n" +++ " this is the 8th line\n" +++ "-this is the 9th line\n" +++ "+this is the nineth line\n" +++ " this is the 10th line\n" +++ "+this is the 11th line\n",++ diffChunks.get(0).toString());++++ diffChunks = DiffUtils.diffAsChunks(text1, text2, 2);++ assertEquals(2, diffChunks.size());++ assertEquals(++ "@@ -1 +1 @@\n" +++ " this is the 1st line\n" +++ "-this is the 2nd line\n" +++ "+this is the second line\n" +++ " this is the 3rd line\n" +++ " this is the 4th line\n",++ diffChunks.get(0).toString());++ assertEquals(++ "@@ -7 +7 @@\n" +++ " this is the 7th line\n" +++ " this is the 8th line\n" +++ "-this is the 9th line\n" +++ "+this is the nineth line\n" +++ " this is the 10th line\n" +++ "+this is the 11th line\n",++ diffChunks.get(1).toString());++ }++++}diff --cc gitop.web/pom.xmlindex 789606f17a,1866f4bdb7..421507383e--- a/gitop.web/pom.xml+++ b/gitop.web/pom.xml@@@ -125,32 -126,57 +126,63 @@@<artifactId>reflections</artifactId><version>0.9.8</version></dependency>-- <dependency>- <groupId>org.apache.tika</groupId>- <artifactId>tika-core</artifactId>- <version>${tika.version}</version>- </dependency>- </dependencies>-- <repositories>- <repository>- <id>pmeaseRepo</id>- <name>PMEase Repository</name>- <releases>- <enabled>true</enabled>- <updatePolicy>never</updatePolicy>- <checksumPolicy>fail</checksumPolicy>- </releases>- <snapshots>- <enabled>true</enabled>- <updatePolicy>always</updatePolicy>- <checksumPolicy>fail</checksumPolicy>- </snapshots>- <url>http://artifact.pmease.com/</url>- </repository>-- <repository>++ <dependency>+ <groupId>org.apache.tika</groupId>+ <artifactId>tika-core</artifactId>+ <version>${tika.version}</version>+ </dependency>++ <dependency>+ <groupId>com.uwyn</groupId>+ <artifactId>jhighlight</artifactId>+ <version>1.0</version>++ <exclusions>++ <exclusion>++ <groupId>javax.servlet</groupId>++ <artifactId>servlet-api</artifactId>++ </exclusion>++ </exclusions>+ </dependency>++ <dependency>+ <groupId>com.sun.jna</groupId>+ <artifactId>jna</artifactId>+ <version>3.0.9</version>+ </dependency>++ <dependency>+ <groupId>org.gitective</groupId>+ <artifactId>gitective-core</artifactId>+ <version>0.9.9</version>+ <exclusions>+ <exclusion>+ <groupId>org.eclipse.jgit</groupId>+ <artifactId>org.eclipse.jgit</artifactId>+ </exclusion>+ </exclusions>+ </dependency>++ </dependencies>++ <repositories>+ <repository>+ <id>pmeaseRepo</id>+ <name>PMEase Repository</name>+ <releases>+ <enabled>true</enabled>+ <updatePolicy>never</updatePolicy>+ <checksumPolicy>fail</checksumPolicy>+ </releases>+ <snapshots>+ <enabled>true</enabled>+ <updatePolicy>always</updatePolicy>+ <checksumPolicy>fail</checksumPolicy>+ </snapshots>+ <url>http://artifact.pmease.com/</url>+ </repository>++ <repository><id>local-repo</id><name>Local Closure Repo</name><releases>diff --cc gitop.web/src/main/java/com/pmease/gitop/web/assets/css/page.cssindex ae4d3cb5e8,ac3550c9d1..3a5c661ab2--- a/gitop.web/src/main/java/com/pmease/gitop/web/assets/css/page.css+++ b/gitop.web/src/main/java/com/pmease/gitop/web/assets/css/page.css@@@ -372,18 -382,8 +382,23 @@@ table.files td.file-icon { width: 18px.source-blob .persons { padding: 8px 15px;}.source-blob .participants { padding: 8px 15px; background: white; border-radius: 0 0 4px 4px; border-top: 1px solid #ddd; }.participants .avatar { margin-left: 4px; }+ .blob { border: 1px solid #ddd; border-radius: 4px; }+ .blob-head {padding: 8px 15px; border-radius: 4px 4px 0 0; background: #f4f7f9; border-bottom: 1px solid #ddd; }+ .blob-head .blob-meta { line-height: 30px; }+ .blob-meta > span + span { border-left: 1px solid #ddd; padding-left: 10px; margin-left: 5px; box-shadow: inset 1px 0 0 #fff; }-.blob-meta > span > .icon { padding: 3px; background: white; border: 1px solid #ccc; border-right-color: #e5e5e5; border-bottom-color: #e5e5e5; border-radius: 3px;}++.blob-meta > span > .icon { padding: 3px; background: white; border: 1px solid #ccc; border-right-color: #e5e5e5; border-bottom-color: #e5e5e5; border-radius: 3px;}++/**+ * GATE KEEPER SETTING PAGE+ */+.gate-keeper-add.well {font-size:16px;}+.gate-keeper-add:hover, .gate-keeper-add:focus {background-color: #EBEBEB; cursor: pointer; border-color: #ADADAD;}+.gate-keeper-selector {max-width: 600px; max-height: 600px; overflow: scroll; padding: 16px;}+.gate-keeper-selector .icon {width: 20px; margin-right: 8px;}+.gate-keeper-category-name {font-size: 18px; margin-bottom: 4px; border-bottom: 1px solid #CCCCCC;}+.gate-keeper-description {font-size: 13px; color: #888888;}+.gate-keeper-category-body {margin-bottom: 12px;}+.gate-keeper-item {margin-bottom: 6px; padding: 4px; border: 1px solid white;}+.gate-keeper-item:hover, .gate-keeper-item:focus {background-color: #EBEBEB; cursor: pointer;+ border: 1px solid #ADADAD; border-radius: 4px;}+.gate-keeper-name {font-size: 15px; margin-top: -4px;}diff --cc parent.general/pom.xmlindex 3655b74011,3655b74011..83a387b6a3--- a/parent.general/pom.xml+++ b/parent.general/pom.xml@@@ -383,6 -383,6 +383,11 @@@<artifactId>jetty-util</artifactId><version>${jettyVersion}</version></dependency>++ <dependency>++ <groupId>javax.servlet</groupId>++ <artifactId>javax.servlet-api</artifactId>++ <version>${servletVersion}</version>++ </dependency></dependencies></dependencyManagement><dependencies>@@@ -461,5 -461,5 +466,6 @@@<jettyVersion>8.1.10.v20130312</jettyVersion><jacksonVersion>2.2.3</jacksonVersion><powermockVersion>1.5.1</powermockVersion>++ <servletVersion>3.1-b09</servletVersion></properties></project>