Re: post-review with git

2013-05-29 Thread Steven MacLeod
You can create a '.reviewboardrc' file in the top-level of the repository,
and add the following line:

REPOSITORY = ''

where  is the name you gave the repository in the Review
Board admin panel. This should make things work.


On Wed, May 29, 2013 at 5:23 PM, Peter Snelling
wrote:

> I posted previously that I've installed ReviewBoard 1.7.7.1 on a Suse
> linux server (with git, apache, postgresql, modswgi, memcached, ...). The
> git repository we all use is 172.16.27.63. To get post-review to work
> properly, I had to add the following repository:
>Path: snelling@172.16.27.63:/**localdisk/git/repositories/**TCD.git
>Raw File URL: http://172.16.27.63/cgi-bin/**
> gitweb/gitweb.cgi?p=TCD.git;a=**blob_plain;f=;h=<**revision>
>
> and to have review board accept that repository, I had to setup ssh keys
> from the review board server to 172.16.27.63. Now that all works fine for
> me.
>
> The problem now is when I tried to get another user to use post-review,
> they failed. Their repository was:
> someuser@172.16.27.63:/**localdisk/git/repositories/**TCD.git
> and post-review wouldn't accept that. I had to create another repository
> for them, and add their ssh keys to the git server. That worked, but it
> seems like too much pain for dozens of users.
>
> If users upload their diff using the ReviewBoard web page and my
> repository (snelling@172.16.27.63:/**localdisk/git/repositories/**TCD.git)
> on the "New Review Request" screen that works fine. But I'd like to get
> post-review work without having to create a specific repository for each
> user. Does anyone know if this can be done?
>
> - Peter
>
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




post-review with git

2013-05-29 Thread Peter Snelling
I posted previously that I've installed ReviewBoard 1.7.7.1 on a Suse linux 
server (with git, apache, postgresql, modswgi, memcached, ...). The git 
repository we all use is 172.16.27.63. To get post-review to work properly, 
I had to add the following repository:
   Path: snelling@172.16.27.63:/localdisk/git/repositories/TCD.git
   Raw File URL: 
http://172.16.27.63/cgi-bin/gitweb/gitweb.cgi?p=TCD.git;a=blob_plain;f=;h=
 
and to have review board accept that repository, I had to setup ssh keys 
from the review board server to 172.16.27.63. Now that all works fine for 
me.
 
The problem now is when I tried to get another user to use post-review, 
they failed. Their repository was:
someuser@172.16.27.63:/localdisk/git/repositories/TCD.git 
and post-review wouldn't accept that. I had to create another repository 
for them, and add their ssh keys to the git server. That worked, but it 
seems like too much pain for dozens of users.
 
If users upload their diff using the ReviewBoard web page and my repository 
(snelling@172.16.27.63:/localdisk/git/repositories/TCD.git) on the "New 
Review Request" screen that works fine. But I'd like to get post-review 
work without having to create a specific repository for each user. Does 
anyone know if this can be done?
 
- Peter

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Text files are being considered as binary file in View Diff

2013-05-29 Thread Christian Hammond
This is likely due to your Perforce repository marking these as binary
files. We only display a file as binary if the diff tells us it's binary,
and this is based on what the repository has marked for these files or file
types.

Christian

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


On Wed, May 29, 2013 at 7:32 AM, Rodrigo Maccari
wrote:

> Hi,
>
> I have the Reviewboard integrated with Perforce, all request are being
> created without problem, but when I try do a Diff of some sh files or xml
> the Reviewboard consider them as binary files.
>
>  See below:
>
>
>
> Revision 1 New Change This is a binary file. The content cannot be
> displayed.
>
>1. 
> //teste2/buildscript/addmd5sum.sh:binary
>file
>2. 
> //teste2/buildscript/bcm_hide.list:binary
>file
>3. 
> //teste2/buildscript/FOTA/TOOL/DELTA_GEN/xml/CompConf_FOTA_all.xml:binary
>file
>
>
>  Does anyone have any idea how to solve this?
>
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Status of mercurial+ssh support

2013-05-29 Thread Christian Hammond
Hi Jimmy,

Sorry, I meant mercurial and not bzr. Thanks for the correct info :)

Can you try upgrading the server's copy of mercurial? It looks like we're
expecting a newer version, which may be the reason you're having the
problem. That "sshrepository" object mentioned is gone, and I want to see
if it still reproduces and what the new error is.

Thanks,

Christian

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


On Mon, May 27, 2013 at 4:06 PM, jimmy jiang wrote:

> one more attachment of hgrc, thanks.
>
> BR
> Jimmy
>
>
>
> 2013/5/28 jimmy jiang 
>
>> Christian,
>>
>>
>>
>>> As below info, thanks,
>>>
>>> 1) RB version
>>> v1.7.6
>>>
>>> 2) Version of bzr on the server
>>> i use ubuntu linux v12, mercurial version v2.2.2.
>>> Does bzy means bug tracker? no bug tracker set for me.
>>>
>>> 3) The full traceback and related reviewboard.log entries for this error
>>> pls refer to the attached reviewboard.log, the last in which is the
>>> exception info in ./reviewboard/scmtool/hg.py.
>>> the hg.py source file also attached.
>>>
>>> 4) The command line you're using for generating the diff
>>> => cmd line:post-review -d -p -r 8
>>> -diff-filename=/home/jimmy/a1.patch
>>> the a1.patch also attached.
>>> and also 2 cfg files in working dir attached: hgrc and .reviewboardrc
>>>
>>> 4) Ideally, a diff you can show me that reproduces this problem
>>>
>>>
>  --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Unable to view diff for multiple files.

2013-05-29 Thread Christian Hammond
I have a workaround that'll go into 1.7.8, but I'm really confused how the
original problem is occurring.

Christian

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


On Wed, May 29, 2013 at 10:46 AM, Kristin Thomas wrote:

>
>
> On Tuesday, May 28, 2013 12:16:37 PM UTC-6, Matthew Woehlke wrote:
>>
>> Um... this seems familiar. Have you upgraded through a number of RB
>> versions? Is the user having trouble either notably older, newer, or had
>> a long period of inactivity?
>>
>
> It was a fairly new install of RB from scratch.
>
>
>>
>> Something to try: have the user go into their account settings and
>> change the value of their 'always open an issue' option. (They can
>> immediately change it back, just as long as they apply the change with
>> the opposite value to force it to be rewritten.)
>>
>
> Yeah, we did that and it corrected the issue.
>
>
>
>>
>> --
>> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Unable to view diff for multiple files.

2013-05-29 Thread Kristin Thomas


On Tuesday, May 28, 2013 12:16:37 PM UTC-6, Matthew Woehlke wrote:
>
> Um... this seems familiar. Have you upgraded through a number of RB 
> versions? Is the user having trouble either notably older, newer, or had 
> a long period of inactivity? 
>

It was a fairly new install of RB from scratch.
 

>
> Something to try: have the user go into their account settings and 
> change the value of their 'always open an issue' option. (They can 
> immediately change it back, just as long as they apply the change with 
> the opposite value to force it to be rewritten.) 
>

Yeah, we did that and it corrected the issue.

 

>
> -- 
> 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
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Text files are being considered as binary file in View Diff

2013-05-29 Thread Rodrigo Maccari
Hi,

I have the Reviewboard integrated with Perforce, all request are being 
created without problem, but when I try do a Diff of some sh files or xml 
the Reviewboard consider them as binary files.

 See below:


 
Revision 1New ChangeThis is a binary file. The content cannot be displayed.
   
   1. 
//teste2/buildscript/addmd5sum.sh:binary
 
   file
   2. 
//teste2/buildscript/bcm_hide.list:binary
 
   file
   3. 
//teste2/buildscript/FOTA/TOOL/DELTA_GEN/xml/CompConf_FOTA_all.xml:binary
 
   file


 Does anyone have any idea how to solve this?

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Unable to view diff for multiple files.

2013-05-29 Thread Ken Rachynski
We did not manage to get that snapshot, but I will keep it in mind if we 
encounter another such user on our system.

Ken

On Tuesday, May 28, 2013 1:06:33 PM UTC-6, Christian Hammond wrote:
>
> The two issues are related.
>
> I have absolutely no idea how the user's profile entry is ending up with 
> that value set to.. null? Or something. 
>
> Actually, for any user hitting this, I'd love to get an SQL dump of their 
> accounts_profile table entry, if you can find it, before they fix it with 
> the double-toggle workaround.
>
> Christian
>
> -- 
> Christian Hammond - chi...@chipx86.com 
> Review Board - http://www.reviewboard.org
> Beanbag, Inc. - http://www.beanbaginc.com
>  
> On May 28, 2013, at 7:29 AM, Kristin Thomas > 
> wrote:
>
> Was there a resolution to this issue?  We are experiencing a similar 
> problem.  We have 16 users with no problem and one user that cannot load 
> any diffs (in IE, Chrome, or Firefox).  Same error as mentioned previously:
>
> [08:21:52.611] SyntaxError: syntax error @ 
> http://reviewboard.companyname.com/r/87/diff/#:40
> [08:21:52.809] ReferenceError: gReviewRequestId is not defined @ 
> http://reviewboard.companyname.com/static/rb/js/reviews.min.89914309c82b.js:112
> [08:21:52.837] TypeError: RB.setFileAttachmentComments is not a function @ 
> http://reviewboard.companyname.com/r/87/diff/#:414
>
> I'll attach the log.
>
> Any help would be greatly appreciated.
>
> Kristin Thomas
>
> On Tuesday, April 23, 2013 7:16:04 PM UTC-6, Jonathan Wilson wrote:
>>
>> Hi Christian,
>>  
>> Sorry for the late reply, I tried view a diff with the Chrome console and 
>> no error messages were displayed.
>>  
>> I only received the following messages while clicking on the initial 
>> review request link:
>> Uncaught SyntaxError: Unexpected token ; /r/593/:40
>> Uncaught ReferenceError: gReviewRequestId is not defined 
>> reviews.min.js:112
>> Uncaught TypeError: Object # has no method 
>> 'setFileAttachmentComments' rb-server.myreviewboard.org:415
>>  
>> I have 2 other colleagues who have the same issue, but the majority of my 
>> colleagues have no issues viewing multiple diffs.
>>  
>> -JW
>>
>> On Monday, April 22, 2013 2:33:58 PM UTC-4, Christian Hammond wrote:
>>
>>> On Mon, Apr 22, 2013 at 8:57 AM, Matthew Woehlke 
>>> wrote:
>>>
 On 2013-04-20 01:55, Christian Hammond wrote:

> Hi Jonathan,
>
> I don't think I've seen this. Can you open the Chrome console log, try
> again, and see what errors may appear?
>

 Is the server able to generate the diffs? I'm sure Christian knows much 
 more about RB than I do :-), but multiple browser failures still sounds to 
 me  more like a server problem.

 While you're checking your browser console logs, it is probably worth 
 also checking the server logs if there is any message that would indicate 
 a 
 problem generating the diffs.


>>> It very well might be the server. I stated on the browser side because 
>>> generally, if there's a server-side error, we should be showing it. We load 
>>> the diffs dynamically, so if there's a browser-side script error, we may 
>>> fail to either load or render (or show the error).
>>>
>>> Christian 
>>>
>>> -- 
>>> Christian Hammond - chi...@chipx86.com
>>> Review Board - http://www.reviewboard.org
>>> Beanbag, Inc. - http://www.beanbaginc.com 
>>>
>>> 
>
>
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Creating a review with Python API

2013-05-29 Thread soorajchirag
Thanks Steve.

While I was able to get past this using the other approach you had 
mentioned earlier. I've hit another related issue down the line. Looks like 
I'll have to convince my admin to upgrade the RB server. :)

Regards,
Sundeep

On Wednesday, 29 May 2013 12:10:57 UTC+5:30, Steven MacLeod wrote:
>
> Hi Sundeep,
>
> The minimum Review Board version which fully supports the RBTools API 
> Client is RB 1.6.12. It's possible to use the API Client with slightly 
> older versions, but certain operations will not be supported (I highly 
> recommend upgrading to at least 1.6.12, if not to an even more recent 
> version).
>
> The actual code that generates resource specific Content-Types is 
> primarily a part of djblets. Here is the commit which first introduced it: 
> https://github.com/djblets/djblets/commit/89b16e35d953798411dd2b21190fbf14e72f34b6
>
> - Steve
>
>
> On Tue, May 28, 2013 at 8:47 AM, >wrote:
>
>>
>> On debugging the issue further, I've found that the server is not 
>> returning the correct Content-Type when responding to the request to get 
>> the RootResource. It is returning "application/json" and not the 
>> "application/vnd.reviewboard.org.root" that the API is expecting.
>>
>> As a result, it does not handle the uri_templates section of the response 
>> and treats like like a regular ItemResource.
>>
>> The server I am running against is 1.6.3 (from http:///api/info):
>>
>> 
>>   
>> 
>>   1
>>   1.6.3
>>   1.6.3
>>   Review Board
>> 
>>   ...
>>
>> Is there a specific (minimum) version that we need to upgrade the server 
>> to ?
>>
>> Regards,
>> Sundeep
>>
>> PS: Could you also please point me to the server code where this 
>> Content-type is being added for RootResource.
>>
>>
>> On Monday, May 27, 2013 11:55:45 PM UTC+5:30, soorajchirag wrote:
>>>
>>> Hi Steven,
>>>
>>> I am attempting to get the review request by using the following as you 
>>> stated in your email:
>>> root.get_review_request(**review_request_id=15583)
>>>
>>> but it failed for me with the same AttributeError as in this thread.
>>>
>>> However, when I tried the other approach in your mail, it works fine.
>>>
>>> The following works:
>>>  self.review_request_id = id
>>>  self.review_request = self.root.get_review_requests(**
>>> ).get_item(id)
>>>
>>> This one doesnt:
>>>  self.review_request_id = id
>>>  self.review_request = self.root.get_review_request(**
>>> review_request_id=id)
>>>
>>> Error:
>>>   File ".../common/interface.py", line 95, in set_review_id
>>> self.review_request = self.root.get_review_request(**
>>> review_request_id=str_id)
>>>   File ".../rbtools/api/resource.py", line 273, in __getattr__
>>> raise AttributeError
>>>
>>> I tried get_diffs() as well and that is also failing with the same error.
>>>
>>> Is there something I need to do differently?
>>>
>>> Regards,
>>> Sundeep
>>>
>>> On Tuesday, 21 May 2013 00:37:08 UTC+5:30, Steven MacLeod wrote:

 Hi,

 'root.get_review_requests().**get_self(id='15583', 
 repository=repository)' will result in a
 "GET http://.../api/review_**requests/?id=15583&repository=**"

 What you're looking for is 'root.get_review_requests().**get_item(15583)', 
 or alternatively 'root.get_review_request(**review_request_id=15583). 
 The former traverses the tree of resources, while the latter uses the root 
 resource's uri-template for 'review-request'.

 Additionally, retrieving the id of the repository is unnecessary to 
 find the review request with the ID you are looking for.


 On Mon, May 20, 2013 at 8:50 AM, Dave Johnston wrote:

> Hi,
>
> I've been trying to following the documentation here:
> http://www.reviewboard.org/**docs/rbtools/0.5/api/tutorial/
>
> To create a review for a existing review request, and then add a 
> comment to the review.  Unfortunately I'm not getting far.
> I've tried the following:
>
> root = client.get_root()
> repos = root.get_repositories()
> if repos.num_items < 1:
> raise Exception('No valid repositories.')
>
> repository = repos[0].id
> review_request = root.get_review_requests().**get_self(id='15583', 
> repository=repository)
> review = review_request.get_reviews().**create()
> filediff_id = review.get_diffs()[0].get_**files()[0].id
> review.get_diff_comments().**create(
> filediff_id=1,
> first_line=131,
> num_lines=2,
> text='This is a diff comment!')
>
> review.update(body_top='Test Review Comment - please ignore', 
> public=True)
>
> I get the error: AttributeError: 'ResourceList' object has no 
> attribute 'get_reviews'
>
> So it looks like  root.get_review_requests().**get_self(id='15583', 
> repository=repository) isn't the right request to return an existing 
> review