Re: diff content information in ReviewBoard Database

2016-07-13 Thread john levin

Hi Chris,

I'm trying to download the diffs in my linux server (where svn server 
installed to validate in pre-commit) via wget but i'm getting the html 
files only. Any suggestions ?

Also i guess i should try the API's. Can you please let me know how to 
utilize the API's. I have no idea about it.
It will be helpful if you explain me how to setup the API to communicate 
and get the results from RB.The Docs was explaining about the Resources 
etc, but no clue about the setup.

Thanks Alot !

~John

On Wednesday, July 13, 2016 at 3:25:54 PM UTC+5:30, Christian Hammond wrote:
>
> Hi John,
>
> We fetch the files from the repository, which may be slightly different 
> from what you have in your tree locally (many repositories alter things 
> like encodings/line endings to match the local environment when checking 
> out files). We may then make other changes (our own encoding/line ending 
> normalization). The results of these are what we generate SHAs for.
>
> Given that, you might see entirely different SHAs on your system. What you 
> probably want to do instead is download the patches from Review Board, 
> apply them, and compare those resulting files against the full files being 
> checked in. You may also need to deal with some normalization, like we do, 
> depending on your setup.
>
> Christian
>
> -- 
> Christian Hammond
> President/CEO of Beanbag 
> Makers of Review Board 
>
> On Mon, Jul 11, 2016 at 11:43 PM, john levin  > wrote:
>
>> Hi Chris,
>>
>> Thanks. Now, i'm trying to validate with the stored diffs. I could see 
>> there are two sha's available for each file in a review id 1. "orig_sha1" 
>> 2. patched_sha1.
>> may i know how it was generated? I tried with sha1sum in linux but the 
>> values mismatch. 
>> Appreciate your response.
>> Thanks.
>>
>> ~John
>>
>> On Saturday, July 9, 2016 at 2:05:11 AM UTC+5:30, Christian Hammond wrote:
>>>
>>> Hi John,
>>>
>>> This will only be available for diffs that have been viewed since 
>>> upgrading to (I believe) Review Board 2.0.9. Older diffs won't contain 
>>> this, but viewing the diff again should generate the information. All new 
>>> diffs should have it.
>>>
>>> Christian
>>>
>>> -- 
>>> Christian Hammond
>>> President/CEO of Beanbag 
>>> Makers of Review Board 
>>>
>>> On Fri, Jul 8, 2016 at 6:41 AM, john levin  wrote:
>>>
 Hi Chris,

 The extra_data column in diffviewer_filediff table has the info but not 
 for all. for some rows it has "patched_sha1" and for some rows it has info 
 like{"raw_insert_count": 0, "raw_delete_count": 1}. Unfortunately it 
 doesnt 
 helps. anywhere it stores the "patched_sha1" info for each files for the 
 review id ?

 Thank You 

 ~John

 On Thursday, July 7, 2016 at 12:05:56 PM UTC+5:30, Christian Hammond 
 wrote:
