Awesome :)

All this is making it clear that we need to write a helper service that can
be relied upon to talk to the repositories, so that configuration like this
won't be necessary. I think that this may be a priority after 1.6.

Christian

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


On Fri, Mar 11, 2011 at 3:01 PM, Kate Ebneter <k...@ning.com> wrote:

> On Mar 11, 2011, at 2:37 PM, Christian Hammond wrote:
>
> Hi Kate,
>
> So I'm not entirely sure where this is failing. The SHA1 being used in the
> diffs are what git diff produces, and it's what other gitweb setups have
> been using. Being a blog should be okay, since you're using the blob_plain.
>
> What happens if you plug in a URL-encoded version of the path into
> <filename> and that SHA1 in <revision> in your raw file path manually (in a
> browser)? Can you compare that to the equivalent path/commit when browsing
> gitweb and see if there are any glaring differences? It's possible that
> gitweb's path for this has changed since we last wrote our documentation on
> it.
>
>
> I should have included that in the original post.
>
> What seems to be happening is that gitweb expects a URL that looks like
>
>      http://<site location>/<repository name>/blob_plain/<commit
> SHA1>/<file path>
>
> and postreview is passing in the <file blob SHA1> instead of the <commit
> SHA1>. A little experimenting reveals that what is wanted is a URL like
> this:
>
>     http://git.source.company.com/test-application/blob_plain/<revision>
>
> -- that works. Ah ha! Hmmmm. I am going to verify that it works for various
> invocations of postreview. Thanks for your help!
>
> Kate
>
>
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
>
> On Thu, Mar 10, 2011 at 4:35 PM, ebneter <kebne...@gmail.com> wrote:
>
>> I'm trying to use ReviewBoard 1.5.4 with git and gitweb.
>>
>> I have a change that's been committed and pushed.
>>
>> My repository is configured in ReviewBoard like this (some
>> sanitizing):
>>
>> path = g...@source.company.com:test-application.git
>> raw file url mask:
>> http://git.source.company.com/test-application.git/blob_plain/
>> <revision>:/<filename>
>>
>> My local git config includes
>>
>> remote.origin.url=s...@source.company.com:test-application.git
>> reviewboard.url=http://reviewboard.company.com/reviews/
>>
>> and my postreview command is
>>
>> postreview -p -o --summary="test review" --description="simple test" --
>> revision-range HEAD^^:HEAD --username me --password password -d
>>
>> ... and I get this:
>>
>> >>> RBTools 0.3.2
>> >>> Home = /Users/me
>> >>> svn info
>> >>> git rev-parse --git-dir
>> >>> git symbolic-ref -q HEAD
>> >>> git config --get branch.master.merge
>> >>> git config --get branch.master.remote
>> >>> git config remote.origin.url
>> >>> repository info: Path: g...@source.company.com:test-application.git,
>> Base path: , Supports changesets: False
>> >>> git config --get reviewboard.url
>> >>> HTTP GETting api/
>> >>> HTTP GETting http://reviewboard.company.com/reviews/api/info/
>> >>> Using the new web API
>> >>> git diff --no-color --full-index --no-ext-diff HEAD^^..HEAD
>> >>> Attempting to create review request on 
>> >>> g...@source.company.com:test-application.git
>> for None
>> >>> HTTP POSTing to
>> http://hudson.ninginc.com/reviews/api/review-requests/: {'repository':
>> 'g...@source.company.com:test-application.git'}
>> >>> Review request created
>> >>> Attempting to set field 'summary' to 'test review' for review request
>> '1608'
>> >>> HTTP PUTting to
>> http://reviewboard.company.com/reviews/api/review-requests/1608/draft/:
>> {'summary': 'test review'}
>> >>> Attempting to set field 'description' to 'simple test' for review
>> request '1608'
>> >>> HTTP PUTting to
>> http://reviewboard.company.com/reviews/api/review-requests/1608/draft/:
>> {'description': 'simple test'}
>> >>> Uploading diff, size: 2175
>> >>> HTTP POSTing to
>> http://reviewboard.company.com/reviews/api/review-requests/1608/diffs/:
>> {}
>> >>> Got API Error 207 (HTTP code 400): The file was not found in the
>> repository
>> >>> Error data: {u'stat': u'fail', u'file': u'pom.xml', u'err': {u'msg':
>> u'The file was not found in the repository', u'code': 207}, u'revision':
>> u'42d91a4992e86ff4fe329daefc6174d4706124af'}
>>
>> Error uploading diff
>>
>> Your review request still exists, but the diff is not attached.
>>
>>
>> One thing I notice is that the sha1 shown here is NOT a revision
>> (commit), but the sha1 of the blob:
>>
>> $ git cat-file -t 42d91a4992e86ff4fe329daefc6174d4706124af
>> blob
>> $ git rev-parse HEAD
>> 0ce11aad334be47638773efbf7ef415101baabab
>> $ git rev-parse HEAD^^
>> 27b47430c1af34b109c10b10dfb221dab94521b5
>>
>> 'postreview --version' gives "RBTools 0.3.2", and I'm running on OSX
>> Snow Leopard (10.6.6), with python 2.6.6.
>>
>> ...help?? :-)
>>
>> --
>> 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