tests/test-execute-bit
author Greg Ward <greg-hg@gerg.ca>
Tue, 15 Jun 2010 13:04:22 -0400
changeset 11402 367ce8514da0
parent 6158 23ffe82615d8
permissions -rwxr-xr-x
extensions: recommend against using wrapfunction for repo methods Instead, all extensions should use the "dynamic subclass" trick: subclass repo.__class__ and then replace repo.__class__ with your new subclass. This avoids conflicts that happen when one extension uses wrapfunction and another uses subclassing to extend the same method of localrepository.

#!/bin/sh

"$TESTDIR/hghave" execbit || exit 80

hg init
echo a > a
hg ci -Am'not executable'

chmod +x a
hg ci -m'executable'
hg id

echo '% make sure we notice the change of mode if the cached size == -1'
hg rm a
hg revert -r 0 a
hg debugstate
hg st

hg up 0
hg id
test -x a && echo executable -- eek || echo not executable -- whew