Show More
@@ -9,6 +9,13 b'' | |||||
9 | # The mercurial source repository was typically orignally cloned with the |
|
9 | # The mercurial source repository was typically orignally cloned with the | |
10 | # system mercurial installation, and may require extensions or settings from |
|
10 | # system mercurial installation, and may require extensions or settings from | |
11 | # the system installation. |
|
11 | # the system installation. | |
|
12 | ||||
|
13 | if [ -n $HGTESTEXTRAEXTENSIONS ]; then | |||
|
14 | for extension in $HGTESTEXTRAEXTENSIONS; do | |||
|
15 | extraoptions="$extraoptions --config extensions.$extension=!" | |||
|
16 | done | |||
|
17 | fi | |||
|
18 | ||||
12 | syshg () { |
|
19 | syshg () { | |
13 | ( |
|
20 | ( | |
14 | syshgenv |
|
21 | syshgenv | |
@@ -48,6 +55,6 b' if [ -n "`hg id -R "$TESTDIR/.." 2>&1 >/' | |||||
48 | alias testrepohg=syshg |
|
55 | alias testrepohg=syshg | |
49 | alias testrepohgenv=syshgenv |
|
56 | alias testrepohgenv=syshgenv | |
50 | else |
|
57 | else | |
51 | alias testrepohg=hg |
|
58 | alias testrepohg="hg $extraoptions" | |
52 | alias testrepohgenv=: |
|
59 | alias testrepohgenv=: | |
53 | fi |
|
60 | fi |
@@ -718,6 +718,10 b' def has_xdiff():' | |||||
718 | except (ImportError, AttributeError): |
|
718 | except (ImportError, AttributeError): | |
719 | return False |
|
719 | return False | |
720 |
|
720 | |||
|
721 | @check('extraextensions', 'whether tests are running with extra extensions') | |||
|
722 | def has_extraextensions(): | |||
|
723 | return 'HGTESTEXTRAEXTENSIONS' in os.environ | |||
|
724 | ||||
721 | def getrepofeatures(): |
|
725 | def getrepofeatures(): | |
722 | """Obtain set of repository features in use. |
|
726 | """Obtain set of repository features in use. | |
723 |
|
727 |
@@ -1070,6 +1070,17 b' class Test(unittest.TestCase):' | |||||
1070 | env["HGENCODINGMODE"] = "strict" |
|
1070 | env["HGENCODINGMODE"] = "strict" | |
1071 | env['HGIPV6'] = str(int(self._useipv6)) |
|
1071 | env['HGIPV6'] = str(int(self._useipv6)) | |
1072 |
|
1072 | |||
|
1073 | extraextensions = [] | |||
|
1074 | for opt in self._extraconfigopts: | |||
|
1075 | section, key = opt.encode('utf-8').split(b'.', 1) | |||
|
1076 | if section != 'extensions': | |||
|
1077 | continue | |||
|
1078 | name = key.split(b'=', 1)[0] | |||
|
1079 | extraextensions.append(name) | |||
|
1080 | ||||
|
1081 | if extraextensions: | |||
|
1082 | env['HGTESTEXTRAEXTENSIONS'] = b' '.join(extraextensions) | |||
|
1083 | ||||
1073 | # LOCALIP could be ::1 or 127.0.0.1. Useful for tests that require raw |
|
1084 | # LOCALIP could be ::1 or 127.0.0.1. Useful for tests that require raw | |
1074 | # IP addresses. |
|
1085 | # IP addresses. | |
1075 | env['LOCALIP'] = self._localip() |
|
1086 | env['LOCALIP'] = self._localip() |
@@ -1,5 +1,6 b'' | |||||
1 | Create a repository: |
|
1 | Create a repository: | |
2 |
|
2 | |||
|
3 | #if no-extraextensions | |||
3 | $ hg config |
|
4 | $ hg config | |
4 | devel.all-warnings=true |
|
5 | devel.all-warnings=true | |
5 | devel.default-date=0 0 |
|
6 | devel.default-date=0 0 | |
@@ -13,6 +14,8 b' Create a repository:' | |||||
13 | web.address=localhost |
|
14 | web.address=localhost | |
14 | web\.ipv6=(?:True|False) (re) |
|
15 | web\.ipv6=(?:True|False) (re) | |
15 | web.server-header=testing stub value |
|
16 | web.server-header=testing stub value | |
|
17 | #endif | |||
|
18 | ||||
16 | $ hg init t |
|
19 | $ hg init t | |
17 | $ cd t |
|
20 | $ cd t | |
18 |
|
21 |
@@ -1,4 +1,6 b'' | |||||
|
1 | #if no-extraextensions | |||
1 | $ hg debugextensions |
|
2 | $ hg debugextensions | |
|
3 | #endif | |||
2 |
|
4 | |||
3 | $ debugpath=`pwd`/extwithoutinfos.py |
|
5 | $ debugpath=`pwd`/extwithoutinfos.py | |
4 |
|
6 | |||
@@ -19,6 +21,10 b'' | |||||
19 | > ext2 = `pwd`/extwithinfos.py |
|
21 | > ext2 = `pwd`/extwithinfos.py | |
20 | > EOF |
|
22 | > EOF | |
21 |
|
23 | |||
|
24 | $ for extension in $HGTESTEXTRAEXTENSIONS; do | |||
|
25 | > echo "$extension=!" >> $HGRCPATH | |||
|
26 | > done | |||
|
27 | ||||
22 | $ hg debugextensions |
|
28 | $ hg debugextensions | |
23 | ext1 (untested!) |
|
29 | ext1 (untested!) | |
24 | ext2 (3.2.1!) |
|
30 | ext2 (3.2.1!) |
@@ -867,9 +867,11 b' Issue811: Problem loading extensions twi' | |||||
867 | Show extensions: |
|
867 | Show extensions: | |
868 | (note that mq force load strip, also checking it's not loaded twice) |
|
868 | (note that mq force load strip, also checking it's not loaded twice) | |
869 |
|
869 | |||
|
870 | #if no-extraextensions | |||
870 | $ hg debugextensions |
|
871 | $ hg debugextensions | |
871 | mq |
|
872 | mq | |
872 | strip |
|
873 | strip | |
|
874 | #endif | |||
873 |
|
875 | |||
874 | For extensions, which name matches one of its commands, help |
|
876 | For extensions, which name matches one of its commands, help | |
875 | message should ask '-v -e' to get list of built-in aliases |
|
877 | message should ask '-v -e' to get list of built-in aliases |
@@ -289,6 +289,8 b' hide outer repo' | |||||
289 |
|
289 | |||
290 | Testing -h/--help: |
|
290 | Testing -h/--help: | |
291 |
|
291 | |||
|
292 | #if no-extraextensions | |||
|
293 | ||||
292 | $ hg -h |
|
294 | $ hg -h | |
293 | Mercurial Distributed SCM |
|
295 | Mercurial Distributed SCM | |
294 |
|
296 | |||
@@ -372,8 +374,6 b' Testing -h/--help:' | |||||
372 |
|
374 | |||
373 | (use 'hg help -v' to show built-in aliases and global options) |
|
375 | (use 'hg help -v' to show built-in aliases and global options) | |
374 |
|
376 | |||
375 |
|
||||
376 |
|
||||
377 | $ hg --help |
|
377 | $ hg --help | |
378 | Mercurial Distributed SCM |
|
378 | Mercurial Distributed SCM | |
379 |
|
379 | |||
@@ -457,5 +457,7 b' Testing -h/--help:' | |||||
457 |
|
457 | |||
458 | (use 'hg help -v' to show built-in aliases and global options) |
|
458 | (use 'hg help -v' to show built-in aliases and global options) | |
459 |
|
459 | |||
|
460 | #endif | |||
|
461 | ||||
460 | Not tested: --debugger |
|
462 | Not tested: --debugger | |
461 |
|
463 |
@@ -44,6 +44,10 b' Short help:' | |||||
44 | summary summarize working directory state |
|
44 | summary summarize working directory state | |
45 | update update working directory (or switch revisions) |
|
45 | update update working directory (or switch revisions) | |
46 |
|
46 | |||
|
47 | Extra extensions will be printed in help output in a non-reliable order since | |||
|
48 | the extension is unknown. | |||
|
49 | #if no-extraextensions | |||
|
50 | ||||
47 |
$ |
|
51 | $ hg help | |
48 | Mercurial Distributed SCM |
|
52 | Mercurial Distributed SCM | |
49 |
|
53 | |||
@@ -283,6 +287,8 b' Test extension help:' | |||||
283 | win32mbcs allow the use of MBCS paths with problematic encodings |
|
287 | win32mbcs allow the use of MBCS paths with problematic encodings | |
284 | zeroconf discover and advertise repositories on the local network |
|
288 | zeroconf discover and advertise repositories on the local network | |
285 |
|
289 | |||
|
290 | #endif | |||
|
291 | ||||
286 | Verify that deprecated extensions are included if --verbose: |
|
292 | Verify that deprecated extensions are included if --verbose: | |
287 |
|
293 | |||
288 | $ hg -v help extensions | grep children |
|
294 | $ hg -v help extensions | grep children | |
@@ -816,6 +822,8 b' Test command with no help text' | |||||
816 |
|
822 | |||
817 | Test that default list of commands omits extension commands |
|
823 | Test that default list of commands omits extension commands | |
818 |
|
824 | |||
|
825 | #if no-extraextensions | |||
|
826 | ||||
819 | $ hg help |
|
827 | $ hg help | |
820 | Mercurial Distributed SCM |
|
828 | Mercurial Distributed SCM | |
821 |
|
829 | |||
@@ -903,6 +911,7 b' Test that default list of commands omits' | |||||
903 |
|
911 | |||
904 | (use 'hg help -v' to show built-in aliases and global options) |
|
912 | (use 'hg help -v' to show built-in aliases and global options) | |
905 |
|
913 | |||
|
914 | #endif | |||
906 |
|
915 | |||
907 | Test list of internal help commands |
|
916 | Test list of internal help commands | |
908 |
|
917 |
General Comments 0
You need to be logged in to leave comments.
Login now