Re: Problem accessing the annotations on svn.php.net.
| From: | Richard Quadling | Date: | Fri, 05 Nov 2010 14:14:17 +0000 |
| Subject: | Re: Problem accessing the annotations on svn.php.net. | ||
| References: | 1 2 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-9190@lists.php.net to get a copy of this message | ||
On 4 November 2010 21:35, Hannes Magnusson <hannes.magnusson@gmail.com> wrote:
> On Thu, Nov 4, 2010 at 13:43, Richard Quadling <rquadling@gmail.com> wrote:
>> Hi.
>>
>>
>> http://svn.php.net/viewvc/phpdoc/en/trunk/reference/errorfunc/functions/error-get-last.xml?annotate=305079&sortby=rev&pathrev=305079
>>
>> In fact, any annotations view on the phpdoc tree (as far as I can
>> tell) always results in the same error ...
>>
>> "Unable to calculate annotation data on binary file contents."
>>
>> I've checked a few files, using [^a-z<>
>> \d./_="&;.?!$:,'\r\n\-()|[\]\\~]++ across phpdoc/en's xml files -
>> nothing.
>>
>> So it looks like viewvc is treating XML files as binary.
>
>
> With the initial svn conversion all xml files were marked as binary files.
> I do believe that this has been fixed now across the line, but viewvc
> may not be able to show the data because "at one point" they were
> binary..
> I don't know though, there could be an viewvc configuration option or
> something...
>
> -Hannes
>
Aha! Yes. I see now.
http://svn.php.net/viewvc/phpdoc/en/trunk/install/windows/commandline.xml?view=annotate
was something I created in SVN about 16 months ago. And annotations
work.
But it seems that the mime-type:application/xml messed things up.
In reading around [1] says that there is a runtime setting that allows
SVN to have a map for mime types ...
"Beginning in Subversion 1.5, users can configure a new
mime-types-file runtime configuration parameter, which identifies the
location of a MIME types mapping file. Subversion will consult this
mapping file to determine the MIME type of newly added and imported
files."
So, if mapping .xml to text/xml, would that be enough?
But, there also looks like I could use svnadmin setrevprop [2].
I don't know enough to test this though.
If it requires setting it on all revisions, then I can certainly
script it. One thing that is worth knowing is ...
"NOTE: Revision properties are not versioned, so this command will
overwrite the previous value of the property." (from the command line
help svnadmin help setrevprop).
So. I need to be able to run ...
echo text/xml > /temp/svnmimetype.txt
svnadmin setrevprop /usr/repos -r xxx svn:mime-type /temp/svnmimetype.txt
where xxx is the revision number for the first instance of each file
where the svn:mime-type is set to application/xml
e.g.
echo text/xml > /temp/svnmimetype.txt
svnadmin setrevprop /usr/repos -r 160493 svn:mime-type /temp/svnmimetype.txt
Sounds easy enough! (Though I don't know how to copy to a file from
the command line in unix. echo content > file.txt in windows).
Ish!
Is this worth it? It would remove the mime type properly and allow the
annotations to work again.
Richard.
[1] http://svnbook.red-bean.com/en/1.5/svn.advanced.props.file-portability.html#svn.advanced.props.special.mime-type
[2] http://svnbook.red-bean.com/en/1.5/svn.ref.svnadmin.c.setrevprop.html
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY