This command allows you to fetch and checkout a patch in one step.
pt checkout <id>[/<revision>] [-b branch] <args>
Argument | Usage | Description |
---|---|---|
<id>/<revision> | 1234/10 | A patch specification. Id must be an integer. For Gerrit servers, this is the review/change number. For Gitblit servers, this is the ticket number. If revision is ommitted, the most recent revision as determined by the patch index is retrieved. If the patch index is stale, it will be refreshed from the patch server. |
-b, --branch | -b review | Specify a branch name to create and switch to |
-o, --offline | <flag> | Do not fetch from the patch server and do not refresh a stale patch index. |
-u, --username | -u james | Specify the account username for the patch server |
-p, --password | -p pasword | Specify the account password for the patch server |
--debug | <flag> | Enables verbose debug logging and stacktraces |
-q, --quiet | <flag> | Disables all console output except for stacktraces |
--nocolor | <flag> | Disables ANSI escape sequences |
If you are currently reviewing a revision of the desired patch, you may use relative shortcuts to switch between revisions.
pt checkout /-- (checkout previous revision)
pt checkout /-5 (checkout 5th revision before the active revision)
You may checkout a patch revision as a branch.
pt checkout 9379 -b symlinks
You may also re-use/reset a branch by specifying a different revision.
pt checkout 9379/10 -b symlinks
pt checkout 9379
pt checkout 9379/10
pt checkout /++
pt checkout /-1