annotate tests/notcapable @ 15800:e4fc0f0b4f7e stable

rebase: reinstate old-style rev spec support for the source and base (issue3181) As of b12362ab13e7 (first released as part of Mercurial 2.0), the rebase command accepted ONLY revsets for the source and base arguments and no longer accepted old-style revision specifications. As a result, some revision names were no longer recognised, e.g. hg rebase --base br-anch abort: unknown revision 'br'! These arguments are now interpreted first as old-style revision specifications, then as revsets when no matching revision is found. This restores backwards compatibility with releases prior to 2.0.
author Steven Brown <StevenGBrown@gmail.com>
date Sun, 08 Jan 2012 23:09:35 +0800
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