Re: API question: list of files in requests, filtered by path and request date

2012-12-07 Thread Christian Hammond
Hi Dado,

You probably don't want to query the database directly, but you could write a 
script that uses our Model classes to get what you want.

You'll have to spend some time looking at the Django docs on how to do that, 
and write a script that has your site's conf/ directory in your PYTHONPATH 
environment variable, and DJANGO_SETTINGS_MODULE set to reviewboard.settings.

What I'd recommend, though, is to instead have a pre-commit hook that blocks a 
commit unless the following conditions are met:

1) The commit message references the review request ID or URL in some standard 
way.

2) That review request has at least one review marked Ship It.

You can make use of the web API to get that information.

I believe others on this list have built such scripts. Perhaps someone can 
provide one.

Christian


On Dec 6, 2012, at 11:28, Dado Feigenblatt d...@dado.org wrote:

 Hi Christian,
 
 We're using ReviewBoard version 1.6.3
 We also using Perforce version P4D/LINUX26X86_64/2012.2/551823 (2012/11/09)
 
 We have a few different groups of developers.
 One of these groups writes mostly one-offs or do local customizations at 
 break neck speeds.
 These is all in-house code, for their own use.
 So for that group we never required the highest level of programming 
 best-practices, but we want to start steering them in that direction.
 Use of reviewboard has been optional but we might make that a requirement.
 Right now we'd like to get some general stats in terms of how much of their 
 code is being submitted for review, how much feedback people are getting, and 
 that sort of stuff. We want to gauge current level of adoption and what 
 effect it might have if/when we make that a requirement.
 
 If we make code review a requirement for them, then I'll have to query 
 reviewboard for each source file being released.
 I'll have to make sure there's an approved review for that revision of the 
 source file.
 Or maybe if the file being released is in an approved review just by looking 
 at diffs.
 I haven't put much thought yet into what kind of checks make sense here.
 Any advice on that would be greatly appreciated.
 I thing I saw an email thread about that. I'll look that up.
 
 How do you feel about users querying the database directly?
 Is there any documentation on the schema?
 
 Thanks,
 Dado
 
 
 
 On Thu, 6 Dec 2012 01:37:52 -0800, Christian Hammond chip...@chipx86.com 
 wrote:
 Hi Dado,
 
 The web API isn't really built to provide this sort of query,
 unfortunately. What would be needed is a new resource for all modified
 diffs that let you query such information. I'd be happy to include
 such a resource, but someone would have to write it.
 
 I'm curious what you're working on. Maybe there are other solutions
 for now. Also, what version of RB?
 
 Christian
 
 --
 Christian Hammond - chip...@chipx86.com [1]
 Review Board - http://www.reviewboard.org [2]
 VMware, Inc. - http://www.vmware.com [3]
 
 On Wed, Dec 5, 2012 at 6:11 PM, dado  wrote:
 What would be the best way of getting a list of all reviewed files
 matching a determined perforce path?
 I also know I'm after the reviews created after 04/01/12.
 Should I simply get all the reviews after that date and do any
 additional filtering client-side?
 If so, what would be the best way to get all reviews after April
 *and* the list of files in the reviews?
 I've used the WEB API before, but I'm clearly not very comfortable
 with it yet.
 
 Thanks,
 Dado
 
 --
 Want to help the Review Board project? Donate today at
 http://www.reviewboard.org/donate/ [5]
 Happy user? Let us know at http://www.reviewboard.org/users/ [6]
 -~--~~~~--~~--~--~---
 To unsubscribe from this group, send email to
 reviewboard+unsubscr...@googlegroups.com [7]
 For more options, visit this group at
 http://groups.google.com/group/reviewboard?hl=en [8]
  
  
 
 --
 Want to help the Review Board project? Donate today at
 http://www.reviewboard.org/donate/ [9]
 Happy user? Let us know at http://www.reviewboard.org/users/ [10]
 -~--~~~~--~~--~--~---
 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 [11]
 
 
 
 Links:
 --
 [1] mailto:chip...@chipx86.com
 [2] http://www.reviewboard.org
 [3] http://www.vmware.com
 [4] mailto:d...@dado.org
 [5] http://www.reviewboard.org/donate/
 [6] http://www.reviewboard.org/users/
 [7] mailto:reviewboard%2bunsubscr...@googlegroups.com
 [8] http://groups.google.com/group/reviewboard?hl=en
 [9] http://www.reviewboard.org/donate/
 [10] http://www.reviewboard.org/users/
 [11] 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 

