2878: SVN diff patch fails if file has diff around svn keyword
- SetupIssue
- Review Board
| sudhir.********@gmai***** (Google Code) (Is this you? Claim this profile.) | |
| Jan. 30, 2013 |
What version are you running?
ReviewBoard 1.7.2
What's the URL of the page containing the problem?
Bug in Review Board 1.7.2 - diff around svn keyword fails
While it was claimed to be fixed in RB 1.6.13 release, the fix has been reverted in RB release 1.7.1/1.7.2
http://www.reviewboard.org/docs/releasenotes/dev/reviewboard/1.6.13/
What steps will reproduce the problem?
1.
/* Test skip svn:keyword in diff/patch
$Id: hello_world.c 308304 2012-01-14 01:50:25Z sudhirbs $
*/
#include<stdio.h>
int main()
{
printf("Hello World\n");
return 0;
}
svn diff
Index: hello_world.c
===================================================================
--- hello_world.c (revision 310813)
+++ hello_world.c (working copy)
@@ -1,4 +1,4 @@
-/* Test skip svn:keyword in diff/patch
+/* Test skip svn:keyword in diff/patch
$Id$
*/
#include<stdio.h>
Diff currently unavailable.
Error: The patch to '/users/sudhirbs/scratch/hello_world.c' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.RPPmEK' for debugging purposes. `patch` returned: patching file /tmp/reviewboard.RPPmEK/tmpA0vOlm Hunk #1 FAILED at 1. 1 out of 1 hunk FAILED -- saving rejects to file /tmp/reviewboard.RPPmEK/tmpA0vOlm-new.rej
What is the expected output? What do you see instead?
Patch shouldn't have failed.
What operating system are you using? What browser?
RHEL, Firefox
Please provide any additional information below.
Hi Sudhir, We have unit tests that should cover this exact case, and I tried your example and it works. We can only expand keywords if you have those keywords set to expand by listing them in svn:keywords. In your case, is that actually listed?
-
+ NeedInfo
Hi Christian, I think below is what you are asking. Yes it is listed. $ svn propget svn:keywords hello_world.c id FYI, I don't see below code change in RB 1.7.1/1.7.2 . I think this change was in RB Beta release. http://reviews.reviewboard.org/r/2441/ Regards Sudhir
The code for handling keywords in diffs is the same between 1.6.13 and 1.7.x, and none of our unit tests have broken. I also reproed your exact case, except with the propset entry being "Id" and not "id". Perhaps that makes a difference. But otherwise, it does work as expected as far as I can tell. Can you try with "Id" just to see?
According to the SVN documentation, svn:keywords is intended now to be case-sensitive, though for now, some ("Id" being one) is treated as case-insensitive, but that may not be the case in the future. That means in your setup, "id" is not technically valid, even though svn works with it. It needs to be "Id".
Agreed. Thanks for looking into this.