auto-properties

Toby Johnson toby at etjohnson.us
Tue Jan 23 09:27:55 CST 2007


Dirk wrote:
>
>>> * where to integrate?
>>>   * Dumpfile::_add_handler
>>>   * Node::Set_initial_properties
>>
>> Auto-props are only used by Subversion when a file is first added, so 
>> I think Dumpfile::_add_handler() makes sense.
>
> I thought about this a little further. As far as I understand, 
> auto_props only work on the filename. So the _add_handler is the 
> correct place. If we also want to filter/check the content of the 
> file, then we must find a good place in Node.pm. I would also suggest 
> to start with the _add_handler and its derivates like share without a 
> source, restore, recover and so on.

What sort of content inspection are you thinking of? We are already 
setting the mime-type to application/octet-stream if VSS considers the 
file "binary".

>
>
>>
>> Thanks, it's a good start. :) I can probably knock this out when I 
>> get some free time.
>
> The main problem for me is, that it takes me hours to write a simple 
> line in PERL. Opposed to what is written in all its documentation, 
> perl is not an easy language. It might be powerful, but not easy to 
> read and to code.
> Perhaps I will play a little further. I just need to have an idea, how 
> to evaluate the auto-props-pattern from the hash against the filename.

I won't disagree with that. Even when you understand the syntax it still 
takes a lot of use before your start "thinking in Perl". I chose it for 
its cross-platform ubiquity and string manipulation capabilities, but as 
I've said I would probably go with C# if I had it to do over again, now 
that Mono is very well established on Linux.

toby



More information about the vss2svn-users mailing list