RE: Determining which files are treated as binary
From: Leeuw van der, Tim <tim.leeuwvander_at_nl.unisys.com>
Date: 2005-06-01 11:47:03 CEST
Hi Thomas,
Please keep me informed of the progress of your script, I'd love to use it.
I think that you can look at the svn properties of the file; it seems to me that if it's added binary it gets an svn:mime-type property 'application/octet-stream'.
However, if the user already sets the svn:mime-type property, or if autoprops sets it, then you can no longer test for svn:mime-type == 'application/octet-stream'. You'd have to check for svn:mime-type to be either absent (means text), or start with 'text/', or be another value that you know to be text... Then you can deduct it's a binary when it doesn't meet the criteria for being text.
cheers,
--Tim
-----Original Message-----
Hi,
I'm trying to create a post-commit hook to set the svn:needs-lock
But, I'm having trouble determining which files are treated as binary
What have I missed?
TIA,
Greg
-- This post represents the views of the author and does not necessarily accurately represent the views of BT. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org For additional commands, e-mail: users-help@subversion.tigris.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org For additional commands, e-mail: users-help@subversion.tigris.orgReceived on Wed Jun 1 11:49:05 2005 |
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.