...
Note: as can be seen above, webrev
is now a Mercurial extension, it is no longer invoked as webrev.ksh
.
Importing patches from a Git repository
Mercurial has built-in support for the Git patch format (more recent Mercurial versions have improved support). This means that you can import a patch directly from a Git repository:
Code Block | ||
---|---|---|
| ||
$ git -C /path/to/git/repo diff <COMMIT>^! | hg -R /path/to/hg/repo import --no-commit - |
The OpenJDK Mercurial and Git repositories use different formats for commit message (see JEP 357 for details). To import a patch from an OpenJDK Git repository to an OpenJDK Mercurial repository and translate the commit message from the format used by OpenJDK Git repositories to the one used by OpenJDK Mercurial repositories, use the git-hg-export tool from the Skara CLI tools:
Code Block | ||
---|---|---|
| ||
$ git -C /path/to/git/repo hg-export <COMMIT> | hg -R /path/to/hg/repo import - |