Reg: Getting File Type in Hg
Matt Mackall
mpm at selenic.com
Thu Oct 13 15:52:41 UTC 2011
On Thu, 2011-10-13 at 14:02 +0200, Mads Kiilerich wrote:
> On 10/13/2011 01:55 PM, Petchimuthu wrote:
> > Hi,
> >
> > I want to know the whether the committed the file type is binary or not
> >
> > How can I check the file type in mercurial?
>
> Mercurial commit all files as binary.
>
> Only in a few cases (mostly when showing diffs or choosing merge tools)
> it looks at the file content to see if it is a text file. It do that by
> looking for bytes with the value 0.
Right - internally Mercurial treats all files the same (or 'as binary').
But if you're curious about which files Mercurial thinks are binary for
diff and merge purposes, you can do:
hg locate "set:binary()"
with Mercurial 1.9.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list