filemerge: A feature request

Steve Borho steve at borho.org
Wed Feb 6 05:20:28 UTC 2008


On Wed, 2008-02-06 at 08:25 +0530, dhruva wrote:
> Hello,
>  Would it make sense to have configuration based on file types? I
> would like to have all binary files to be treated specially. I need
> them to be copied from "other" to "local" blindly with no merge.
> There are a bunch of zip/tar files that I never (almost) modify. At
> times, I might have some older copy for testing purposes in my branch.
> When I do pull from a different branch, I prefer to have my local
> copies over written most of the times.

You could probably do this via match patterns.

[merge-patterns]
**.tar    = internal:local
**.tar.gz = internal:other

To use actual file <mime> types, you would need to write our own merge
shell script that called 'file' or some other tool and parsed the
results, then assign that as your default tool:

[ui]
merge = mysmartmerge.sh

-- 
Steve Borho (steve at borho.org)
http://www.borho.org/~steve/steve.asc
Key fingerprint = 2D08 E7CF B624 624C DE1F  E2E4 B0C2 5292 F2C6 2C8C





More information about the Mercurial-devel mailing list