dirstate and file mode

Wujek Srujek wujek.srujek at googlemail.com
Sun Apr 8 16:35:14 UTC 2012


Thanks, so it is the type after all. And thanks for telling me where to
look for it in the future.

wujek

On Sun, Apr 8, 2012 at 5:56 PM, Matt Mackall <mpm at selenic.com> wrote:

> On Sun, 2012-04-08 at 17:46 +0200, Wujek Srujek wrote:
> > Hi. I am playing around with python and the mercurial files to learn a
> > little bit about how things work in mercurial. One thing that I notice is
> > that I get modes of a files in .hg/dirstate in the notation '0100664' -
> > what does the initial 010 stand for (I am assuming the final 0664 are
> just
> > the usual unix permissions, with the first octet being
> > setid/setgid/sticky)? Is this some numeric definition of a type (normal,
> > link, pipe, ...)? I can't find an answer in google easily, maybe this is
> > something related to mercurial?
>
> From the stat(2) manpage:
>
>       The following flags are defined for the st_mode field:
>
>           S_IFMT     0170000   bit mask for the file type bit fields
>           S_IFSOCK   0140000   socket
>           S_IFLNK    0120000   symbolic link
>           S_IFREG    0100000   regular file
>           S_IFBLK    0060000   block device
>           S_IFDIR    0040000   directory
>           S_IFCHR    0020000   character device
>           S_IFIFO    0010000   FIFO
>           S_ISUID    0004000   set UID bit
> ...
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20120408/17f0ba98/attachment-0002.html>


More information about the Mercurial mailing list