[PATCH 1 of 3 STABLE] largefiles: use repo.store.createmode for new files in .hg/largefiles

Greg Ward greg at gerg.ca
Fri Feb 24 03:06:00 UTC 2012


On 23 February 2012, Martin Geisler said:
> # HG changeset patch
> # User Martin Geisler <mg at aragost.com>
> # Date 1329999775 -3600
> # Branch stable
> # Node ID 05197f9fd1f3af0a978cee924d3223867e0ade1f
> # Parent  616c2e278f18984dc48b80bc56b55da626130709
> largefiles: use repo.store.createmode for new files in .hg/largefiles
[...]
> +Portable way to print file permissions:
> +
> +  $ cd ..
> +  $ cat > ls-l.py <<EOF
> +  > #!/usr/bin/env python
> +  > import sys, os
> +  > path = sys.argv[1]
> +  > print '%03o' % (os.lstat(path).st_mode & 0777)
> +  > EOF
> +  $ chmod +x ls-l.py

The bfiles test suite contains a standalone version of that script:

  http://hg.gerg.ca/hg-bfiles/file/default/tests/lsmode.py

I guess that got lost on the way to largefiles. ;-( Seems like handy
thing to have in Mercurial's own tests/ directory.

        Greg
-- 
Greg Ward                                http://www.gerg.ca/
Why is it that when you DIE, you can't take your
HOME ENTERTAINMENT CENTER with you??



More information about the Mercurial-devel mailing list