views:

236

answers:

1

I'm using NetBeans 6.5 and I have some javascript files that it claims are binary files and won't display annotations. svn propedit shows that the svn:mime-type is text/javascript and to display the annotations on the command line I have to run "svn annotate --force file.js".

+1  A: 

from http://subversion.tigris.org/svn_1.4_releasenotes.html:

svn blame --force Displays the output of blame, even if the file is binary.

It looks like this is not a NetBeans-specific problem, but something related to how svn handles Your .js files. It would be good to add a proper tag to this question.

from http://subversion.tigris.org/faq.html#binary-files:

Subversion just looks at the first 1024 bytes of the file; if any of the bytes are zero, or if more than 15% are not ASCII printing characters, then Subversion calls the file binary. (...) Subversion treats the following files as text: (...) Files with a svn:mime-type starting "text/"

If Your javascript file contains binary data, You might consider moving it to the end of the file.

There is a chance that the property is set to " text/javascript" or something that looks like text/javascript to human, but not to the svn.

There is a chance that the file used to be binary, but it's not anymore, however You have updated Your repository while not having write access to .svn/ directory (and svn still 'thinks' the file is binary).

There is a chance You have changed the property to the right one, but have not commited it yet.

Finally, the most powerfull solution to svn problems I have ever encountered was to copy the file, delete it the from svn, commit, add the file back (from the copy) and commit. Beware: You loose change history by doing so.

I wish You good luck on finding out what has caused this problem!

Reef