Hi Sapna,

The post-review script you're seeing is the installed wrapper that
invokes the real post-review script, which lives in the
RBTools-versionnumber.egg. You shouldn't have to touch the file.

The solution is actually provided right there in the error. For a diff
to be generated for a file, it must be in Git's index, which means you
must 'git add' and 'git commit' the files. That commit will be contain
the diff that will be uploaded.

My workflow is:

1) Create a topic branch for the change I want to put up for review.
2) Commit the changes there.
3) Run post-review (I use --guess-summary and --guess-description,
which will auto-populate those fields based on the commit
descriptions).

Note that post-review will generate the diff between the closest
commit on origin to the most recent commit. That is, it'll do a 'git
diff remotes/origin/master' or some such, generally. You can use the
--parent= parameter to specify a branch or SHA1 that you want as the
parent, which means that every commit since that branch/SHA1 will be
included in the diff, but no changes before that commit.

Christian

--
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com



On Fri, Jan 14, 2011 at 1:48 PM, Sapna Vempati <sapnavemp...@gmail.com> wrote:
> Hi,
>
> We installed RB 1.5.1/RB tools/restarted apache on our server. I am able to
> configure a repo successfully through RB web location. I try to post a
> review, I can post it for review, but cannot attach the diff.
>
> $> clone repo
> $> cd <repo>
> $> git config reviewboard.url <RB web url>
> $> modify file
> $> git status
> # On branch master
> # Changed but not updated:
> #   (use "git add <file>..." to update what will be committed)
> #
> #       modified:   brcm_eclair_buildall.sh
> #
> no changes added to commit (use "git add" and/or "git commit -a")
> $> post-review -p
> Error uploading diff
> The generated diff file was empty. This usually means no files were
> modified in this change.
> Try running with --output-diff and --debug for more information.
> Your review request still exists, but the diff is not attached.
>
> I look at the post-review script that we have, and it looks like below,
> instead of the long script(.py) that should have around 3000 lines of code.
>
> $> which post-review
> /opt/lampp/bin/post-review
> $> cat /opt/lampp/bin/post-review
> #!/projects/mob_tools/xampp/1.6.4-brcm-v2/bin/python
> # EASY-INSTALL-ENTRY-SCRIPT: 'RBTools==0.2','console_scripts','post-review'
> __requires__ = 'RBTools==0.2'
> import sys
> from pkg_resources import load_entry_point
> sys.exit(
>    load_entry_point('RBTools==0.2', 'console_scripts', 'post-review')()
> )
> Can you please help on what I am missing in the configuration/procedure ? Do
> I need to update the post-review code ?
>
> Thanks,
> Sapna
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to