RFR: Add tool for importing webrev patches

JornVernee via github.com duke at openjdk.java.net
Fri Jul 5 10:01:57 UTC 2019

As discussed on the mailing list: https://mail.openjdk.java.net/pipermail/skara-dev/2019-July/000176.html

This PR adds a tool for importing webrev `.patch` files, either from a webrev url or local file path into a repository.

I've named the tool `wimport` as short for `webrev-import` (I thought the full name sounded a bit too much like a sub-command of `webrev`). This will first checkout a new branch, then apply the patch, and then create a commit for the patch with the message `Imported patch 'NAME'`, similar to what is done by mq. Afterwards a user can just delete the new branch when they're done with e.g. reviewing the webrev. Although, there is also an option to directly apply the webrev without creating a branch or commit.

Currently  the following options are supported:

    usage: git wimport [options] <webrev url|file path>
        -n, --name NAME  Use NAME as a name for the patch (default is patch file name)
        -f, --file       Input is a file path
        -k, --keep       Keep downloaded patch file in current directory
        -d, --direct     Directly apply patch, without creating a branch or commit


 - 7b20ce75:	Wimport prototype

Pull request:



Fetch command:
git fetch https://github.com/openjdk/skara.git pull/32/head:pull/32

More information about the skara-dev mailing list