annotate tests/notcapable @ 14732:e9ed3506f066 stable

backout of d04ba50e104d: allow to qpop/push with a dirty working copy The new behavior was breaking existing tools that relied on a sequence such as this: 1) start with a dirty working copy 2) qimport some patch 3) try to qpush it 4) old behavior would fail at this point due to outstanding changes. (new behavior would only fail if the outstanding changes and the patches changes intersect) 5) innocent user qrefreshes, gets his local changes in the imported patch It's worth considering if we can move this behavior to -f in the future.
author Idan Kamara <idankk86@gmail.com>
date Fri, 24 Jun 2011 23:25:42 +0300
parents 9ff996ba00b4
children 1ac628cd7113
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14011
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
1 # Disable the $CAP wire protocol capability.
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
2
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
3 if test -z "$CAP"
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
4 then
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
5 echo "CAP environment variable not set."
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
6 fi
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
7
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
8 cat > notcapable-$CAP.py << EOF
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
9 from mercurial import extensions, repo
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
10 def extsetup():
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
11 extensions.wrapfunction(repo.repository, 'capable', wrapper)
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
12 def wrapper(orig, self, name, *args, **kwargs):
14409
9ff996ba00b4 tests: support multiple caps in notcapable
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14011
diff changeset
13 if name in '$CAP'.split(' '):
14011
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
14 return False
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
15 return orig(self, name, *args, **kwargs)
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
16 EOF
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
17
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
18 echo '[extensions]' >> $HGRCPATH
b69471bdb678 tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
diff changeset
19 echo "notcapable-$CAP = `pwd`/notcapable-$CAP.py" >> $HGRCPATH