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

[PATCH] Fix mime-type notification in commits

From: <cmpilato_at_collab.net>
Date: 2003-04-03 01:27:50 CEST

I don't have time or proper state to test this change, but I suspect
it can be committed as-is, since the only effective difference is that
XPMs and XBMs will no long show up as binary. As such, I don't think
this will affect the test suite at all (unless we use XPM and XBM
mime-types somewhere in there).

If someone would be so kind as to apply and test, that'd rock. I'll
let our wonderful patch manager handle it.

---
* subversion/clients/cmdline/feedback.c
  (notify): Use an existing API function for determining the
    binary-ness of a mime-type instead of doing the work (incorrectly)
    ourselves for the 'commit_added' case.
Index: subversion/clients/cmdline/feedback.c
===================================================================
--- subversion/clients/cmdline/feedback.c	(revision 5521)
+++ subversion/clients/cmdline/feedback.c	(working copy)
@@ -204,9 +204,7 @@
       break;
 
     case svn_wc_notify_commit_added:
-      if (mime_type
-          && ((strlen (mime_type)) > 5)
-          && ((strncmp (mime_type, "text/", 5)) != 0))
+      if (mime_type && svn_mime_type_is_binary (mime_type))
         printf ("Adding  (bin)  %s\n", path_native);
       else
         printf ("Adding         %s\n", path_native);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 3 01:31:32 2003

This is an archived mail posted to the Subversion Dev mailing list.