Re: API question: list of files in requests, filtered by path and request date

2012-12-06 Thread Christian Hammond
Hi Dado,

The web API isn't really built to provide this sort of query,
unfortunately. What would be needed is a new resource for all modified
diffs that let you query such information. I'd be happy to include such a
resource, but someone would have to write it.

I'm curious what you're working on. Maybe there are other solutions for
now. Also, what version of RB?

Christian

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



On Wed, Dec 5, 2012 at 6:11 PM, dado d...@dado.org wrote:

 What would be the best way of getting a list of all reviewed files
 matching a determined perforce path?
 I also know I'm after the reviews created after 04/01/12.
 Should I simply get all the reviews after that date and do any additional
 filtering client-side?
 If so, what would be the best way to get all reviews after April *and* the
 list of files in the reviews?
 I've used the WEB API before, but I'm clearly not very comfortable with it
 yet.

 Thanks,
 Dado

  --
 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: API question: list of files in requests, filtered by path and request date

2012-12-06 Thread Dado Feigenblatt

Hi Christian,

We're using ReviewBoard version 1.6.3
We also using Perforce version P4D/LINUX26X86_64/2012.2/551823 
(2012/11/09)


We have a few different groups of developers.
One of these groups writes mostly one-offs or do local customizations 
at break neck speeds.

These is all in-house code, for their own use.
So for that group we never required the highest level of programming 
best-practices, but we want to start steering them in that direction.
Use of reviewboard has been optional but we might make that a 
requirement.
Right now we'd like to get some general stats in terms of how much of 
their code is being submitted for review, how much feedback people are 
getting, and that sort of stuff. We want to gauge current level of 
adoption and what effect it might have if/when we make that a 
requirement.


If we make code review a requirement for them, then I'll have to query 
reviewboard for each source file being released.
I'll have to make sure there's an approved review for that revision of 
the source file.
Or maybe if the file being released is in an approved review just by 
looking at diffs.
I haven't put much thought yet into what kind of checks make sense 
here.

Any advice on that would be greatly appreciated.
I thing I saw an email thread about that. I'll look that up.

How do you feel about users querying the database directly?
Is there any documentation on the schema?

Thanks,
Dado



On Thu, 6 Dec 2012 01:37:52 -0800, Christian Hammond 
chip...@chipx86.com wrote:

Hi Dado,

The web API isn't really built to provide this sort of query,
unfortunately. What would be needed is a new resource for all 
modified

diffs that let you query such information. I'd be happy to include
such a resource, but someone would have to write it.

I'm curious what you're working on. Maybe there are other solutions
for now. Also, what version of RB?

Christian

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

On Wed, Dec 5, 2012 at 6:11 PM, dado  wrote:
 What would be the best way of getting a list of all reviewed files
matching a determined perforce path?
I also know I'm after the reviews created after 04/01/12.
Should I simply get all the reviews after that date and do any
additional filtering client-side?
 If so, what would be the best way to get all reviews after April
*and* the list of files in the reviews?
I've used the WEB API before, but I'm clearly not very comfortable
with it yet.

Thanks,
Dado

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

 --
 Want to help the Review Board project? Donate today at
http://www.reviewboard.org/donate/ [9]
 Happy user? Let us know at http://www.reviewboard.org/users/ [10]
 -~--~~~~--~~--~--~---
 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 [11]



Links:
--
[1] mailto:chip...@chipx86.com
[2] http://www.reviewboard.org
[3] http://www.vmware.com
[4] mailto:d...@dado.org
[5] http://www.reviewboard.org/donate/
[6] http://www.reviewboard.org/users/
[7] mailto:reviewboard%2bunsubscr...@googlegroups.com
[8] http://groups.google.com/group/reviewboard?hl=en
[9] http://www.reviewboard.org/donate/
[10] http://www.reviewboard.org/users/
[11] 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




API question: list of files in requests, filtered by path and request date

2012-12-05 Thread dado
What would be the best way of getting a list of all reviewed files matching 
a determined perforce path?
I also know I'm after the reviews created after 04/01/12.
Should I simply get all the reviews after that date and do any additional 
filtering client-side?
If so, what would be the best way to get all reviews after April *and* the 
list of files in the reviews?
I've used the WEB API before, but I'm clearly not very comfortable with it 
yet.

Thanks,
Dado

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