view tests/notcapable @ 14151:1fe82c93b8e2

convert: also catch missing revlogs when introduced in repo roots The previous behaviour was almost as if convert.hg.ignoreerrors was always set for revisions without parents, except that errors were silently ignored. Revlog errors are handled as a side effect of getcopies(), but getcopies() was only called when convert.hg.ignoreerrors was set. Now we always call self.getcopies for root revisions, not only when convert.hg.ignoreerrors is set, just like we do on all other revisions. The extra call might be a bit expensive, but the proper fix for that would be to catch these errors in another way.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 01 May 2011 17:34:16 +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