RFR: Add submodule and subrepo support
Robin Westberg
rwestberg at openjdk.org
Mon Oct 21 12:57:49 UTC 2019
On Mon, 21 Oct 2019 12:44:42 GMT, Erik Helin <ehelin at openjdk.org> wrote:
> Hi all,
>
> this patch adds initial submodule and subrepo support to `GitRepository` and `HgRepository` and also adds a few unit tests.
>
> Thanks,
> Erik
>
> ## Testing
> - `sh gradlew test` passes on Linux x64
>
> ----------------
>
> Commits:
> - 3506616c: Add submodule and subrepo support
>
> Changes: https://git.openjdk.java.net/skara/pull/217/files
> Webrev: https://webrevs.openjdk.java.net/skara/217/webrev.00
> Stats: 212 lines in 7 files changed: 212 ins; 0 del; 0 mod
> Patch: https://git.openjdk.java.net/skara/pull/217.diff
> Fetch: git fetch https://git.openjdk.java.net/skara pull/217/head:pull/217
vcs/src/main/java/org/openjdk/skara/vcs/hg/HgRepository.java line 1132:
> 1131: public void addSubmodule(String pullPath, Path path) throws IOException {
> 1132: var uri = Files.exists(Path.of(pullPath)) ? "file://" + pullPath : pullPath;
> 1133: HgRepository.clone(URI.create(uri), root().resolve(path).toAbsolutePath(), false);
Suggestion:
var uri = Files.exists(Path.of(pullPath)) ? Path.of(pullPath).toUri().toString() : pullPath;
PR: https://git.openjdk.java.net/skara/pull/217
More information about the skara-dev
mailing list