Visual Studio *.rc source files are considered as binary files in Gerrit

270 views
Skip to first unread message

Jeyanthan I

unread,
Sep 23, 2015, 5:39:49 AM9/23/15
to Repo and Gerrit Discussion
I see that Gerrit 2.10 recognizes Visual Studio *.rc files as binary files and not as text files. This prevents the developers from viewing a diff on those file changes. Attached is the image of the same.

As per the documentation - https://gerrit-review.googlesource.com/Documentation/config-project-config.html#mimetype-section, I tried adding the below line in project.config under refs/meta/config in All-Projects.git to force the web code reviewer to return as text file.

 [mimetype "text/plain"] 
path = *.rc

I have also added the below lines in gerrit.config to make sure it was recognised and did a gerrit restart -- as per https://gerrrit-review.googlesource.com/Documentation/config-gerrit.html#mimetype , but no luck.

[mimetype "text/plain"] 
safe = true

I'm not sure if I have missed something here. Can anyone share your insights on this? Probably, this is a valid bug that's worth reporting.

PS. Though the image shows Gerrit 2.8, I have tested against 2.10 as well.
samplefile.rc
rcmimetype.png

Vineeth Chandran

unread,
Oct 1, 2015, 10:30:44 AM10/1/15
to Repo and Gerrit Discussion
Could anyone please share your views on the below mentioned Gerrit behavior with  Visual studio *.rc files ?

Thanks,
Vineeth 

David Ostrovsky

unread,
Oct 9, 2015, 5:39:52 AM10/9/15
to Repo and Gerrit Discussion

Am Donnerstag, 1. Oktober 2015 16:30:44 UTC+2 schrieb Vineeth Chandran:
Could anyone please share your views on the below mentioned Gerrit behavior with  Visual studio *.rc files ?

This is a known issue.

Jeyanthan I

unread,
Oct 14, 2015, 11:52:31 AM10/14/15
to Repo and Gerrit Discussion
Thanks, David. 
For those who follow this thread, we have a workaround in place -  Add the below line at the beginning of every .rc file, so that it is recognised as a text file and diff is shown.

set #pragma code_page(65001)
Reply all
Reply to author
Forward
0 new messages