Configuration
pwclient reads configuration from the .pwclientrc file, located in your
home directory ($HOME or ~). You can point to another path with the
environment variable PWCLIENTRC. Patchwork itself provides sample
.pwclientrc files for projects at:
/project/{projectName}/pwclientrc/
For example, here is the .pwclientrc file for Patchwork itself.
Format
The .pwclientrc file is an INI-style config file, containing an
options section along with a section for each project.
The options section provides the following configuration options:
defaultThe default project to use. Must be configured if not specifying a project via the command line.
signoffAdd a
Signed-Off-By:line to commit messages when applying patches using the git-am command. Defaults toFalse.3wayEnable three-way merge when applying patches using the git-am command. Defaults to
False.msgidAdd a
Message-Id:line to commit messages when applying patches using the git-am command. Defaults toFalse.
The names of the project sections must correspond to the project names in Patchwork, as reflected in the project’s URL in Patchwork. Multiple projects can be defined, but no two projects can share the same name. Project sections require the following configuration options:
urlThe URL of the API endpoint for the Patchwork instance that the project is available on. This depends on the API backend in use. For the
restbackend, this will typically be$PATCHWORK/api. For example:For the
xmlrpcbackend, this is will typically be$PATCHWORK_URL/xmlrpc. For example:
In addition, the following options are optional:
backendThe API backend to use. One of:
rest,xmlrpcusernameYour Patchwork username.
passwordYour Patchwork password.
tokenYour Patchwork API token. (only supported with
restbackend)
Note
Patchwork credentials are only needed for certain operations, such as updating the state of a patch. You will also require admin priviledges on the instance in question.
Example
[options]
default = patchwork
[patchwork]
backend = rest
url = http://patchwork.ozlabs.org/api/
token = 088cade25e52482e6486794ef4a4561d3e5fe727
Legacy Format
Older Patchwork instances may provide a legacy version of the .pwclientrc
file that did not support multiple projects. pwclient will automatically
convert this version of the file to the latest version.