SideBySide2: Respect base diff revision for files REST call

2d2a3c405e added diff against to CS2.
eaeb9ad104 made diff against revision
persistent.  Both changes missed to pass base revision parameter in
files REST call for navigation links rendering.

Bug: issue 2417
Change-Id: I85a9bf23417f77d4cc4aab230efc1d4c9cd75a46
This commit is contained in:
David Ostrovsky
2014-01-26 21:23:19 +01:00
parent dd34a05fdf
commit 6d898112f1
2 changed files with 10 additions and 3 deletions

View File

@@ -35,6 +35,15 @@ public class DiffApi {
api.get(NativeMap.copyKeysIntoChildren("path", cb));
}
public static void list(PatchSet.Id id, PatchSet.Id base,
AsyncCallback<NativeMap<FileInfo>> cb) {
RestApi api = ChangeApi.revision(id).view("files");
if (base != null) {
api.addParameter("base", base.get());
}
api.get(NativeMap.copyKeysIntoChildren("path", cb));
}
public static DiffApi diff(PatchSet.Id id, String path) {
return new DiffApi(ChangeApi.revision(id)
.view("files").id(path)