Re: Integration of RB with Gitlab

2012-11-21 Thread DXM
Not that I know more about Gitlab than I did yesterday, but it appears that 
Gitlab is simply a web layer on top of normal git engine, so we were able 
to simply install gitweb right alongside Gitlab to do kind of what I was 
suggesting above with stand-alone service just handling the requests we 
need. Turns out we didn't even have to write that service, gitweb works.


On Tuesday, November 20, 2012 6:13:44 PM UTC-5, Matthew Woehlke wrote:

 On 2012-11-20 17:54, DXM wrote: 
  Thank you for the reply, guys. I wonder if I could just write my own 
  stand-alone service (listening on port 8080) that could sit on the 
 gitlab 
  box and just serve up the output of 'git show... command. 

 If you can run git against something that looks like a git checkout (I 
 think a bare repo would work also) on the Gitlab server, that should 
 work. (But I would still recommend putting in a feature request for 
 Gitlab :-).) 

 I couldn't do that with gitorious because there aren't readily 
 accessible repositories; I would have needed to clone the gitorious repo 
 for such a service (and at that point, you might as well keep the clone 
 where RB can talk to it directly). 

 -- 
 Matthew 


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




Re: Integration of RB with Gitlab

2012-11-20 Thread David Trowbridge
For remote access, we need a URL that provides file contents based on blob
sha1. I don't really know anything about gitlab, but we've previously had
pretty good success getting hosting providers to add an API for us when we
need it (access by blob is a pretty trivial thing).

If you can't do that, an in-sync local repo is probably your best bet.

-David


-David


On Tue, Nov 20, 2012 at 12:49 PM, DXM dxm...@gmail.com wrote:

 Hi,

 I'm trying to setup ReviewBoard to work with Gitlab repository. Since
 Gitlab has a web front end API, From everything I've read so far, seems the
 most straightforward integration would be to specify a Raw File URL mask in
 the repository setup.

 However, I've run into a bit of a problem. It looks like for revision
 placeholder, RB server will pass in file blob's SHA1, but Gitlab API wants
 the client to pass in SHA1 of the commit.  So far in all my
 searching/googling I haven't found a way to either modify RB to pass in
 SHA1 of the commit or a different Gitlab HTTP URL that would accept SHA1 of
 the file blob.

 Are you aware of anyone else that successfully integrated Gitlab with
 ReviewBoard? Could I be missing something fundamentally easy?

 Or is my only option to setup a cron job that would periodically update
 local repository on the RB server

 thank you

 -- Dennis

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




Re: Integration of RB with Gitlab

2012-11-20 Thread Matthew Woehlke

On 2012-11-20 15:49, DXM wrote:

I'm trying to setup ReviewBoard to work with Gitlab repository. Since
Gitlab has a web front end API, From everything I've read so far, seems the
most straightforward integration would be to specify a Raw File URL mask in
the repository setup.

However, I've run into a bit of a problem. It looks like for revision
placeholder, RB server will pass in file blob's SHA1, but Gitlab API wants
the client to pass in SHA1 of the commit.


Sorry to say, but if Gitlab cannot give you a blob by it's identifying 
SHA, you are out of luck. By the time a diff makes it to RB, the SHA of 
the commit against which the diff was generated is no longer known. (And 
I am not aware that it is possible to determine what commit owns a 
particular blob ID.)


So... basically, see David's reply for your options. Getting the Gitlab 
server patched is probably best; being able to retrieve blobs by ID is a 
feature the server really ought to provide.


(I had the same problem with an older gitorious server, and spent some 
time trying to determine if there was some other solution short of a 
complete mirror of the repository - e.g. a local web service that could 
fetch just the necessary blob - but wasn't able to come up with 
anything. In the end, I had to patch the gitorious server. Fortunately 
upstream gitorious has already been patched, so it was just a matter of 
grabbing the necessary patch from upstream and applying it.)


p.s. If you end up patching Gitlab yourself, what you need is basically 
a URL that gives you the output of 'git show blob-id'. The path isn't 
actually needed for git.


--
Matthew

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




Re: Integration of RB with Gitlab

2012-11-20 Thread DXM
Thank you for the reply, guys. I wonder if I could just write my own 
stand-alone service (listening on port 8080) that could sit on the gitlab 
box and just serve up the output of 'git show... command.


On Tuesday, November 20, 2012 5:39:36 PM UTC-5, Matthew Woehlke wrote:

 On 2012-11-20 15:49, DXM wrote: 
  I'm trying to setup ReviewBoard to work with Gitlab repository. Since 
  Gitlab has a web front end API, From everything I've read so far, seems 
 the 
  most straightforward integration would be to specify a Raw File URL mask 
 in 
  the repository setup. 
  
  However, I've run into a bit of a problem. It looks like for revision 
  placeholder, RB server will pass in file blob's SHA1, but Gitlab API 
 wants 
  the client to pass in SHA1 of the commit. 

 Sorry to say, but if Gitlab cannot give you a blob by it's identifying 
 SHA, you are out of luck. By the time a diff makes it to RB, the SHA of 
 the commit against which the diff was generated is no longer known. (And 
 I am not aware that it is possible to determine what commit owns a 
 particular blob ID.) 

 So... basically, see David's reply for your options. Getting the Gitlab 
 server patched is probably best; being able to retrieve blobs by ID is a 
 feature the server really ought to provide. 

 (I had the same problem with an older gitorious server, and spent some 
 time trying to determine if there was some other solution short of a 
 complete mirror of the repository - e.g. a local web service that could 
 fetch just the necessary blob - but wasn't able to come up with 
 anything. In the end, I had to patch the gitorious server. Fortunately 
 upstream gitorious has already been patched, so it was just a matter of 
 grabbing the necessary patch from upstream and applying it.) 

 p.s. If you end up patching Gitlab yourself, what you need is basically 
 a URL that gives you the output of 'git show blob-id'. The path isn't 
 actually needed for git. 

 -- 
 Matthew 


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




Re: Integration of RB with Gitlab

2012-11-20 Thread Matthew Woehlke

On 2012-11-20 17:54, DXM wrote:

Thank you for the reply, guys. I wonder if I could just write my own
stand-alone service (listening on port 8080) that could sit on the gitlab
box and just serve up the output of 'git show... command.


If you can run git against something that looks like a git checkout (I 
think a bare repo would work also) on the Gitlab server, that should 
work. (But I would still recommend putting in a feature request for 
Gitlab :-).)


I couldn't do that with gitorious because there aren't readily 
accessible repositories; I would have needed to clone the gitorious repo 
for such a service (and at that point, you might as well keep the clone 
where RB can talk to it directly).


--
Matthew

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