|
From: | rghetta |
Subject: | Re: [Monotone-devel] Re: Bug in CRLF conversions |
Date: | Thu, 02 Feb 2006 21:22:06 +0100 |
User-agent: | Mozilla Thunderbird 1.0.7-4mdk (X11/20051221) |
Richard Levitte - VMS Whacker wrote:
To me, this is somewhat a side issue, while having some way to map a set of properties to a file is the real problem. Imho, to cover every situation you must use file attributes. Only with these you can reliably handle platform differences. I see this somewhat like the 'executable' attribute, having a different effect on different platform. Ok, trying to execute a bash script on windows isn't likely to give you anything useful, but you get the idea.The inspiration for .mt-autoprops comes from SVN, where such things can be configured. They do it by extension, but I'm not sure we really should do it that way... I've always been impressed by the simple magic of the Unix command 'file', but doing something like that is maybe a bit much to ask... Ideas?
I think we should have some hook to auto-define attributes, but also a way to manually override the default mapping (much like the manual-merge attribute, as you point out). Since the correct way to identify a file type is platform specific, perhaps the hook should be platform specific, too. Should monotone invoke the hook at add time, or as necessary if the relevant attribute wasn't manually specified ? The .mt-autoprops could be an useful way to specify default mappings, but no more, imho.
BTW, when discussing about the manual-merge attribute, there was a lenghty discussion about this problem in the context of choosing the best merge tool. Someone (Joel ?) proposed supporting both extensions and file signatures as means to map a file to a merge tool.
Ciao, Riccardo
[Prev in Thread] | Current Thread | [Next in Thread] |