>
> We don't support database access outside of using the API or through 
> our Python modules in Review Board (as part of our extensions). It's 
> doable, but it's not something we want to encourage.
>
> If you absolutely need to, it's stored as serialized JSON data in the 
> diffviewer_filediff table. You'll need to tie that in with the 
> diffviewer_diffset table, which is associated with a 
> diffviewer_diffsethistory, which is associated with a 
> reviews_reviewrequest. We don't guarantee any form of stability for the 
> data in these.
>
> The API is your best choice for this. It'll be more straight-forward 
> and more future-proof.
>
> Christian
>
> -- 
> Christian Hammond
> President/CEO of Beanbag 
> Makers of Review Board 
>
> On Wed, Jul 6, 2016 at 11:25 PM, john levin  
> wrote:
>
>> Hi Chris,
>>
>> Thanks ! So far i'm not using the API's (i'm not Familiar with it) 
>> and communicating directly to the Database. Hence can you please let me 
>> know where these SHA"s stored in Database (In which Table). 
>>
>> ~John
>>
>> On Thu, Jul 7, 2016 at 2:42 AM, Christian Hammond <
>> chri...@beanbaginc.com> wrote:
>>
>>> Hi John,
>>>
>>> Easiest way, if it works for you, might be to just fetch the 
>>> uploaded diff and compare. If you look at the URL for Download Diff on 
>>> a 
>>> review request, you'll see the kind of URL you'd need to compose. 
>>> Generate 
>>> a diff locally and compare that to the diff going in.
>>>
>>> Alternatively, you can compare the SHAs of the files. To do this, 
>>> you need to loop over all files in the diff on the review request using 
>>> the 
>>> API. You can see this resource for info:
>>>
>>>
>>> https://www.reviewboard.org/docs/manual/2.5/webapi/2.0/resources/file-diff-list/
>>>
>>> Note in the example payloads the 

Re: diff content information in ReviewBoard Database

2016-07-13 Thread Christian Hammond
Hi John,

We fetch the files from the repository, which may be slightly different
from what you have in your tree locally (many repositories alter things
like encodings/line endings to match the local environment when checking
out files). We may then make other changes (our own encoding/line ending
normalization). The results of these are what we generate SHAs for.

Given that, you might see entirely different SHAs on your system. What you
probably want to do instead is download the patches from Review Board,
apply them, and compare those resulting files against the full files being
checked in. You may also need to deal with some normalization, like we do,
depending on your setup.

Christian

-- 
Christian Hammond
President/CEO of Beanbag 
Makers of Review Board 

On Mon, Jul 11, 2016 at 11:43 PM, john levin  wrote:

> Hi Chris,
>
> Thanks. Now, i'm trying to validate with the stored diffs. I could see
> there are two sha's available for each file in a review id 1. "orig_sha1"
> 2. patched_sha1.
> may i know how it was generated? I tried with sha1sum in linux but the
> values mismatch.
> Appreciate your response.
> Thanks.
>
> ~John
>
> On Saturday, July 9, 2016 at 2:05:11 AM UTC+5:30, Christian Hammond wrote:
>>
>> Hi John,
>>
>> This will only be available for diffs that have been viewed since
>> upgrading to (I believe) Review Board 2.0.9. Older diffs won't contain
>> this, but viewing the diff again should generate the information. All new
>> diffs should have it.
>>
>> Christian
>>
>> --
>> Christian Hammond
>> President/CEO of Beanbag 
>> Makers of Review Board 
>>
>> On Fri, Jul 8, 2016 at 6:41 AM, john levin  wrote:
>>
>>> Hi Chris,
>>>
>>> The extra_data column in diffviewer_filediff table has the info but not
>>> for all. for some rows it has "patched_sha1" and for some rows it has info
>>> like{"raw_insert_count": 0, "raw_delete_count": 1}. Unfortunately it doesnt
>>> helps. anywhere it stores the "patched_sha1" info for each files for the
>>> review id ?
>>>
>>> Thank You
>>>
>>> ~John
>>>
>>> On Thursday, July 7, 2016 at 12:05:56 PM UTC+5:30, Christian Hammond
>>> wrote:

 We don't support database access outside of using the API or through
 our Python modules in Review Board (as part of our extensions). It's
 doable, but it's not something we want to encourage.

 If you absolutely need to, it's stored as serialized JSON data in the
 diffviewer_filediff table. You'll need to tie that in with the
 diffviewer_diffset table, which is associated with a
 diffviewer_diffsethistory, which is associated with a
 reviews_reviewrequest. We don't guarantee any form of stability for the
 data in these.

 The API is your best choice for this. It'll be more straight-forward
 and more future-proof.

 Christian

 --
 Christian Hammond
 President/CEO of Beanbag 
 Makers of Review Board 

 On Wed, Jul 6, 2016 at 11:25 PM, john levin  wrote:

> Hi Chris,
>
> Thanks ! So far i'm not using the API's (i'm not Familiar with it) and
> communicating directly to the Database. Hence can you please let me know
> where these SHA"s stored in Database (In which Table).
>
> ~John
>
> On Thu, Jul 7, 2016 at 2:42 AM, Christian Hammond <
> chri...@beanbaginc.com> wrote:
>
>> Hi John,
>>
>> Easiest way, if it works for you, might be to just fetch the uploaded
>> diff and compare. If you look at the URL for Download Diff on a review
>> request, you'll see the kind of URL you'd need to compose. Generate a 
>> diff
>> locally and compare that to the diff going in.
>>
>> Alternatively, you can compare the SHAs of the files. To do this, you
>> need to loop over all files in the diff on the review request using the
>> API. You can see this resource for info:
>>
>>
>> https://www.reviewboard.org/docs/manual/2.5/webapi/2.0/resources/file-diff-list/
>>
>> Note in the example payloads the "extra_data.patched_sha1" key. This
>> is the SHA1 of the patched file, the one going into the commit. If you 
>> want
>> to compare file contents and not the diff, you can get all these for the
>> latest diff revision on the review request, and compare those. Something 
>> to
>> note is that the file contents may be altered at some point in ways that
>> would affect the checksum (newlines normalized, file encodings being
>> applied on our end or the repository end to get contents to match up). So
>> depending on your setup, that may come into play.
>>
>> Hope that helps!
>>
>> Christian
>>
>> --
>> Christian Hammond
>> President/CEO of Beanbag 
>> Makers of Review Board 

Re: diff content information in ReviewBoard Database

2016-07-12 Thread john levin
Hello Team,

Could someone reply if you have gone through the below issue.

~John

On Tuesday, July 12, 2016 at 12:13:46 PM UTC+5:30, john levin wrote:
>
> Hi Chris,
>
> Thanks. Now, i'm trying to validate with the stored diffs. I could see 
> there are two sha's available for each file in a review id 1. "orig_sha1" 
> 2. patched_sha1.
> may i know how it was generated? I tried with sha1sum in linux but the 
> values mismatch. 
> Appreciate your response.
> Thanks.
>
> ~John
>
> On Saturday, July 9, 2016 at 2:05:11 AM UTC+5:30, Christian Hammond wrote:
>>
>> Hi John,
>>
>> This will only be available for diffs that have been viewed since 
>> upgrading to (I believe) Review Board 2.0.9. Older diffs won't contain 
>> this, but viewing the diff again should generate the information. All new 
>> diffs should have it.
>>
>> Christian
>>
>> -- 
>> Christian Hammond
>> President/CEO of Beanbag 
>> Makers of Review Board 
>>
>> On Fri, Jul 8, 2016 at 6:41 AM, john levin  wrote:
>>
>>> Hi Chris,
>>>
>>> The extra_data column in diffviewer_filediff table has the info but not 
>>> for all. for some rows it has "patched_sha1" and for some rows it has info 
>>> like{"raw_insert_count": 0, "raw_delete_count": 1}. Unfortunately it doesnt 
>>> helps. anywhere it stores the "patched_sha1" info for each files for the 
>>> review id ?
>>>
>>> Thank You 
>>>
>>> ~John
>>>
>>> On Thursday, July 7, 2016 at 12:05:56 PM UTC+5:30, Christian Hammond 
>>> wrote:

 We don't support database access outside of using the API or through 
 our Python modules in Review Board (as part of our extensions). It's 
 doable, but it's not something we want to encourage.

 If you absolutely need to, it's stored as serialized JSON data in the 
 diffviewer_filediff table. You'll need to tie that in with the 
 diffviewer_diffset table, which is associated with a 
 diffviewer_diffsethistory, which is associated with a 
 reviews_reviewrequest. We don't guarantee any form of stability for the 
 data in these.

 The API is your best choice for this. It'll be more straight-forward 
 and more future-proof.

 Christian

 -- 
 Christian Hammond
 President/CEO of Beanbag 
 Makers of Review Board 

 On Wed, Jul 6, 2016 at 11:25 PM, john levin  wrote:

> Hi Chris,
>
> Thanks ! So far i'm not using the API's (i'm not Familiar with it) and 
> communicating directly to the Database. Hence can you please let me know 
> where these SHA"s stored in Database (In which Table). 
>
> ~John
>
> On Thu, Jul 7, 2016 at 2:42 AM, Christian Hammond <
> chri...@beanbaginc.com> wrote:
>
>> Hi John,
>>
>> Easiest way, if it works for you, might be to just fetch the uploaded 
>> diff and compare. If you look at the URL for Download Diff on a review 
>> request, you'll see the kind of URL you'd need to compose. Generate a 
>> diff 
>> locally and compare that to the diff going in.
>>
>> Alternatively, you can compare the SHAs of the files. To do this, you 
>> need to loop over all files in the diff on the review request using the 
>> API. You can see this resource for info:
>>
>>
>> https://www.reviewboard.org/docs/manual/2.5/webapi/2.0/resources/file-diff-list/
>>
>> Note in the example payloads the "extra_data.patched_sha1" key. This 
>> is the SHA1 of the patched file, the one going into the commit. If you 
>> want 
>> to compare file contents and not the diff, you can get all these for the 
>> latest diff revision on the review request, and compare those. Something 
>> to 
>> note is that the file contents may be altered at some point in ways that 
>> would affect the checksum (newlines normalized, file encodings being 
>> applied on our end or the repository end to get contents to match up). 
>> So 
>> depending on your setup, that may come into play.
>>
>> Hope that helps!
>>
>> Christian
>>
>> -- 
>> Christian Hammond
>> President/CEO of Beanbag 
>> Makers of Review Board 
>>
>> On Wed, Jul 6, 2016 at 9:44 AM, john levin  
>> wrote:
>>
>>> Hi Chris,
>>>
>>> Thanks for your reply !
>>>
>>> We are validating the list of files in a review id and the files 
>>> trying to commit in SVN (using precommit hook). But it is not a proper 
>>> way.problem here is People can use the same review id and can make 
>>> changes 
>>> and commit to svn without updating the review. So we are trying to 
>>> validate 
>>> with diff or (some sort of CRC for that particular review id).
>>>
>>> --
>>> Supercharge your Review Board with Power Pack: 
>>> https://www.reviewboard.or

Re: diff content information in ReviewBoard Database

2016-07-11 Thread john levin
Hi Chris,

Thanks. Now, i'm trying to validate with the stored diffs. I could see 
there are two sha's available for each file in a review id 1. "orig_sha1" 
2. patched_sha1.
may i know how it was generated? I tried with sha1sum in linux but the 
values mismatch. 
Appreciate your response.
Thanks.

~John

On Saturday, July 9, 2016 at 2:05:11 AM UTC+5:30, Christian Hammond wrote:
>
> Hi John,
>
> This will only be available for diffs that have been viewed since 
> upgrading to (I believe) Review Board 2.0.9. Older diffs won't contain 
> this, but viewing the diff again should generate the information. All new 
> diffs should have it.
>
> Christian
>
> -- 
> Christian Hammond
> President/CEO of Beanbag 
> Makers of Review Board 
>
> On Fri, Jul 8, 2016 at 6:41 AM, john levin  > wrote:
>
>> Hi Chris,
>>
>> The extra_data column in diffviewer_filediff table has the info but not 
>> for all. for some rows it has "patched_sha1" and for some rows it has info 
>> like{"raw_insert_count": 0, "raw_delete_count": 1}. Unfortunately it doesnt 
>> helps. anywhere it stores the "patched_sha1" info for each files for the 
>> review id ?
>>
>> Thank You 
>>
>> ~John
>>
>> On Thursday, July 7, 2016 at 12:05:56 PM UTC+5:30, Christian Hammond 
>> wrote:
>>>
>>> We don't support database access outside of using the API or through our 
>>> Python modules in Review Board (as part of our extensions). It's doable, 
>>> but it's not something we want to encourage.
>>>
>>> If you absolutely need to, it's stored as serialized JSON data in the 
>>> diffviewer_filediff table. You'll need to tie that in with the 
>>> diffviewer_diffset table, which is associated with a 
>>> diffviewer_diffsethistory, which is associated with a 
>>> reviews_reviewrequest. We don't guarantee any form of stability for the 
>>> data in these.
>>>
>>> The API is your best choice for this. It'll be more straight-forward and 
>>> more future-proof.
>>>
>>> Christian
>>>
>>> -- 
>>> Christian Hammond
>>> President/CEO of Beanbag 
>>> Makers of Review Board 
>>>
>>> On Wed, Jul 6, 2016 at 11:25 PM, john levin  wrote:
>>>
 Hi Chris,

 Thanks ! So far i'm not using the API's (i'm not Familiar with it) and 
 communicating directly to the Database. Hence can you please let me know 
 where these SHA"s stored in Database (In which Table). 

 ~John

 On Thu, Jul 7, 2016 at 2:42 AM, Christian Hammond <
 chri...@beanbaginc.com> wrote:

> Hi John,
>
> Easiest way, if it works for you, might be to just fetch the uploaded 
> diff and compare. If you look at the URL for Download Diff on a review 
> request, you'll see the kind of URL you'd need to compose. Generate a 
> diff 
> locally and compare that to the diff going in.
>
> Alternatively, you can compare the SHAs of the files. To do this, you 
> need to loop over all files in the diff on the review request using the 
> API. You can see this resource for info:
>
>
> https://www.reviewboard.org/docs/manual/2.5/webapi/2.0/resources/file-diff-list/
>
> Note in the example payloads the "extra_data.patched_sha1" key. This 
> is the SHA1 of the patched file, the one going into the commit. If you 
> want 
> to compare file contents and not the diff, you can get all these for the 
> latest diff revision on the review request, and compare those. Something 
> to 
> note is that the file contents may be altered at some point in ways that 
> would affect the checksum (newlines normalized, file encodings being 
> applied on our end or the repository end to get contents to match up). So 
> depending on your setup, that may come into play.
>
> Hope that helps!
>
> Christian
>
> -- 
> Christian Hammond
> President/CEO of Beanbag 
> Makers of Review Board 
>
> On Wed, Jul 6, 2016 at 9:44 AM, john levin  wrote:
>
>> Hi Chris,
>>
>> Thanks for your reply !
>>
>> We are validating the list of files in a review id and the files 
>> trying to commit in SVN (using precommit hook). But it is not a proper 
>> way.problem here is People can use the same review id and can make 
>> changes 
>> and commit to svn without updating the review. So we are trying to 
>> validate 
>> with diff or (some sort of CRC for that particular review id).
>>
>> --
>> Supercharge your Review Board with Power Pack: 
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons: 
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> ---
>> You received this message because you are subscribed to the Google 
>> Groups "reviewboard" group.
>> To u

Re: diff content information in ReviewBoard Database

2016-07-08 Thread Christian Hammond
Hi John,

This will only be available for diffs that have been viewed since upgrading
to (I believe) Review Board 2.0.9. Older diffs won't contain this, but
viewing the diff again should generate the information. All new diffs
should have it.

Christian

-- 
Christian Hammond
President/CEO of Beanbag 
Makers of Review Board 

On Fri, Jul 8, 2016 at 6:41 AM, john levin  wrote:

> Hi Chris,
>
> The extra_data column in diffviewer_filediff table has the info but not
> for all. for some rows it has "patched_sha1" and for some rows it has info
> like{"raw_insert_count": 0, "raw_delete_count": 1}. Unfortunately it doesnt
> helps. anywhere it stores the "patched_sha1" info for each files for the
> review id ?
>
> Thank You
>
> ~John
>
> On Thursday, July 7, 2016 at 12:05:56 PM UTC+5:30, Christian Hammond wrote:
>>
>> We don't support database access outside of using the API or through our
>> Python modules in Review Board (as part of our extensions). It's doable,
>> but it's not something we want to encourage.
>>
>> If you absolutely need to, it's stored as serialized JSON data in the
>> diffviewer_filediff table. You'll need to tie that in with the
>> diffviewer_diffset table, which is associated with a
>> diffviewer_diffsethistory, which is associated with a
>> reviews_reviewrequest. We don't guarantee any form of stability for the
>> data in these.
>>
>> The API is your best choice for this. It'll be more straight-forward and
>> more future-proof.
>>
>> Christian
>>
>> --
>> Christian Hammond
>> President/CEO of Beanbag 
>> Makers of Review Board 
>>
>> On Wed, Jul 6, 2016 at 11:25 PM, john levin  wrote:
>>
>>> Hi Chris,
>>>
>>> Thanks ! So far i'm not using the API's (i'm not Familiar with it) and
>>> communicating directly to the Database. Hence can you please let me know
>>> where these SHA"s stored in Database (In which Table).
>>>
>>> ~John
>>>
>>> On Thu, Jul 7, 2016 at 2:42 AM, Christian Hammond <
>>> chri...@beanbaginc.com> wrote:
>>>
 Hi John,

 Easiest way, if it works for you, might be to just fetch the uploaded
 diff and compare. If you look at the URL for Download Diff on a review
 request, you'll see the kind of URL you'd need to compose. Generate a diff
 locally and compare that to the diff going in.

 Alternatively, you can compare the SHAs of the files. To do this, you
 need to loop over all files in the diff on the review request using the
 API. You can see this resource for info:


 https://www.reviewboard.org/docs/manual/2.5/webapi/2.0/resources/file-diff-list/

 Note in the example payloads the "extra_data.patched_sha1" key. This is
 the SHA1 of the patched file, the one going into the commit. If you want to
 compare file contents and not the diff, you can get all these for the
 latest diff revision on the review request, and compare those. Something to
 note is that the file contents may be altered at some point in ways that
 would affect the checksum (newlines normalized, file encodings being
 applied on our end or the repository end to get contents to match up). So
 depending on your setup, that may come into play.

 Hope that helps!

 Christian

 --
 Christian Hammond
 President/CEO of Beanbag 
 Makers of Review Board 

 On Wed, Jul 6, 2016 at 9:44 AM, john levin  wrote:

> Hi Chris,
>
> Thanks for your reply !
>
> We are validating the list of files in a review id and the files
> trying to commit in SVN (using precommit hook). But it is not a proper
> way.problem here is People can use the same review id and can make changes
> and commit to svn without updating the review. So we are trying to 
> validate
> with diff or (some sort of CRC for that particular review id).
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> 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...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

 --
 Supercharge your Review Board with Power Pack:
 https://www.reviewboard.org/powerpack/
 Want us to host Review Board for you? Check out RBCommons:
 https://rbcommons.com/
 Happy user? Let us know! https://www.reviewboard.org/users/
 ---
 You received this message because you are subscribed to the Google
 Groups "reviewboard" group.
 To unsubscribe

Re: diff content information in ReviewBoard Database

2016-07-08 Thread john levin
Hi Chris,

The extra_data column in diffviewer_filediff table has the info but not for 
all. for some rows it has "patched_sha1" and for some rows it has info 
like{"raw_insert_count": 0, "raw_delete_count": 1}. Unfortunately it doesnt 
helps. anywhere it stores the "patched_sha1" info for each files for the 
review id ?

Thank You 

~John

On Thursday, July 7, 2016 at 12:05:56 PM UTC+5:30, Christian Hammond wrote:
>
> We don't support database access outside of using the API or through our 
> Python modules in Review Board (as part of our extensions). It's doable, 
> but it's not something we want to encourage.
>
> If you absolutely need to, it's stored as serialized JSON data in the 
> diffviewer_filediff table. You'll need to tie that in with the 
> diffviewer_diffset table, which is associated with a 
> diffviewer_diffsethistory, which is associated with a 
> reviews_reviewrequest. We don't guarantee any form of stability for the 
> data in these.
>
> The API is your best choice for this. It'll be more straight-forward and 
> more future-proof.
>
> Christian
>
> -- 
> Christian Hammond
> President/CEO of Beanbag 
> Makers of Review Board 
>
> On Wed, Jul 6, 2016 at 11:25 PM, john levin  > wrote:
>
>> Hi Chris,
>>
>> Thanks ! So far i'm not using the API's (i'm not Familiar with it) and 
>> communicating directly to the Database. Hence can you please let me know 
>> where these SHA"s stored in Database (In which Table). 
>>
>> ~John
>>
>> On Thu, Jul 7, 2016 at 2:42 AM, Christian Hammond > > wrote:
>>
>>> Hi John,
>>>
>>> Easiest way, if it works for you, might be to just fetch the uploaded 
>>> diff and compare. If you look at the URL for Download Diff on a review 
>>> request, you'll see the kind of URL you'd need to compose. Generate a diff 
>>> locally and compare that to the diff going in.
>>>
>>> Alternatively, you can compare the SHAs of the files. To do this, you 
>>> need to loop over all files in the diff on the review request using the 
>>> API. You can see this resource for info:
>>>
>>>
>>> https://www.reviewboard.org/docs/manual/2.5/webapi/2.0/resources/file-diff-list/
>>>
>>> Note in the example payloads the "extra_data.patched_sha1" key. This is 
>>> the SHA1 of the patched file, the one going into the commit. If you want to 
>>> compare file contents and not the diff, you can get all these for the 
>>> latest diff revision on the review request, and compare those. Something to 
>>> note is that the file contents may be altered at some point in ways that 
>>> would affect the checksum (newlines normalized, file encodings being 
>>> applied on our end or the repository end to get contents to match up). So 
>>> depending on your setup, that may come into play.
>>>
>>> Hope that helps!
>>>
>>> Christian
>>>
>>> -- 
>>> Christian Hammond
>>> President/CEO of Beanbag 
>>> Makers of Review Board 
>>>
>>> On Wed, Jul 6, 2016 at 9:44 AM, john levin >> > wrote:
>>>
 Hi Chris,

 Thanks for your reply !

 We are validating the list of files in a review id and the files trying 
 to commit in SVN (using precommit hook). But it is not a proper 
 way.problem 
 here is People can use the same review id and can make changes and commit 
 to svn without updating the review. So we are trying to validate with diff 
 or (some sort of CRC for that particular review id).

 --
 Supercharge your Review Board with Power Pack: 
 https://www.reviewboard.org/powerpack/
 Want us to host Review Board for you? Check out RBCommons: 
 https://rbcommons.com/
 Happy user? Let us know! https://www.reviewboard.org/users/
 ---
 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...@googlegroups.com .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> -- 
>>> Supercharge your Review Board with Power Pack: 
>>> https://www.reviewboard.org/powerpack/
>>> Want us to host Review Board for you? Check out RBCommons: 
>>> https://rbcommons.com/
>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>> --- 
>>> 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...@googlegroups.com .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
>> Supercharge your Review Board with Power Pack: 
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons: 
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "reviewboard" group.

Re: diff content information in ReviewBoard Database

2016-07-06 Thread Christian Hammond
We don't support database access outside of using the API or through our
Python modules in Review Board (as part of our extensions). It's doable,
but it's not something we want to encourage.

If you absolutely need to, it's stored as serialized JSON data in the
diffviewer_filediff table. You'll need to tie that in with the
diffviewer_diffset table, which is associated with a
diffviewer_diffsethistory, which is associated with a
reviews_reviewrequest. We don't guarantee any form of stability for the
data in these.

The API is your best choice for this. It'll be more straight-forward and
more future-proof.

Christian

-- 
Christian Hammond
President/CEO of Beanbag 
Makers of Review Board 

On Wed, Jul 6, 2016 at 11:25 PM, john levin  wrote:

> Hi Chris,
>
> Thanks ! So far i'm not using the API's (i'm not Familiar with it) and
> communicating directly to the Database. Hence can you please let me know
> where these SHA"s stored in Database (In which Table).
>
> ~John
>
> On Thu, Jul 7, 2016 at 2:42 AM, Christian Hammond <
> christ...@beanbaginc.com> wrote:
>
>> Hi John,
>>
>> Easiest way, if it works for you, might be to just fetch the uploaded
>> diff and compare. If you look at the URL for Download Diff on a review
>> request, you'll see the kind of URL you'd need to compose. Generate a diff
>> locally and compare that to the diff going in.
>>
>> Alternatively, you can compare the SHAs of the files. To do this, you
>> need to loop over all files in the diff on the review request using the
>> API. You can see this resource for info:
>>
>>
>> https://www.reviewboard.org/docs/manual/2.5/webapi/2.0/resources/file-diff-list/
>>
>> Note in the example payloads the "extra_data.patched_sha1" key. This is
>> the SHA1 of the patched file, the one going into the commit. If you want to
>> compare file contents and not the diff, you can get all these for the
>> latest diff revision on the review request, and compare those. Something to
>> note is that the file contents may be altered at some point in ways that
>> would affect the checksum (newlines normalized, file encodings being
>> applied on our end or the repository end to get contents to match up). So
>> depending on your setup, that may come into play.
>>
>> Hope that helps!
>>
>> Christian
>>
>> --
>> Christian Hammond
>> President/CEO of Beanbag 
>> Makers of Review Board 
>>
>> On Wed, Jul 6, 2016 at 9:44 AM, john levin  wrote:
>>
>>> Hi Chris,
>>>
>>> Thanks for your reply !
>>>
>>> We are validating the list of files in a review id and the files trying
>>> to commit in SVN (using precommit hook). But it is not a proper way.problem
>>> here is People can use the same review id and can make changes and commit
>>> to svn without updating the review. So we are trying to validate with diff
>>> or (some sort of CRC for that particular review id).
>>>
>>> --
>>> Supercharge your Review Board with Power Pack:
>>> https://www.reviewboard.org/powerpack/
>>> Want us to host Review Board for you? Check out RBCommons:
>>> https://rbcommons.com/
>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>> ---
>>> 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/d/optout.
>>>
>>
>> --
>> Supercharge your Review Board with Power Pack:
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons:
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> ---
>> 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/d/optout.
>>
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> 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/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and 

Re: diff content information in ReviewBoard Database

2016-07-06 Thread john levin
Hi Chris,

Thanks ! So far i'm not using the API's (i'm not Familiar with it) and
communicating directly to the Database. Hence can you please let me know
where these SHA"s stored in Database (In which Table).

~John

On Thu, Jul 7, 2016 at 2:42 AM, Christian Hammond 
wrote:

> Hi John,
>
> Easiest way, if it works for you, might be to just fetch the uploaded diff
> and compare. If you look at the URL for Download Diff on a review request,
> you'll see the kind of URL you'd need to compose. Generate a diff locally
> and compare that to the diff going in.
>
> Alternatively, you can compare the SHAs of the files. To do this, you need
> to loop over all files in the diff on the review request using the API. You
> can see this resource for info:
>
>
> https://www.reviewboard.org/docs/manual/2.5/webapi/2.0/resources/file-diff-list/
>
> Note in the example payloads the "extra_data.patched_sha1" key. This is
> the SHA1 of the patched file, the one going into the commit. If you want to
> compare file contents and not the diff, you can get all these for the
> latest diff revision on the review request, and compare those. Something to
> note is that the file contents may be altered at some point in ways that
> would affect the checksum (newlines normalized, file encodings being
> applied on our end or the repository end to get contents to match up). So
> depending on your setup, that may come into play.
>
> Hope that helps!
>
> Christian
>
> --
> Christian Hammond
> President/CEO of Beanbag 
> Makers of Review Board 
>
> On Wed, Jul 6, 2016 at 9:44 AM, john levin  wrote:
>
>> Hi Chris,
>>
>> Thanks for your reply !
>>
>> We are validating the list of files in a review id and the files trying
>> to commit in SVN (using precommit hook). But it is not a proper way.problem
>> here is People can use the same review id and can make changes and commit
>> to svn without updating the review. So we are trying to validate with diff
>> or (some sort of CRC for that particular review id).
>>
>> --
>> Supercharge your Review Board with Power Pack:
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons:
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> ---
>> 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/d/optout.
>>
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> 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/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
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/d/optout.


Re: diff content information in ReviewBoard Database

2016-07-06 Thread Christian Hammond
Hi John,

Easiest way, if it works for you, might be to just fetch the uploaded diff
and compare. If you look at the URL for Download Diff on a review request,
you'll see the kind of URL you'd need to compose. Generate a diff locally
and compare that to the diff going in.

Alternatively, you can compare the SHAs of the files. To do this, you need
to loop over all files in the diff on the review request using the API. You
can see this resource for info:

https://www.reviewboard.org/docs/manual/2.5/webapi/2.0/resources/file-diff-list/

Note in the example payloads the "extra_data.patched_sha1" key. This is the
SHA1 of the patched file, the one going into the commit. If you want to
compare file contents and not the diff, you can get all these for the
latest diff revision on the review request, and compare those. Something to
note is that the file contents may be altered at some point in ways that
would affect the checksum (newlines normalized, file encodings being
applied on our end or the repository end to get contents to match up). So
depending on your setup, that may come into play.

Hope that helps!

Christian

-- 
Christian Hammond
President/CEO of Beanbag 
Makers of Review Board 

On Wed, Jul 6, 2016 at 9:44 AM, john levin  wrote:

> Hi Chris,
>
> Thanks for your reply !
>
> We are validating the list of files in a review id and the files trying to
> commit in SVN (using precommit hook). But it is not a proper way.problem
> here is People can use the same review id and can make changes and commit
> to svn without updating the review. So we are trying to validate with diff
> or (some sort of CRC for that particular review id).
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> 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/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
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/d/optout.


Re: diff content information in ReviewBoard Database

2016-07-06 Thread john levin
Hi Chris,

Thanks for your reply !

We are validating the list of files in a review id and the files trying to 
commit in SVN (using precommit hook). But it is not a proper way.problem here 
is People can use the same review id and can make changes and commit to svn 
without updating the review. So we are trying to validate with diff or (some 
sort of CRC for that particular review id).

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
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/d/optout.


Re: diff content information in ReviewBoard Database

2016-07-05 Thread Christian Hammond
Hi John,

Can you describe the use case more? There are many possible answers,
depending on what you're trying to do.

Christian

-- 
Christian Hammond
President/CEO of Beanbag 
Makers of Review Board 

On Tue, Jul 5, 2016 at 10:32 AM, john levin  wrote:

> Could someone pls reply.
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> 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/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
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/d/optout.


diff content information in ReviewBoard Database

2016-07-05 Thread john levin
Could someone pls reply.

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
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/d/optout.


diff content information in ReviewBoard Database

2016-07-05 Thread john levin
Hi,

May i know where to get the diff content info (in which table)or anyother 
information to validate with the incoming diff to SVN (may be crc value 
like stuff).
I have done validations for the list of files belongs to particular id. but 
we need more restrictions like the file contents/diff check.

Thanks.
John

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
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/d/optout.