comparison tests/notcapable @ 49753:ff7134e03629

peer: have `repo.peer` take an optional `path` argument We are ready to start to actually set the value now.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 03 Dec 2022 00:16:07 +0100
parents 268662aac075
children 3a2df812e1c7
comparison
equal deleted inserted replaced
49752:611ccb631cbc 49753:ff7134e03629
13 extensions.wrapfunction(localrepo.localrepository, 'peer', wrappeer) 13 extensions.wrapfunction(localrepo.localrepository, 'peer', wrappeer)
14 def wrapcapable(orig, self, name, *args, **kwargs): 14 def wrapcapable(orig, self, name, *args, **kwargs):
15 if name in b'$CAP'.split(b' '): 15 if name in b'$CAP'.split(b' '):
16 return False 16 return False
17 return orig(self, name, *args, **kwargs) 17 return orig(self, name, *args, **kwargs)
18 def wrappeer(orig, self): 18 def wrappeer(orig, self, path=None):
19 # Since we're disabling some newer features, we need to make sure local 19 # Since we're disabling some newer features, we need to make sure local
20 # repos add in the legacy features again. 20 # repos add in the legacy features again.
21 return localrepo.locallegacypeer(self) 21 return localrepo.locallegacypeer(self, path=path)
22 EOF 22 EOF
23 23
24 echo '[extensions]' >> $HGRCPATH 24 echo '[extensions]' >> $HGRCPATH
25 echo "notcapable-$CAP = `pwd`/notcapable-$CAP.py" >> $HGRCPATH 25 echo "notcapable-$CAP = `pwd`/notcapable-$CAP.py" >> $HGRCPATH