Re: Issue 3198 in reviewboard: Downloaded patch files contain hash values that don't match content

2015-11-07 Thread reviewboard


Comment #1 on issue 3198 by prog...@gmail.com: Downloaded patch files  
contain hash values that don't match content

https://code.google.com/p/reviewboard/issues/detail?id=3198

Probably a duplicate of Issue 2916

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.


Issue 3198 in reviewboard: Downloaded patch files contain hash values that don't match content

2014-01-17 Thread reviewboard

Status: New
Owner: 
Labels: Type-Defect Priority-Medium

New issue 3198 by cea...@gmail.com: Downloaded patch files contain hash  
values that don't match content

http://code.google.com/p/reviewboard/issues/detail?id=3198

What version are you running?
Review Board 1.7.13, RBTools 0.5.2

What's the URL of the page containing the problem?
The issue exists in downloaded patch files.

What steps will reproduce the problem?
1. In a Git repository, make a change to a file using CRLF line-endings.
2. Commit the change to your local repository.
3. Use post-review to post a review request for the change.
4. In review board, download the patch.

What is the expected output? What do you see instead?
It is expected that the hash values for changes in patch files match the  
hash values of the content represented. Because the line endings in the  
patch file are all LF line endings, the patch content hash does not match  
when a file is committed with CRLF line endings.


What operating system are you using? What browser?
Windows clients running Cygwin and using the Cygwin version of Git.

Please provide any additional information below.
I have written a Git commit hook to authorize push requests by verifying  
that the commits have been approved in Review Board. It expects to be  
called by the update hook as follows:


#!/bin/bash
python /usr/local/bin/verify-code-review.py $3 > ~/commit-test.txt
exit $?

I have attached the code for this, but the key problem is that the computed  
hashes in the code being committed, which is code applied by a developer  
downloading the patch from Review Board, applying it to a local Git branch  
and then pushing the changes to the central Git repository needs to have  
matching hash values for each file. This was the only way I could be sure  
that the patch that was approved in Review Board matches the patch being  
committed. So far, the only issue we have run into in the newlines not  
matching, unless LF newlines are used.


We have considered using Git settings to force LF newlines to be used for  
committed code, but there may come a time when a particular file requires  
CRLF line endings and then we would have a problem.


Attachments:
verify-code-review.py  2.3 KB

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/groups/opt_out.