My favorites | Sign in
Logo
                
Search
for
Updated Mar 03, 2009 by albrecht.andi
UploadPyUsage  
upload.py usage and options.

upload.py Usage

upload.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:

  • Git
  • Mercurial
  • Subversion

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.


Comment by filmil, May 26, 2009

An example would be most helpful.

Comment by elifkus, Jun 16, 2009

I agree.

Comment by dfrankow, Jul 08, 2009

Yes. For example, suppose I wish to upload only some files into an issue. Is there facility to do that?

Comment by gvanrossum, Jul 08, 2009

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.)

Comment by bertnic, Oct 08, 2009

A more informative real life example?

I have a project folder /home/user/workspace/project

My repo is http://code.my.domain/trunk/ my email is: wannabecoder@my.domain

I tried with

./upload.py -e wannabecoder@my.domain -s http://code.my.domain/trunk/ project

I get this message back:

Could not guess version control system. Are you in a working copy directory?

Comment by gvanrossum, Oct 08, 2009

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.

Comment by bertnic, Oct 11, 2009

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

Comment by PetarStrinic, Oct 21, 2009

upload.py -s codereview.example.com -e me@example.com --rev=1

That uploads a diff between the current code and revision 1.


Sign in to add a comment
Hosted by Google Code