|
upload.py Usageupload.py is a tool for uploading diffs from a version control system to the codereview app. Usage summary: upload.py [options] [-- diff_options] Diff options are passed to the diff command of the underlying system. Supported version control systems: It is important for Git/Mercurial users to specify a tree/node/branch to diff against by using the '--rev' option. Options - -h, --help
- show this help message and exit
- -y, --assume_yes
- Assume that the answer to yes/no questions is 'yes'.
Logging options - -q, --quiet
- Print errors only.
- -v, --verbose
- Print info level logs (default).
- --noisy
- Print all logs.
Review server options - -s SERVER, --server=SERVER
- The server to upload to. The format is host:port. Defaults to 'codereview.appspot.com'.
- -e EMAIL, --email=EMAIL
- The username to use. Will prompt if omitted.
- -H HOST, --host=HOST
- Overrides the Host header sent with all RPCs.
- --no_cookies
- Do not save authentication cookies to local disk.
Issue options - -d DESCRIPTION, --description=DESCRIPTION
- Optional description when creating an issue.
- -f DESCRIPTION_FILE, --description_file=DESCRIPTION_FILE
- Optional path of a file that contains the description when creating an issue.
- -r REVIEWERS, --reviewers=REVIEWERS
- Add reviewers (comma separated email addresses).
- --cc=CC
- Add CC (comma separated email addresses).
Patch options - -m MESSAGE, --message=MESSAGE
- A message to identify the patch. Will prompt if omitted.
- -i ISSUE, --issue=ISSUE
- Issue number to which to add. Defaults to new issue.
- --download_base
- Base files will be downloaded by the server (side-by-side diffs may not work on files with CRs).
- --rev=REV
- Branch/tree/revision to diff against (used by DVCS).
- --send_mail
- Send notification email to reviewers.
|
An example would be most helpful.
I agree.
Yes. For example, suppose I wish to upload only some files into an issue. Is there facility to do that?
Pass the files as arguments. This is covered by the 'diff_options' argument. E.g.
upload.py foo.py bar
(bar could be a directory, it will upload all changed files in that directory.)
A more informative real life example?
I have a project folder /home/user/workspace/project
I tried with
I get this message back:
What is your version control system? If using SVN, there should be a subdirectory in the current directory named '.svn'. If using Mercurial, there should be a '.hg'. Similar for Git. You may be able to force this with the option '--vcs X' where X is e.g. svn, hg, or git.
However it looks like you misunderstood the -s option -- it points to the Rietveld server, not to the repository.
I use hg <blush>I think too I misunderstood</blush> I found this http://fwierzbicki.blogspot.com/2008/08/code-review-with-rietveld.html that pointed me on the right path. Now I wonder how I could misunderstand it at all. But you know, newbyiness and yes, I think that an example that cover the full code review process could have saved me some time. Thanks a lot BTW
upload.py -s codereview.example.com -e me@example.com --rev=1
That uploads a diff between the current code and revision 1.