RFR: cli: add new command hg-export

Robin Westberg rwestberg at openjdk.java.net
Thu Aug 6 08:25:49 UTC 2020

On Thu, 6 Aug 2020 07:48:57 GMT, Erik Helin <ehelin at openjdk.org> wrote:

> Hi all,
> please review this patch that adds the new command `git hg-export`. The `git hg-export` command prints information
> about a Git commit in the format expected by `hg import` (i.e. it is very similar to the `hg export --git` command).
> This command is primarily useful for backporting changes from a Git repository to a Mercurial repository as a
> backporter can now run:  $ git clone https://git.openjdk.java.net/jdk $ cd jdk
> $ git hg-export <REV> | hg -R /path/to/hg/repo/for/jdk11u-dev import -
> The command `git hg-export` will output the commit message in the format used by the OpenJDK Mercurial repositories.
> The command will also output the correct author and date.
> Testing:
> - [x] Manual testing of `git hg-export` on Linux x64
> Thanks,
> Erik

Looks good! Perhaps some sort of test would be nice, but can do that later I guess. :)

cli/src/main/java/org/openjdk/skara/cli/GitHgExport.java line 95:

> 94:         if (committer.email() == null || !committer.email().endsWith("@openjdk.org")) {
> 95:             die("commiter is not an OpenJDK committer");
> 96:         }


            die("committer is not an OpenJDK committer");


Marked as reviewed by rwestberg (Reviewer).

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

More information about the skara-dev mailing list