[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

TSVN: unexpected behavior creating patch from file with svn:mime-type set to application/javascript

From: <webpost_at_tigris.org>
Date: Wed, 1 Apr 2009 05:59:50 -0700 (PDT)

Hi TortoiseSVN team,

First of all, congratulations of this great project which eases version control so much! I understand the power of command-line utilities (svn*), but having visual feedback and shell integration is *very* nice, specially for occasional and/or users used to IDE environments. ;-)

TortoiseSVN seems to fail in creating a patch if the MIME type is set (apparently, to application/*). This set of MIME types generally designates binary files, although it's also used for some textual content also.

Steps to reproduce:
1. Checkout a project containing files with "svn:mime-type" set to "application/javascript" (for example, xmlhttprequest [1]);
2. Make local modification(s);
3. Use TortoiseSVN context menu "Create patch..." to create a patch containing the modification.

Expected result:
Patch file containing the modifications made.

Actual result:
Patch file containing an error message similar to:
 Cannot display: file marked as a binary type.
 svn:mime-type = application/javascript

Workaround:
1. Copy the file containing the modification(s);
2. Revert local modification(s);
3. Create a patch between the file in control version and the copy containing the local changes.

This is probably unfeasible for a set of modified files, and has the caveat of not containing revision information (date is used instead), but may be of use for anyone experiencing similar behavior.

Version details:
TortoiseSVN 1.6.0, Build 15855 - 32 Bit , 2009/03/21 12:36:36

Attachment:
File containing a sample result:
 TortoiseSVN-ErrorWhileGeneratingPatchWithApplicationJavascriptMimeType-Result.patch

Additional information:
There seem to be a few somehow related messages [2] in the mailing list, but I wasn't able to find any tightly related.

By taking a look at a tightly related specification [3], it seems that some particular application/* MIME types should be supported (at least, the ones in the specification, "application/javascript" and "application/ecmascript"). This is specially relevant as the currently used MIME types (text/*) for JavaScript/ECMAScript files are deprecated and should slowly fade out with time. The proposal, if TortoiseSVN does handle application/* MIME types as designating binary files, is to add a list of exceptions to handle as text.

Hope this helps,
 Helder Magalhães

[1] http://xmlhttprequest.googlecode.com/svn/trunk
[2] http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=94405
[3] http://www.ietf.org/rfc/rfc4329.txt

Received on 2009-04-01 15:09:01 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.