The version of Gitweb we're using (1.7.0.4) uses the following for a
raw link:

http://hostname/?p=repo.git;a=blob_plain;f=.reviewboardrc;hb=dd1772a4a7c88bb54e9a5fb6aa5836d8c5204bd2

If I try the same with "h", the it fetches an empty document (aka not
the actual contents).  It's also interesting that the above link was
derived from the "raw" link in the tree view.  If I click on the
actual file (.reviewboardrc in this case) in the tree view and then
click on the "raw" link on the resource detail page it generates this
link:

http://hostname/?p=repo.git;a=blob_plain;f=.reviewboardrc;h=0ea7701cc2969b1b2e8c771e302662b6c7e68466;hb=dd1772a4a7c88bb54e9a5fb6aa5836d8c5204bd2

So there it's using both, with different hashes.  I'm thinking that
post-review is generating the hash that corresponds to "h"?

Thanks!

John M.


On Sep 2, 12:16 am, Christian Hammond <chip...@chipx86.com> wrote:
> Hi John,
>
> Good question. I know that hb is certainly used in many Gitweb instances
> (for example, see the "raw" links 
> onhttp://gitweb.samba.org/?p=import/samba-docs-svnimport.git;a=tree).
>
> From the source code, h= and hb= are both valid parameters. It looks like h=
> means "current hash" and hb means "current hash base."
>
> Can you check your gitweb install and see what the "raw" links use?
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board -http://www.reviewboard.org
> VMware, Inc. -http://www.vmware.com
>
> On Wed, Sep 1, 2010 at 2:04 PM, John Mcfarlane <john.mcfarl...@rockfloat.com
>
> > wrote:
> > Context around my question, I'm running the following:
>
> > Git 1.7.0.4
> > Gitweb 1.7.0.4
> > Reviewboard 1.5 RC1
>
> > When configuring a remote git repo (without a local repo on disk) I
> > used the following configuration (which seems to work perfectly):
>
> > path: git://hostname/repo.git
> > mirror: ssh://hostname/var/git/repo.git
> > mask:http://hostname/?p=repo.git;a=blob_plain;f=<filename>;h=<revision>
>
> > So again, the above seems to work perfectly.  I'm able to post
> > reviews, including both binary and ascii files.  So here's my
> > question...
>
> > The docs here:
> >http://www.reviewboard.org/docs/manual/dev/admin/management/repositor...
> > indicate that you should use the HTTP GET arg: "hb=<revision>".  When
> > I do that, I get the following (formatted slightly) when posting the
> > review:
>
> > >>> Got API Error 207 (HTTP code 200): The file was not found in the
> > repository
> > >>> Error data:
> > {u'deprecated': {u'in_version': u'1.5'},
> >  u'stat': u'fail',
> >  u'file': u'.reviewboardrc',
> >  u'err': {u'msg': u'The file was not found in the repository',
> > u'code': 207},
> >  u'revision': u'0ea7701cc2969b1b2e8c771e302662b6c7e68466'
> > }
>
> > But if I change the mask to use the HTTP GET arg: "h=<revision>"... it
> > works perfectly.  I tried to look up the gitweb api to see what the
> > difference is between "h" and "hb" but didn't really find anything.
> > Is it possible that the value should be "h" and the doc should to be
> > corrected?  Or is my config jacked up in some way that it's working
> > and shouldn't' be?
>
> > Thanks in advance for the help :)
>
> > Best regards,
>
> > John M.
>
> > --
> > Want to help the Review Board project? Donate today at
> >http://www.reviewboard.org/donate/
> > Happy user? Let us know athttp://www.reviewboard.org/users/
> > -~----------~----~----~----~------~----~------~--~---
> > To unsubscribe from this group, send email to
> > reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@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