On Thu, 2 Jun 2005 10:16:05 -0400, Dominic Anello <firstname.lastname@example.org>
>On 2005-06-02 09:11:51 +0100, Greg Thomas wrote:
>> On Wed, 01 Jun 2005 14:31:08 -0400, Christopher Ness
>> <email@example.com> wrote:
>> >On Wed, 2005-06-01 at 09:25 +0100, Greg Thomas wrote:
>> >> I'm trying to create a post-commit hook to set the svn:needs-lock
>> >> property on binary files - which should be simple enough.
>Properties *are* version-controlled. Revision properties aren't, but
>svn:mime-type isn't a rev prop.
Oops. It's a fair cop. I'm still struggling to get my head around what
a rev prop is, tbh.
> Furthermore, if you look at the help
>for svn propset, you'll see that ps without the --revprop flag only
>accepts PATHs as an argument, so you have to check out a working copy.
>Not to say it can't be done, but your hook script will both create
>additional revisions and need to manage working copies.
Well, it's certainly doable, it just adds an extra level of
complexity. As it's only an extra revision for every commit that
adds/updates a binary file that doesn't have the svn:needs-lock
property, it's not like it's going to fill up the repository with
small commits. Besides, it's not like I'm going to run out of revision
>IIRC, everything without a text/* mime-type will get treated as binary
>so just look for non-text mime-types:
Well, that's /nearly/ what the help for svn propset says - files
without a mime type are also treated as text (which I'd not noticed
before), though the example you gave will work fine. But given the
complexity of the post-commit script, I think I'll need something like
1. Check all committed files for binary-ness (sic) without svn:needs-lock
2. If some found, checkout the highest directory with an affected file
3. update binary files
4. Commit changes
Yuck. Wonder how long before svn propset works on a URL?
http://svn.haxx.se/users/archive-2003-09/0715.shtml says 30 minutes,
but that was nearly two years ago ;-)
This post represents the views of the author and does
not necessarily accurately represent the views of BT.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Thu Jun 2 17:30:57 2005