monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] [PATCH] and RFC: binary files merging and hook


From: Nathaniel Smith
Subject: Re: [Monotone-devel] [PATCH] and RFC: binary files merging and hook
Date: Fri, 27 May 2005 20:13:25 -0700
User-agent: Mutt/1.5.9i

On Fri, May 27, 2005 at 09:44:23PM +0200, rghetta wrote:
> Ok, I'll try to summarize the requests (and possible answers) so far:
> 
> Both Nathaniel Smith and Emile Snyder advocated the use of .mt-attrs,
> perhaps coupled with the attr_init hook to automagically mark the files
> at "add" time.
> Howewer, the attr_init hooks receive only the filename, while the hook
> needs also the file content to guess the file type if the name doesn't
> matches.

But, the file is sitting right there on the filesystem, and the hook
can run arbitrary code.  For instance, it could peek at the file to
see whether it looks like it's binary.

> IMHO, the guessing part is a necessity, requiring the user to manually
> specify every binary file seem too harsh to me, especially because every
> project has its share of non mergeable files, even monotone ;-)

Agreed.

> The hook is here just to handle the corner cases (like file specific
> merging tools), but I think monotone should make the "right" choice
> automatically.
> Attributes seems also just not available at merge time.
> Both of these issues need to be resolved before using attributes to
> decide on merging.  Is a rewrite of the attribute system needed ?

What would this rewrite do?  (It's entirely possible we do need one,
the .mt-attr concept doesn't seem fully developed yet to me, but I
don't see what you're getting at here.)

At merge time we know the file names, and we know what revision they
come from; in principle there is no reason we can't grab the .mt-attrs
file from that revision and see what it says.

-- Nathaniel

-- 
The Universe may  /  Be as large as they say
But it wouldn't be missed  /  If it didn't exist.
  -- Piet Hein




reply via email to

[Prev in Thread] Current Thread [Next in Thread]