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

Martin Geisler mg at aragost.com
Fri Feb 24 05:04:35 CST 2012


Greg Ward <greg at gerg.ca> writes:

> 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.

Yes, we should have such a script there. Btw, why do you turn off
buffering in your script?

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://www.aragost.com/mercurial/customer-projects/


More information about the Mercurial-devel mailing list