|
NAME
| |
codereview – review of submitted changes (experimental)
|
SYNOPSIS
| |
git diff HEAD path ...
codereview [ −v ] create name
codereview [ −v ] commit
codereview [ −v ] upload
codereview [ −v ] pending
codereview [ −v ] sync
|
DESCRIPTION
| |
Codereview manages the review and submission of changes to the
Plan 9 from User Space project. It must be used from within a
Plan 9 from User Space tree checked out via Git (see git(1)).
A developer makes changes to a local copy of the tree, reviews
them by using git diff HEAD and then commits them to a “feature
branch” using codereview create. Once a feature branch is created,
files can still be edited, but they must then be incorporated
into the change by using codereview commit. Git requires that
changes be added to a “staging
area” before the initial commit, using commands such as git add
and git rm. The codereview create and codereview commit commands
automatically move all local modifications to the staging area
as part of the commit, using git commit -a.
If other changes have been committed since the feature branch
was created, codereview sync will update it to be based on the
most recent copy of the repository.
When the code is ready for review, codereview upload uploads the
change to https://plan9port−review.googlesource.com/ for review.
In order to upload, git must have access to a $HOME/.netrc that
contains a password obtained from .
The most likely initial result of a code review is suggestions
for improving the code. After making those changes, repeat the
codereview commit and codereview upload steps.
Once the code is ready, it will be submitted by the reviewer using
the web interface. At that point, codereview sync
The codereview pending command lists the active feature branches.
All the codereview commands take a leading −v option, which causes
them to print git commands being executed. This can be useful
for debugging codereview.
The codereview command depends on a git “commit hook” script being
in place to add Change−Id lines to the commit messages. Codereview
installs the hook at startup, if necessary, by adding a symbolic
link from $PLAN9/.git/hooks/commit−msg to $PLAN9/lib/git/commit−msg.hook.
|
SEE ALSO
BUGS
| |
Git is too complicated to use. The codereview script helps, but
a working understanding of git is still required.
|
|
|