view tests/notcapable @ 14333:31a5973fcf96

revlog: get rid of defversion defversion was a property (later option) on the store opener, used to propagate the changelog revlog format to the other revlogs, so they would be created with the same format. This required that the changelog instance was created before any other revlog; an invariant that wasn't directly enforced (or documented) anywhere. We now use the revlogv1 requirement instead, which is transfered to the store opener options. If this option is missing, v0 revlogs are created.
author Sune Foldager <cryo@cyanite.org>
date Mon, 16 May 2011 12:44:34 +0200
parents b69471bdb678
children 9ff996ba00b4
line wrap: on
line source

# Disable the $CAP wire protocol capability.

if test -z "$CAP"
then
    echo "CAP environment variable not set."
fi

cat > notcapable-$CAP.py << EOF
from mercurial import extensions, repo
def extsetup():
    extensions.wrapfunction(repo.repository, 'capable', wrapper)
def wrapper(orig, self, name, *args, **kwargs):
    if name == '$CAP':
        return False
    return orig(self, name, *args, **kwargs)
EOF

echo '[extensions]' >> $HGRCPATH
echo "notcapable-$CAP = `pwd`/notcapable-$CAP.py" >> $HGRCPATH