On Sun, Oct 23, 2005 at 04:18:19PM -0700, Nathaniel Smith wrote:
> As a side note, there's a simple trick you can use for this sort of
> thing, in lack of anything better ATM...:
> default_ignore_file = ignore_file
I tried applying this to the binary_file hook, to deal with the
example I had in mind when I posed the original question about
appending to internal hooks without copying the default
default_binary_file = binary_file
if (string.find(name, "%-confg$")) then return false end
These files are Cisco router/switch configs. They're text, but they
contain some ^C characters, such as used for banner delimiters, so the
guess routine evidently decides they're binary.
No joy. Nothing I could do would make the hook match the files as
text. After some fussing around trying to figure out what kinds of lua
newbie syntax errors I had made, I eventually wound up with:
(and no function renaming trick).
monotone --debug says the lua file is being loaded, and I get lua
errors from loading it when I introduce syntax errors, but it seems
the hook isn't being called - no matter what I do, I still get
monotone diff telling me that some of the files are binary. The files
aren't listed with any special attributes in .mt-attrs.
I've been working around this for quite some time using external diff,
which happily shows me the diffs. I thought the tip given above would
be a better solution.
A more careful examination of TFM reveals that although a default
implementation of binary_file() is given, there's no documentation of
the hook itself -- suggesting that in fact it isn't likely to be
On Tue, 2005-10-25 at 14:57 +1000, Daniel Carosone wrote:
> A more careful examination of TFM reveals that although a default
> implementation of binary_file() is given, there's no documentation of
> the hook itself -- suggesting that in fact it isn't likely to be
The binary_file hook is called to set the manual_merge attribute when you
add a file.
> So, how do I tell monotone these files are text?
Currently, the manual_merge attribute is used only for merges.
Not using it also for diffs was a mistake, I guess.