Merge changes I6d57fb6a,I7dfd8196,I5e399067

* changes:
  Fix exception due to duplicate keys in EditTransformer
  Fix bug excluding some renamed files from patch set diff
  Execute the diff tests both for intraline and non-intraline
This commit is contained in:
Alice Kober-Sotzek
2017-07-20 08:14:29 +00:00
committed by Gerrit Code Review
7 changed files with 294 additions and 125 deletions

View File

@@ -19,6 +19,7 @@ import com.google.gerrit.extensions.common.DiffInfo;
import com.google.gerrit.extensions.restapi.BinaryResult;
import com.google.gerrit.extensions.restapi.NotImplementedException;
import com.google.gerrit.extensions.restapi.RestApiException;
import java.util.OptionalInt;
public interface FileApi {
BinaryResult content() throws RestApiException;
@@ -43,6 +44,7 @@ public interface FileApi {
private Integer context;
private Boolean intraline;
private Whitespace whitespace;
private OptionalInt parent = OptionalInt.empty();
public abstract DiffInfo get() throws RestApiException;
@@ -66,6 +68,11 @@ public interface FileApi {
return this;
}
public DiffRequest withParent(int parent) {
this.parent = OptionalInt.of(parent);
return this;
}
public String getBase() {
return base;
}
@@ -81,6 +88,10 @@ public interface FileApi {
public Whitespace getWhitespace() {
return whitespace;
}
public OptionalInt getParent() {
return parent;
}
}
/**