RFR: vcs: improve git->hg converter

Robin Westberg rwestberg at openjdk.java.net
Mon Aug 24 15:48:49 UTC 2020

On Mon, 24 Aug 2020 15:19:41 GMT, Erik Helin <ehelin at openjdk.org> wrote:

> Hi all,
> please review this patch that significantly improves the `GitToHgConverter`. The new converter handles all OpenJDK Git
> repositories and also handles additional Git tags. I also improved the testing by quite a bit, the verification is much
> more strict and I added a bunch of more tests. I also added some `@Disabled` tests (since they require an internet
> connection), but they are still useful for running locally when working on the converter.  Testing:
> - [x] `make test` passes on Linux x64
> - [x] Added a number of new unit tests
> Thanks,
> Erik

Looks good, just some minor comments!

vcs/src/test/java/org/openjdk/skara/vcs/openjdk/converter/GitToHgConverterTests.java line 46:

> 45:     void assertCommitEquals(ReadOnlyRepository gitRepo, Commit gitCommit, ReadOnlyRepository hgRepo, Commit
> hgCommit) throws IOException { 46:         System.out.println("git commit: " + gitCommit.hash() + ", hg commit: " +
> hgCommit.hash()); 47:         assertEquals(gitCommit.authored(), hgCommit.authored());

Debugging leftover?

vcs/src/test/java/org/openjdk/skara/vcs/openjdk/converter/GitToHgConverterTests.java line 473:

> 472:
> 473:     @Disabled("Depends on internet connection")
> 474:     @Test

There are similar tests for the bridge bot that are skipped if there is no connection:


but not sure if something similar would be appropriate here as well?


Marked as reviewed by rwestberg (Reviewer).

PR: https://git.openjdk.java.net/skara/pull/736

More information about the skara-dev mailing list