tests/notcapable
changeset 41068 28a4fb793ba1
parent 33806 dedab036215d
child 41314 15fd3069caa6
equal deleted inserted replaced
41067:f2601cbce209 41068:28a4fb793ba1
     5     echo "CAP environment variable not set."
     5     echo "CAP environment variable not set."
     6 fi
     6 fi
     7 
     7 
     8 cat > notcapable-$CAP.py << EOF
     8 cat > notcapable-$CAP.py << EOF
     9 from mercurial import extensions, localrepo, repository
     9 from mercurial import extensions, localrepo, repository
    10 def extsetup():
    10 def extsetup(ui):
    11     extensions.wrapfunction(repository.peer, 'capable', wrapcapable)
    11     extensions.wrapfunction(repository.peer, 'capable', wrapcapable)
    12     extensions.wrapfunction(localrepo.localrepository, 'peer', wrappeer)
    12     extensions.wrapfunction(localrepo.localrepository, 'peer', wrappeer)
    13 def wrapcapable(orig, self, name, *args, **kwargs):
    13 def wrapcapable(orig, self, name, *args, **kwargs):
    14     if name in '$CAP'.split(' '):
    14     if name in '$CAP'.split(' '):
    15         return False
    15         return False