tests/notcapable
changeset 14011 b69471bdb678
child 14409 9ff996ba00b4
equal deleted inserted replaced
14010:d7b4d421b56c 14011:b69471bdb678
       
     1 # Disable the $CAP wire protocol capability.
       
     2 
       
     3 if test -z "$CAP"
       
     4 then
       
     5     echo "CAP environment variable not set."
       
     6 fi
       
     7 
       
     8 cat > notcapable-$CAP.py << EOF
       
     9 from mercurial import extensions, repo
       
    10 def extsetup():
       
    11     extensions.wrapfunction(repo.repository, 'capable', wrapper)
       
    12 def wrapper(orig, self, name, *args, **kwargs):
       
    13     if name == '$CAP':
       
    14         return False
       
    15     return orig(self, name, *args, **kwargs)
       
    16 EOF
       
    17 
       
    18 echo '[extensions]' >> $HGRCPATH
       
    19 echo "notcapable-$CAP = `pwd`/notcapable-$CAP.py" >> $HGRCPATH