Add truncated flag for svn

This commit is contained in:
Rene Pfeuffer
2020-02-18 15:55:01 +01:00
parent 6eca277d65
commit 1c8088a1c6
2 changed files with 4 additions and 0 deletions

View File

@@ -143,6 +143,9 @@ public class SvnBrowseCommand extends AbstractSvnCommand
traverse(svnRepository, revisionNumber, request, child, createBasePath(child.getPath()));
}
}
if (resultCount >= request.getLimit() + request.getProceedFrom()) {
parent.setTruncated(true);
}
}
private String createBasePath(String path)

View File

@@ -199,6 +199,7 @@ public class SvnBrowseCommandTest extends AbstractSvnCommandTestBase
Collection<FileObject> foList = result.getFile().getChildren();
assertThat(foList).extracting("name").containsExactlyInAnyOrder("a.txt");
assertThat(result.getFile().isTruncated()).isTrue();
}
@Test