Show More
@@ -1,19 +1,19 b'' | |||||
1 | # Disable the $CAP wire protocol capability. |
|
1 | # Disable the $CAP wire protocol capability. | |
2 |
|
2 | |||
3 | if test -z "$CAP" |
|
3 | if test -z "$CAP" | |
4 | then |
|
4 | then | |
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, repo |
|
9 | from mercurial import extensions, repo | |
10 | def extsetup(): |
|
10 | def extsetup(): | |
11 | extensions.wrapfunction(repo.repository, 'capable', wrapper) |
|
11 | extensions.wrapfunction(repo.repository, 'capable', wrapper) | |
12 | def wrapper(orig, self, name, *args, **kwargs): |
|
12 | def wrapper(orig, self, name, *args, **kwargs): | |
13 |
if name |
|
13 | if name in '$CAP'.split(' '): | |
14 | return False |
|
14 | return False | |
15 | return orig(self, name, *args, **kwargs) |
|
15 | return orig(self, name, *args, **kwargs) | |
16 | EOF |
|
16 | EOF | |
17 |
|
17 | |||
18 | echo '[extensions]' >> $HGRCPATH |
|
18 | echo '[extensions]' >> $HGRCPATH | |
19 | echo "notcapable-$CAP = `pwd`/notcapable-$CAP.py" >> $HGRCPATH |
|
19 | echo "notcapable-$CAP = `pwd`/notcapable-$CAP.py" >> $HGRCPATH |
General Comments 0
You need to be logged in to leave comments.
Login now