Show More
@@ -0,0 +1,19 | |||
|
1 | # The test-repo is a live hg repository which may have evolution | |
|
2 | # markers created, e.g. when a ~/.hgrc enabled evolution. | |
|
3 | # | |
|
4 | # Tests are run using a custom HGRCPATH, which do not | |
|
5 | # enable evolution markers by default. | |
|
6 | # | |
|
7 | # If test-repo includes evolution markers, and we do not | |
|
8 | # enable evolution markers, hg will occasionally complain | |
|
9 | # when it notices them, which disrupts tests resulting in | |
|
10 | # sporadic failures. | |
|
11 | # | |
|
12 | # Since we aren't performing any write operations on the | |
|
13 | # test-repo, there's no harm in telling hg that we support | |
|
14 | # evolution markers, which is what the following lines | |
|
15 | # for the hgrc file do: | |
|
16 | cat >> $HGRCPATH << EOF | |
|
17 | [experimental] | |
|
18 | evolution=createmarkers | |
|
19 | EOF |
@@ -1,19 +1,20 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
3 | 4 | $ check_code="$TESTDIR"/../contrib/check-code.py |
|
4 | 5 | $ cd "$TESTDIR"/.. |
|
5 | 6 | |
|
6 | 7 | New errors are not allowed. Warnings are strongly discouraged. |
|
7 | 8 | (The writing "no-che?k-code" is for not skipping this file when checking.) |
|
8 | 9 | |
|
9 | 10 | $ hg locate | sed 's-\\-/-g' | |
|
10 | 11 | > xargs "$check_code" --warnings --per-file=0 || false |
|
11 | 12 | Skipping hgext/fsmonitor/pywatchman/__init__.py it has no-che?k-code (glob) |
|
12 | 13 | Skipping hgext/fsmonitor/pywatchman/bser.c it has no-che?k-code (glob) |
|
13 | 14 | Skipping hgext/fsmonitor/pywatchman/capabilities.py it has no-che?k-code (glob) |
|
14 | 15 | Skipping hgext/fsmonitor/pywatchman/msc_stdint.h it has no-che?k-code (glob) |
|
15 | 16 | Skipping hgext/fsmonitor/pywatchman/pybser.py it has no-che?k-code (glob) |
|
16 | 17 | Skipping i18n/polib.py it has no-che?k-code (glob) |
|
17 | 18 | Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob) |
|
18 | 19 | Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob) |
|
19 | 20 | Skipping mercurial/httpclient/socketutil.py it has no-che?k-code (glob) |
@@ -1,24 +1,21 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | Enable obsolescence to avoid the warning issue when obsmarker are found |
|
4 | 4 | |
|
5 | $ cat >> $HGRCPATH << EOF | |
|
6 | > [experimental] | |
|
7 | > evolution=createmarkers | |
|
8 | > EOF | |
|
5 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
9 | 6 | |
|
10 | 7 | Go back in the hg repo |
|
11 | 8 | |
|
12 | 9 | $ cd $TESTDIR/.. |
|
13 | 10 | |
|
14 | 11 | $ for node in `hg log --rev 'not public() and ::.' --template '{node|short}\n'`; do |
|
15 | 12 | > hg export $node | contrib/check-commit > ${TESTTMP}/check-commit.out |
|
16 | 13 | > if [ $? -ne 0 ]; then |
|
17 | 14 | > echo "Revision $node does not comply with rules" |
|
18 | 15 | > echo '------------------------------------------------------' |
|
19 | 16 | > cat ${TESTTMP}/check-commit.out |
|
20 | 17 | > echo |
|
21 | 18 | > fi |
|
22 | 19 | > done |
|
23 | 20 | |
|
24 | 21 |
@@ -1,8 +1,9 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
3 | 4 | $ cd "$TESTDIR"/.. |
|
4 | 5 | |
|
5 | 6 | New errors are not allowed. Warnings are strongly discouraged. |
|
6 | 7 | |
|
7 | 8 | $ hg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' | |
|
8 | 9 | > python contrib/check-config.py |
@@ -1,23 +1,24 | |||
|
1 | 1 | #require test-repo execbit |
|
2 | 2 | |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
3 | 4 | $ cd "`dirname "$TESTDIR"`" |
|
4 | 5 | |
|
5 | 6 | look for python scripts without the execute bit |
|
6 | 7 | |
|
7 | 8 | $ hg files 'set:**.py and not exec() and grep(r"^#!.*?python")' |
|
8 | 9 | [1] |
|
9 | 10 | |
|
10 | 11 | look for python scripts with execute bit but not shebang |
|
11 | 12 | |
|
12 | 13 | $ hg files 'set:**.py and exec() and not grep(r"^#!.*?python")' |
|
13 | 14 | [1] |
|
14 | 15 | |
|
15 | 16 | look for shell scripts with execute bit but not shebang |
|
16 | 17 | |
|
17 | 18 | $ hg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")' |
|
18 | 19 | [1] |
|
19 | 20 | |
|
20 | 21 | look for non scripts with no shebang |
|
21 | 22 | |
|
22 | 23 | $ hg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")' |
|
23 | 24 | [1] |
@@ -1,181 +1,182 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
3 | 4 | $ import_checker="$TESTDIR"/../contrib/import-checker.py |
|
4 | 5 | |
|
5 | 6 | Run the doctests from the import checker, and make sure |
|
6 | 7 | it's working correctly. |
|
7 | 8 | $ TERM=dumb |
|
8 | 9 | $ export TERM |
|
9 | 10 | $ python -m doctest $import_checker |
|
10 | 11 | |
|
11 | 12 | Run additional tests for the import checker |
|
12 | 13 | |
|
13 | 14 | $ mkdir testpackage |
|
14 | 15 | $ touch testpackage/__init__.py |
|
15 | 16 | |
|
16 | 17 | $ cat > testpackage/multiple.py << EOF |
|
17 | 18 | > from __future__ import absolute_import |
|
18 | 19 | > import os, sys |
|
19 | 20 | > EOF |
|
20 | 21 | |
|
21 | 22 | $ cat > testpackage/unsorted.py << EOF |
|
22 | 23 | > from __future__ import absolute_import |
|
23 | 24 | > import sys |
|
24 | 25 | > import os |
|
25 | 26 | > EOF |
|
26 | 27 | |
|
27 | 28 | $ cat > testpackage/stdafterlocal.py << EOF |
|
28 | 29 | > from __future__ import absolute_import |
|
29 | 30 | > from . import unsorted |
|
30 | 31 | > import os |
|
31 | 32 | > EOF |
|
32 | 33 | |
|
33 | 34 | $ cat > testpackage/requirerelative.py << EOF |
|
34 | 35 | > from __future__ import absolute_import |
|
35 | 36 | > import testpackage.unsorted |
|
36 | 37 | > EOF |
|
37 | 38 | |
|
38 | 39 | $ cat > testpackage/importalias.py << EOF |
|
39 | 40 | > from __future__ import absolute_import |
|
40 | 41 | > import ui |
|
41 | 42 | > EOF |
|
42 | 43 | |
|
43 | 44 | $ cat > testpackage/relativestdlib.py << EOF |
|
44 | 45 | > from __future__ import absolute_import |
|
45 | 46 | > from .. import os |
|
46 | 47 | > EOF |
|
47 | 48 | |
|
48 | 49 | $ cat > testpackage/symbolimport.py << EOF |
|
49 | 50 | > from __future__ import absolute_import |
|
50 | 51 | > from .unsorted import foo |
|
51 | 52 | > EOF |
|
52 | 53 | |
|
53 | 54 | $ cat > testpackage/latesymbolimport.py << EOF |
|
54 | 55 | > from __future__ import absolute_import |
|
55 | 56 | > from . import unsorted |
|
56 | 57 | > from mercurial.node import hex |
|
57 | 58 | > EOF |
|
58 | 59 | |
|
59 | 60 | $ cat > testpackage/multiplegroups.py << EOF |
|
60 | 61 | > from __future__ import absolute_import |
|
61 | 62 | > from . import unsorted |
|
62 | 63 | > from . import more |
|
63 | 64 | > EOF |
|
64 | 65 | |
|
65 | 66 | $ mkdir testpackage/subpackage |
|
66 | 67 | $ cat > testpackage/subpackage/levelpriority.py << EOF |
|
67 | 68 | > from __future__ import absolute_import |
|
68 | 69 | > from . import foo |
|
69 | 70 | > from .. import parent |
|
70 | 71 | > EOF |
|
71 | 72 | |
|
72 | 73 | $ touch testpackage/subpackage/foo.py |
|
73 | 74 | $ cat > testpackage/subpackage/__init__.py << EOF |
|
74 | 75 | > from __future__ import absolute_import |
|
75 | 76 | > from . import levelpriority # should not cause cycle |
|
76 | 77 | > EOF |
|
77 | 78 | |
|
78 | 79 | $ cat > testpackage/subpackage/localimport.py << EOF |
|
79 | 80 | > from __future__ import absolute_import |
|
80 | 81 | > from . import foo |
|
81 | 82 | > def bar(): |
|
82 | 83 | > # should not cause "higher-level import should come first" |
|
83 | 84 | > from .. import unsorted |
|
84 | 85 | > # but other errors should be detected |
|
85 | 86 | > from .. import more |
|
86 | 87 | > import testpackage.subpackage.levelpriority |
|
87 | 88 | > EOF |
|
88 | 89 | |
|
89 | 90 | $ cat > testpackage/importmodulefromsub.py << EOF |
|
90 | 91 | > from __future__ import absolute_import |
|
91 | 92 | > from .subpackage import foo # not a "direct symbol import" |
|
92 | 93 | > EOF |
|
93 | 94 | |
|
94 | 95 | $ cat > testpackage/importsymbolfromsub.py << EOF |
|
95 | 96 | > from __future__ import absolute_import |
|
96 | 97 | > from .subpackage import foo, nonmodule |
|
97 | 98 | > EOF |
|
98 | 99 | |
|
99 | 100 | $ cat > testpackage/sortedentries.py << EOF |
|
100 | 101 | > from __future__ import absolute_import |
|
101 | 102 | > from . import ( |
|
102 | 103 | > foo, |
|
103 | 104 | > bar, |
|
104 | 105 | > ) |
|
105 | 106 | > EOF |
|
106 | 107 | |
|
107 | 108 | $ cat > testpackage/importfromalias.py << EOF |
|
108 | 109 | > from __future__ import absolute_import |
|
109 | 110 | > from . import ui |
|
110 | 111 | > EOF |
|
111 | 112 | |
|
112 | 113 | $ cat > testpackage/importfromrelative.py << EOF |
|
113 | 114 | > from __future__ import absolute_import |
|
114 | 115 | > from testpackage.unsorted import foo |
|
115 | 116 | > EOF |
|
116 | 117 | |
|
117 | 118 | $ mkdir testpackage2 |
|
118 | 119 | $ touch testpackage2/__init__.py |
|
119 | 120 | |
|
120 | 121 | $ cat > testpackage2/latesymbolimport.py << EOF |
|
121 | 122 | > from __future__ import absolute_import |
|
122 | 123 | > from testpackage import unsorted |
|
123 | 124 | > from mercurial.node import hex |
|
124 | 125 | > EOF |
|
125 | 126 | |
|
126 | 127 | $ python "$import_checker" testpackage*/*.py testpackage/subpackage/*.py |
|
127 | 128 | testpackage/importalias.py:2: ui module must be "as" aliased to uimod |
|
128 | 129 | testpackage/importfromalias.py:2: ui from testpackage must be "as" aliased to uimod |
|
129 | 130 | testpackage/importfromrelative.py:2: import should be relative: testpackage.unsorted |
|
130 | 131 | testpackage/importfromrelative.py:2: direct symbol import foo from testpackage.unsorted |
|
131 | 132 | testpackage/importsymbolfromsub.py:2: direct symbol import nonmodule from testpackage.subpackage |
|
132 | 133 | testpackage/latesymbolimport.py:3: symbol import follows non-symbol import: mercurial.node |
|
133 | 134 | testpackage/multiple.py:2: multiple imported names: os, sys |
|
134 | 135 | testpackage/multiplegroups.py:3: multiple "from . import" statements |
|
135 | 136 | testpackage/relativestdlib.py:2: relative import of stdlib module |
|
136 | 137 | testpackage/requirerelative.py:2: import should be relative: testpackage.unsorted |
|
137 | 138 | testpackage/sortedentries.py:2: imports from testpackage not lexically sorted: bar < foo |
|
138 | 139 | testpackage/stdafterlocal.py:3: stdlib import "os" follows local import: testpackage |
|
139 | 140 | testpackage/subpackage/levelpriority.py:3: higher-level import should come first: testpackage |
|
140 | 141 | testpackage/subpackage/localimport.py:7: multiple "from .. import" statements |
|
141 | 142 | testpackage/subpackage/localimport.py:8: import should be relative: testpackage.subpackage.levelpriority |
|
142 | 143 | testpackage/symbolimport.py:2: direct symbol import foo from testpackage.unsorted |
|
143 | 144 | testpackage/unsorted.py:3: imports not lexically sorted: os < sys |
|
144 | 145 | testpackage2/latesymbolimport.py:3: symbol import follows non-symbol import: mercurial.node |
|
145 | 146 | [1] |
|
146 | 147 | |
|
147 | 148 | $ cd "$TESTDIR"/.. |
|
148 | 149 | |
|
149 | 150 | There are a handful of cases here that require renaming a module so it |
|
150 | 151 | doesn't overlap with a stdlib module name. There are also some cycles |
|
151 | 152 | here that we should still endeavor to fix, and some cycles will be |
|
152 | 153 | hidden by deduplication algorithm in the cycle detector, so fixing |
|
153 | 154 | these may expose other cycles. |
|
154 | 155 | |
|
155 | 156 | Known-bad files are excluded by -X as some of them would produce unstable |
|
156 | 157 | outputs, which should be fixed later. |
|
157 | 158 | |
|
158 | 159 | $ hg locate '**.py' \ |
|
159 | 160 | > 'tests/**.t' \ |
|
160 | 161 | > -X contrib/debugshell.py \ |
|
161 | 162 | > -X contrib/win32/hgwebdir_wsgi.py \ |
|
162 | 163 | > -X doc/gendoc.py \ |
|
163 | 164 | > -X doc/hgmanpage.py \ |
|
164 | 165 | > -X tests/test-hgweb-auth.py \ |
|
165 | 166 | > -X tests/hypothesishelpers.py \ |
|
166 | 167 | > -X tests/test-ctxmanager.py \ |
|
167 | 168 | > -X tests/test-lock.py \ |
|
168 | 169 | > -X tests/test-verify-repo-operations.py \ |
|
169 | 170 | > -X tests/test-hook.t \ |
|
170 | 171 | > -X tests/test-import.t \ |
|
171 | 172 | > -X tests/test-check-module-imports.t \ |
|
172 | 173 | > -X tests/test-commit-interactive.t \ |
|
173 | 174 | > -X tests/test-contrib-check-code.t \ |
|
174 | 175 | > -X tests/test-extension.t \ |
|
175 | 176 | > -X tests/test-hghave.t \ |
|
176 | 177 | > -X tests/test-hgweb-no-path-info.t \ |
|
177 | 178 | > -X tests/test-hgweb-no-request-uri.t \ |
|
178 | 179 | > -X tests/test-hgweb-non-interactive.t \ |
|
179 | 180 | > | sed 's-\\-/-g' | python "$import_checker" - |
|
180 | 181 | Import cycle: hgext.largefiles.basestore -> hgext.largefiles.localstore -> hgext.largefiles.basestore |
|
181 | 182 | [1] |
@@ -1,161 +1,162 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
3 | 4 | $ cd "$TESTDIR"/.. |
|
4 | 5 | |
|
5 | 6 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py |
|
6 | 7 | hgext/fsmonitor/pywatchman/__init__.py not using absolute_import |
|
7 | 8 | hgext/fsmonitor/pywatchman/__init__.py requires print_function |
|
8 | 9 | hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import |
|
9 | 10 | hgext/fsmonitor/pywatchman/pybser.py not using absolute_import |
|
10 | 11 | hgext/highlight/__init__.py not using absolute_import |
|
11 | 12 | hgext/highlight/highlight.py not using absolute_import |
|
12 | 13 | hgext/largefiles/__init__.py not using absolute_import |
|
13 | 14 | hgext/largefiles/basestore.py not using absolute_import |
|
14 | 15 | hgext/largefiles/lfcommands.py not using absolute_import |
|
15 | 16 | hgext/largefiles/lfutil.py not using absolute_import |
|
16 | 17 | hgext/largefiles/localstore.py not using absolute_import |
|
17 | 18 | hgext/largefiles/overrides.py not using absolute_import |
|
18 | 19 | hgext/largefiles/proto.py not using absolute_import |
|
19 | 20 | hgext/largefiles/remotestore.py not using absolute_import |
|
20 | 21 | hgext/largefiles/reposetup.py not using absolute_import |
|
21 | 22 | hgext/largefiles/uisetup.py not using absolute_import |
|
22 | 23 | hgext/largefiles/wirestore.py not using absolute_import |
|
23 | 24 | hgext/share.py not using absolute_import |
|
24 | 25 | hgext/win32text.py not using absolute_import |
|
25 | 26 | i18n/check-translation.py not using absolute_import |
|
26 | 27 | i18n/polib.py not using absolute_import |
|
27 | 28 | setup.py not using absolute_import |
|
28 | 29 | tests/heredoctest.py requires print_function |
|
29 | 30 | tests/md5sum.py not using absolute_import |
|
30 | 31 | tests/readlink.py not using absolute_import |
|
31 | 32 | tests/run-tests.py not using absolute_import |
|
32 | 33 | tests/test-demandimport.py not using absolute_import |
|
33 | 34 | |
|
34 | 35 | #if py3exe |
|
35 | 36 | $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py |
|
36 | 37 | doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
37 | 38 | hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob) |
|
38 | 39 | hgext/blackbox.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
39 | 40 | hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob) |
|
40 | 41 | hgext/censor.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
41 | 42 | hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) |
|
42 | 43 | hgext/children.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
43 | 44 | hgext/churn.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
44 | 45 | hgext/clonebundles.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
45 | 46 | hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
46 | 47 | hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
47 | 48 | hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
48 | 49 | hgext/convert/convcmd.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
49 | 50 | hgext/convert/cvs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
50 | 51 | hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
51 | 52 | hgext/convert/darcs.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
52 | 53 | hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
53 | 54 | hgext/convert/git.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
54 | 55 | hgext/convert/gnuarch.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
55 | 56 | hgext/convert/hg.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
56 | 57 | hgext/convert/monotone.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
57 | 58 | hgext/convert/p*.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob) |
|
58 | 59 | hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
59 | 60 | hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob) |
|
60 | 61 | hgext/eol.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
61 | 62 | hgext/extdiff.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob) |
|
62 | 63 | hgext/factotum.py: error importing: <ImportError> No module named 'rfc822' (error at __init__.py:*) (glob) |
|
63 | 64 | hgext/fetch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
64 | 65 | hgext/fsmonitor/watchmanclient.py: error importing module: <SystemError> Parent module 'hgext.fsmonitor' not loaded, cannot perform relative import (line *) (glob) |
|
65 | 66 | hgext/gpg.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
66 | 67 | hgext/graphlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
67 | 68 | hgext/hgk.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
68 | 69 | hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
69 | 70 | hgext/keyword.py: error importing: <ImportError> No module named 'BaseHTTPServer' (error at common.py:*) (glob) |
|
70 | 71 | hgext/largefiles/basestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
71 | 72 | hgext/largefiles/lfcommands.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
72 | 73 | hgext/largefiles/lfutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
73 | 74 | hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) |
|
74 | 75 | hgext/largefiles/overrides.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
75 | 76 | hgext/largefiles/proto.py: error importing: <ImportError> No module named 'httplib' (error at httppeer.py:*) (glob) |
|
76 | 77 | hgext/largefiles/remotestore.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob) |
|
77 | 78 | hgext/largefiles/reposetup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
78 | 79 | hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob) |
|
79 | 80 | hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob) |
|
80 | 81 | hgext/mq.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
81 | 82 | hgext/notify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
82 | 83 | hgext/pager.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
83 | 84 | hgext/patchbomb.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
84 | 85 | hgext/purge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
85 | 86 | hgext/rebase.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
86 | 87 | hgext/record.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
87 | 88 | hgext/relink.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
88 | 89 | hgext/schemes.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
89 | 90 | hgext/share.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
90 | 91 | hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
91 | 92 | hgext/strip.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
92 | 93 | hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
93 | 94 | mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
94 | 95 | mercurial/branchmap.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
95 | 96 | mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
96 | 97 | mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
97 | 98 | mercurial/changegroup.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
98 | 99 | mercurial/changelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
99 | 100 | mercurial/cmdutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
100 | 101 | mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob) |
|
101 | 102 | mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob) |
|
102 | 103 | mercurial/context.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
103 | 104 | mercurial/copies.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
104 | 105 | mercurial/crecord.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
105 | 106 | mercurial/dirstate.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
106 | 107 | mercurial/discovery.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
107 | 108 | mercurial/dispatch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
108 | 109 | mercurial/exchange.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
109 | 110 | mercurial/extensions.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
110 | 111 | mercurial/filelog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
111 | 112 | mercurial/filemerge.py: error importing: <ImportError> No module named 'cPickle' (error at formatter.py:*) (glob) |
|
112 | 113 | mercurial/fileset.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
113 | 114 | mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob) |
|
114 | 115 | mercurial/graphmod.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
115 | 116 | mercurial/help.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
116 | 117 | mercurial/hg.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob) |
|
117 | 118 | mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) |
|
118 | 119 | mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
119 | 120 | mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
120 | 121 | mercurial/hgweb/protocol.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
121 | 122 | mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
122 | 123 | mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob) |
|
123 | 124 | mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
124 | 125 | mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
125 | 126 | mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob) |
|
126 | 127 | mercurial/hook.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
127 | 128 | mercurial/httpconnection.py: error importing: <ImportError> No module named 'rfc822' (error at __init__.py:*) (glob) |
|
128 | 129 | mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
129 | 130 | mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
130 | 131 | mercurial/localrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
131 | 132 | mercurial/mail.py: error importing module: <AttributeError> module 'email' has no attribute 'Header' (line *) (glob) |
|
132 | 133 | mercurial/manifest.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
133 | 134 | mercurial/merge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
134 | 135 | mercurial/namespaces.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
135 | 136 | mercurial/patch.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
136 | 137 | mercurial/pure/mpatch.py: error importing module: <ImportError> cannot import name 'pycompat' (line *) (glob) |
|
137 | 138 | mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'mercurial.pure.node' (line *) (glob) |
|
138 | 139 | mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
139 | 140 | mercurial/revlog.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
140 | 141 | mercurial/revset.py: error importing module: <AttributeError> 'dict' object has no attribute 'iteritems' (line *) (glob) |
|
141 | 142 | mercurial/scmutil.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
142 | 143 | mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) |
|
143 | 144 | mercurial/simplemerge.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
144 | 145 | mercurial/sshpeer.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at wireproto.py:*) (glob) |
|
145 | 146 | mercurial/sshserver.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
146 | 147 | mercurial/statichttprepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
147 | 148 | mercurial/store.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
148 | 149 | mercurial/streamclone.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
149 | 150 | mercurial/subrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
150 | 151 | mercurial/templatefilters.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
151 | 152 | mercurial/templatekw.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
152 | 153 | mercurial/templater.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
153 | 154 | mercurial/ui.py: error importing: <ImportError> No module named 'cPickle' (error at formatter.py:*) (glob) |
|
154 | 155 | mercurial/unionrepo.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
155 | 156 | mercurial/url.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob) |
|
156 | 157 | mercurial/verify.py: error importing: <AttributeError> 'dict' object has no attribute 'iteritems' (error at revset.py:*) (glob) |
|
157 | 158 | mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob) |
|
158 | 159 | mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob) |
|
159 | 160 | mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob) |
|
160 | 161 | |
|
161 | 162 | #endif |
@@ -1,12 +1,13 | |||
|
1 | 1 | #require test-repo pyflakes hg10 |
|
2 | 2 | |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
3 | 4 | $ cd "`dirname "$TESTDIR"`" |
|
4 | 5 | |
|
5 | 6 | run pyflakes on all tracked files ending in .py or without a file ending |
|
6 | 7 | (skipping binary file random-seed) |
|
7 | 8 | |
|
8 | 9 | $ hg locate 'set:**.py or grep("^!#.*python")' 2>/dev/null \ |
|
9 | 10 | > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" |
|
10 | 11 | tests/filterpyflakes.py:61: undefined name 'undefinedname' |
|
11 | 12 | |
|
12 | 13 |
@@ -1,13 +1,14 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
3 | 4 | $ cd "`dirname "$TESTDIR"`" |
|
4 | 5 | |
|
5 | 6 | look for python scripts that do not use /usr/bin/env |
|
6 | 7 | |
|
7 | 8 | $ hg files 'set:grep(r"^#!.*?python") and not grep(r"^#!/usr/bin/env python")' |
|
8 | 9 | [1] |
|
9 | 10 | |
|
10 | 11 | look for shell scripts that do not use /bin/sh |
|
11 | 12 | |
|
12 | 13 | $ hg files 'set:grep(r"^#!.*/bin/sh") and not grep(r"^#!/bin/sh")' |
|
13 | 14 | [1] |
@@ -1,149 +1,150 | |||
|
1 | 1 | #require test-repo |
|
2 | 2 | |
|
3 | 3 | Set vars: |
|
4 | 4 | |
|
5 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
5 | 6 | $ CONTRIBDIR="$TESTDIR/../contrib" |
|
6 | 7 | |
|
7 | 8 | Prepare repo: |
|
8 | 9 | |
|
9 | 10 | $ hg init |
|
10 | 11 | |
|
11 | 12 | $ echo this is file a > a |
|
12 | 13 | $ hg add a |
|
13 | 14 | $ hg commit -m first |
|
14 | 15 | |
|
15 | 16 | $ echo adding to file a >> a |
|
16 | 17 | $ hg commit -m second |
|
17 | 18 | |
|
18 | 19 | $ echo adding more to file a >> a |
|
19 | 20 | $ hg commit -m third |
|
20 | 21 | |
|
21 | 22 | $ hg up -r 0 |
|
22 | 23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
23 | 24 | $ echo merge-this >> a |
|
24 | 25 | $ hg commit -m merge-able |
|
25 | 26 | created new head |
|
26 | 27 | |
|
27 | 28 | $ hg up -r 2 |
|
28 | 29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
29 | 30 | |
|
30 | 31 | perfstatus |
|
31 | 32 | |
|
32 | 33 | $ cat >> $HGRCPATH << EOF |
|
33 | 34 | > [extensions] |
|
34 | 35 | > perfstatusext=$CONTRIBDIR/perf.py |
|
35 | 36 | > [perf] |
|
36 | 37 | > presleep=0 |
|
37 | 38 | > stub=on |
|
38 | 39 | > parentscount=1 |
|
39 | 40 | > EOF |
|
40 | 41 | $ hg help perfstatusext |
|
41 | 42 | perfstatusext extension - helper extension to measure performance |
|
42 | 43 | |
|
43 | 44 | list of commands: |
|
44 | 45 | |
|
45 | 46 | perfaddremove |
|
46 | 47 | (no help text available) |
|
47 | 48 | perfancestors |
|
48 | 49 | (no help text available) |
|
49 | 50 | perfancestorset |
|
50 | 51 | (no help text available) |
|
51 | 52 | perfannotate (no help text available) |
|
52 | 53 | perfbranchmap |
|
53 | 54 | benchmark the update of a branchmap |
|
54 | 55 | perfcca (no help text available) |
|
55 | 56 | perfchangeset |
|
56 | 57 | (no help text available) |
|
57 | 58 | perfctxfiles (no help text available) |
|
58 | 59 | perfdiffwd Profile diff of working directory changes |
|
59 | 60 | perfdirfoldmap |
|
60 | 61 | (no help text available) |
|
61 | 62 | perfdirs (no help text available) |
|
62 | 63 | perfdirstate (no help text available) |
|
63 | 64 | perfdirstatedirs |
|
64 | 65 | (no help text available) |
|
65 | 66 | perfdirstatefoldmap |
|
66 | 67 | (no help text available) |
|
67 | 68 | perfdirstatewrite |
|
68 | 69 | (no help text available) |
|
69 | 70 | perffncacheencode |
|
70 | 71 | (no help text available) |
|
71 | 72 | perffncacheload |
|
72 | 73 | (no help text available) |
|
73 | 74 | perffncachewrite |
|
74 | 75 | (no help text available) |
|
75 | 76 | perfheads (no help text available) |
|
76 | 77 | perfindex (no help text available) |
|
77 | 78 | perfloadmarkers |
|
78 | 79 | benchmark the time to parse the on-disk markers for a repo |
|
79 | 80 | perflog (no help text available) |
|
80 | 81 | perflookup (no help text available) |
|
81 | 82 | perflrucachedict |
|
82 | 83 | (no help text available) |
|
83 | 84 | perfmanifest (no help text available) |
|
84 | 85 | perfmergecalculate |
|
85 | 86 | (no help text available) |
|
86 | 87 | perfmoonwalk benchmark walking the changelog backwards |
|
87 | 88 | perfnodelookup |
|
88 | 89 | (no help text available) |
|
89 | 90 | perfparents (no help text available) |
|
90 | 91 | perfpathcopies |
|
91 | 92 | (no help text available) |
|
92 | 93 | perfrawfiles (no help text available) |
|
93 | 94 | perfrevlog Benchmark reading a series of revisions from a revlog. |
|
94 | 95 | perfrevlogrevision |
|
95 | 96 | Benchmark obtaining a revlog revision. |
|
96 | 97 | perfrevrange (no help text available) |
|
97 | 98 | perfrevset benchmark the execution time of a revset |
|
98 | 99 | perfstartup (no help text available) |
|
99 | 100 | perfstatus (no help text available) |
|
100 | 101 | perftags (no help text available) |
|
101 | 102 | perftemplating |
|
102 | 103 | (no help text available) |
|
103 | 104 | perfvolatilesets |
|
104 | 105 | benchmark the computation of various volatile set |
|
105 | 106 | perfwalk (no help text available) |
|
106 | 107 | |
|
107 | 108 | (use "hg help -v perfstatusext" to show built-in aliases and global options) |
|
108 | 109 | $ hg perfaddremove |
|
109 | 110 | $ hg perfancestors |
|
110 | 111 | $ hg perfancestorset 2 |
|
111 | 112 | $ hg perfannotate a |
|
112 | 113 | $ hg perfbranchmap |
|
113 | 114 | $ hg perfcca |
|
114 | 115 | $ hg perfchangeset 2 |
|
115 | 116 | $ hg perfctxfiles 2 |
|
116 | 117 | $ hg perfdiffwd |
|
117 | 118 | $ hg perfdirfoldmap |
|
118 | 119 | $ hg perfdirs |
|
119 | 120 | $ hg perfdirstate |
|
120 | 121 | $ hg perfdirstatedirs |
|
121 | 122 | $ hg perfdirstatefoldmap |
|
122 | 123 | $ hg perfdirstatewrite |
|
123 | 124 | $ hg perffncacheencode |
|
124 | 125 | $ hg perffncacheload |
|
125 | 126 | $ hg perffncachewrite |
|
126 | 127 | $ hg perfheads |
|
127 | 128 | $ hg perfindex |
|
128 | 129 | $ hg perfloadmarkers |
|
129 | 130 | $ hg perflog |
|
130 | 131 | $ hg perflookup 2 |
|
131 | 132 | $ hg perflrucache |
|
132 | 133 | $ hg perfmanifest 2 |
|
133 | 134 | $ hg perfmergecalculate -r 3 |
|
134 | 135 | $ hg perfmoonwalk |
|
135 | 136 | $ hg perfnodelookup 2 |
|
136 | 137 | $ hg perfpathcopies 1 2 |
|
137 | 138 | $ hg perfrawfiles 2 |
|
138 | 139 | $ hg perfrevlog .hg/store/data/a.i |
|
139 | 140 | $ hg perfrevlogrevision -m 0 |
|
140 | 141 | $ hg perfrevrange |
|
141 | 142 | $ hg perfrevset 'all()' |
|
142 | 143 | $ hg perfstartup |
|
143 | 144 | $ hg perfstatus |
|
144 | 145 | $ hg perftags |
|
145 | 146 | $ hg perftemplating |
|
146 | 147 | $ hg perfvolatilesets |
|
147 | 148 | $ hg perfwalk |
|
148 | 149 | $ hg perfparents |
|
149 | 150 |
@@ -1,20 +1,22 | |||
|
1 | 1 | #require test-repo slow debhelper |
|
2 | 2 | |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
4 | ||
|
3 | 5 |
|
|
4 | 6 | $ DEB_BUILD_OPTIONS=nocheck |
|
5 | 7 | $ export DEB_BUILD_OPTIONS |
|
6 | 8 | $ OUTPUTDIR=`pwd` |
|
7 | 9 | $ export OUTPUTDIR |
|
8 | 10 | |
|
9 | 11 | $ cd "$TESTDIR"/.. |
|
10 | 12 | $ make deb > $OUTPUTDIR/build.log 2>&1 |
|
11 | 13 | $ cd $OUTPUTDIR |
|
12 | 14 | $ ls *.deb |
|
13 | 15 | mercurial-common_*.deb (glob) |
|
14 | 16 | mercurial_*.deb (glob) |
|
15 | 17 | main deb should have .so but no .py |
|
16 | 18 | $ dpkg --contents mercurial_*.deb | egrep '(localrepo|parsers)' |
|
17 | 19 | * ./usr/lib/python2.7/dist-packages/mercurial/parsers*.so (glob) |
|
18 | 20 | mercurial-common should have py but no .so or pyc |
|
19 | 21 | $ dpkg --contents mercurial-common_*.deb | egrep '(localrepo|parsers)' |
|
20 | 22 | * ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py (glob) |
@@ -1,28 +1,30 | |||
|
1 | 1 | #require test-repo slow docker |
|
2 | 2 | |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
4 | ||
|
3 | 5 |
|
|
4 | 6 | $ DEB_BUILD_OPTIONS=nocheck |
|
5 | 7 | $ export DEB_BUILD_OPTIONS |
|
6 | 8 | $ OUTPUTDIR=`pwd` |
|
7 | 9 | $ export OUTPUTDIR |
|
8 | 10 | |
|
9 | 11 | $ cd "$TESTDIR"/.. |
|
10 | 12 | $ make docker-debian-jessie > $OUTPUTDIR/build.log 2>&1 |
|
11 | 13 | $ cd $OUTPUTDIR |
|
12 | 14 | $ ls *.deb |
|
13 | 15 | mercurial-common_*.deb (glob) |
|
14 | 16 | mercurial_*.deb (glob) |
|
15 | 17 | |
|
16 | 18 | We check debian package contents with portable tools so that when |
|
17 | 19 | we're on non-debian machines we can still test the packages that are |
|
18 | 20 | built using docker. |
|
19 | 21 | |
|
20 | 22 | main deb should have .so but no .py |
|
21 | 23 | $ ar x mercurial_*.deb |
|
22 | 24 | $ tar tf data.tar* | egrep '(localrepo|parsers)' |
|
23 | 25 | ./usr/lib/python2.7/dist-packages/mercurial/parsers*.so (glob) |
|
24 | 26 | mercurial-common should have .py but no .so or .pyc |
|
25 | 27 | $ ar x mercurial-common_*.deb |
|
26 | 28 | $ tar tf data.tar* | egrep '(localrepo|parsers)' |
|
27 | 29 | ./usr/lib/python2.7/dist-packages/mercurial/pure/parsers.py |
|
28 | 30 | ./usr/lib/python2.7/dist-packages/mercurial/localrepo.py |
@@ -1,147 +1,149 | |||
|
1 | 1 | hg debuginstall |
|
2 | 2 | $ hg debuginstall |
|
3 | 3 | checking encoding (ascii)... |
|
4 | 4 | checking Python executable (*) (glob) |
|
5 | 5 | checking Python version (2.*) (glob) |
|
6 | 6 | checking Python lib (*lib*)... (glob) |
|
7 | 7 | checking Mercurial version (*) (glob) |
|
8 | 8 | checking Mercurial custom build (*) (glob) |
|
9 | 9 | checking installed modules (*mercurial)... (glob) |
|
10 | 10 | checking templates (*mercurial?templates)... (glob) |
|
11 | 11 | checking default template (*mercurial?templates?map-cmdline.default) (glob) |
|
12 | 12 | checking commit editor... (* -c "import sys; sys.exit(0)") (glob) |
|
13 | 13 | checking username (test) |
|
14 | 14 | no problems detected |
|
15 | 15 | |
|
16 | 16 | hg debuginstall JSON |
|
17 | 17 | $ hg debuginstall -Tjson | sed 's|\\\\|\\|g' |
|
18 | 18 | [ |
|
19 | 19 | { |
|
20 | 20 | "defaulttemplate": "*mercurial?templates?map-cmdline.default", (glob) |
|
21 | 21 | "defaulttemplateerror": null, |
|
22 | 22 | "defaulttemplatenotfound": "default", |
|
23 | 23 | "editor": "* -c \"import sys; sys.exit(0)\"", (glob) |
|
24 | 24 | "editornotfound": false, |
|
25 | 25 | "encoding": "ascii", |
|
26 | 26 | "encodingerror": null, |
|
27 | 27 | "extensionserror": null, |
|
28 | 28 | "hgmodules": "*mercurial", (glob) |
|
29 | 29 | "hgver": "*", (glob) |
|
30 | 30 | "hgverextra": "*", (glob) |
|
31 | 31 | "problems": 0, |
|
32 | 32 | "pythonexe": "*", (glob) |
|
33 | 33 | "pythonlib": "*", (glob) |
|
34 | 34 | "pythonver": "*.*.*", (glob) |
|
35 | 35 | "templatedirs": "*mercurial?templates", (glob) |
|
36 | 36 | "username": "test", |
|
37 | 37 | "usernameerror": null, |
|
38 | 38 | "vinotfound": false |
|
39 | 39 | } |
|
40 | 40 | ] |
|
41 | 41 | |
|
42 | 42 | hg debuginstall with no username |
|
43 | 43 | $ HGUSER= hg debuginstall |
|
44 | 44 | checking encoding (ascii)... |
|
45 | 45 | checking Python executable (*) (glob) |
|
46 | 46 | checking Python version (2.*) (glob) |
|
47 | 47 | checking Python lib (*lib*)... (glob) |
|
48 | 48 | checking Mercurial version (*) (glob) |
|
49 | 49 | checking Mercurial custom build (*) (glob) |
|
50 | 50 | checking installed modules (*mercurial)... (glob) |
|
51 | 51 | checking templates (*mercurial?templates)... (glob) |
|
52 | 52 | checking default template (*mercurial?templates?map-cmdline.default) (glob) |
|
53 | 53 | checking commit editor... (* -c "import sys; sys.exit(0)") (glob) |
|
54 | 54 | checking username... |
|
55 | 55 | no username supplied |
|
56 | 56 | (specify a username in your configuration file) |
|
57 | 57 | 1 problems detected, please check your install! |
|
58 | 58 | [1] |
|
59 | 59 | |
|
60 | 60 | path variables are expanded (~ is the same as $TESTTMP) |
|
61 | 61 | $ mkdir tools |
|
62 | 62 | $ touch tools/testeditor.exe |
|
63 | 63 | #if execbit |
|
64 | 64 | $ chmod 755 tools/testeditor.exe |
|
65 | 65 | #endif |
|
66 | 66 | $ hg debuginstall --config ui.editor=~/tools/testeditor.exe |
|
67 | 67 | checking encoding (ascii)... |
|
68 | 68 | checking Python executable (*) (glob) |
|
69 | 69 | checking Python version (*) (glob) |
|
70 | 70 | checking Python lib (*lib*)... (glob) |
|
71 | 71 | checking Mercurial version (*) (glob) |
|
72 | 72 | checking Mercurial custom build (*) (glob) |
|
73 | 73 | checking installed modules (*mercurial)... (glob) |
|
74 | 74 | checking templates (*mercurial?templates)... (glob) |
|
75 | 75 | checking default template (*mercurial?templates?map-cmdline.default) (glob) |
|
76 | 76 | checking commit editor... (* -c "import sys; sys.exit(0)") (glob) |
|
77 | 77 | checking username (test) |
|
78 | 78 | no problems detected |
|
79 | 79 | |
|
80 | 80 | #if test-repo |
|
81 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
82 | ||
|
81 | 83 | $ cat >> wixxml.py << EOF |
|
82 | 84 | > import os, subprocess, sys |
|
83 | 85 | > import xml.etree.ElementTree as ET |
|
84 | 86 | > |
|
85 | 87 | > # MSYS mangles the path if it expands $TESTDIR |
|
86 | 88 | > testdir = os.environ['TESTDIR'] |
|
87 | 89 | > ns = {'wix' : 'http://schemas.microsoft.com/wix/2006/wi'} |
|
88 | 90 | > |
|
89 | 91 | > def directory(node, relpath): |
|
90 | 92 | > '''generator of files in the xml node, rooted at relpath''' |
|
91 | 93 | > dirs = node.findall('./{%(wix)s}Directory' % ns) |
|
92 | 94 | > |
|
93 | 95 | > for d in dirs: |
|
94 | 96 | > for subfile in directory(d, relpath + d.attrib['Name'] + '/'): |
|
95 | 97 | > yield subfile |
|
96 | 98 | > |
|
97 | 99 | > files = node.findall('./{%(wix)s}Component/{%(wix)s}File' % ns) |
|
98 | 100 | > |
|
99 | 101 | > for f in files: |
|
100 | 102 | > yield relpath + f.attrib['Name'] |
|
101 | 103 | > |
|
102 | 104 | > def hgdirectory(relpath): |
|
103 | 105 | > '''generator of tracked files, rooted at relpath''' |
|
104 | 106 | > hgdir = "%s/../mercurial" % (testdir) |
|
105 | 107 | > args = ['hg', '--cwd', hgdir, 'files', relpath] |
|
106 | 108 | > proc = subprocess.Popen(args, stdout=subprocess.PIPE, |
|
107 | 109 | > stderr=subprocess.PIPE) |
|
108 | 110 | > output = proc.communicate()[0] |
|
109 | 111 | > |
|
110 | 112 | > slash = '/' |
|
111 | 113 | > for line in output.splitlines(): |
|
112 | 114 | > if os.name == 'nt': |
|
113 | 115 | > yield line.replace(os.sep, slash) |
|
114 | 116 | > else: |
|
115 | 117 | > yield line |
|
116 | 118 | > |
|
117 | 119 | > tracked = [f for f in hgdirectory(sys.argv[1])] |
|
118 | 120 | > |
|
119 | 121 | > xml = ET.parse("%s/../contrib/wix/%s.wxs" % (testdir, sys.argv[1])) |
|
120 | 122 | > root = xml.getroot() |
|
121 | 123 | > dir = root.find('.//{%(wix)s}DirectoryRef' % ns) |
|
122 | 124 | > |
|
123 | 125 | > installed = [f for f in directory(dir, '')] |
|
124 | 126 | > |
|
125 | 127 | > print('Not installed:') |
|
126 | 128 | > for f in sorted(set(tracked) - set(installed)): |
|
127 | 129 | > print(' %s' % f) |
|
128 | 130 | > |
|
129 | 131 | > print('Not tracked:') |
|
130 | 132 | > for f in sorted(set(installed) - set(tracked)): |
|
131 | 133 | > print(' %s' % f) |
|
132 | 134 | > EOF |
|
133 | 135 | |
|
134 | 136 | $ python wixxml.py help |
|
135 | 137 | Not installed: |
|
136 | 138 | help/common.txt |
|
137 | 139 | help/hg-ssh.8.txt |
|
138 | 140 | help/hg.1.txt |
|
139 | 141 | help/hgignore.5.txt |
|
140 | 142 | help/hgrc.5.txt |
|
141 | 143 | Not tracked: |
|
142 | 144 | |
|
143 | 145 | $ python wixxml.py templates |
|
144 | 146 | Not installed: |
|
145 | 147 | Not tracked: |
|
146 | 148 | |
|
147 | 149 | #endif |
@@ -1,44 +1,47 | |||
|
1 | 1 | #require test-repo slow osx osxpackaging |
|
2 | ||
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
4 | ||
|
2 | 5 | $ OUTPUTDIR=`pwd` |
|
3 | 6 | $ export OUTPUTDIR |
|
4 | 7 | $ KEEPMPKG=yes |
|
5 | 8 | $ export KEEPMPKG |
|
6 | 9 | |
|
7 | 10 | $ cd "$TESTDIR"/.. |
|
8 | 11 | $ rm -rf dist |
|
9 | 12 | $ make osx > $OUTPUTDIR/build.log 2>&1 |
|
10 | 13 | $ cd $OUTPUTDIR |
|
11 | 14 | $ ls -d *.pkg |
|
12 | 15 | Mercurial-*-macosx10.*.pkg (glob) |
|
13 | 16 | |
|
14 | 17 | $ xar -xf Mercurial*.pkg |
|
15 | 18 | |
|
16 | 19 | Gather list of all installed files: |
|
17 | 20 | $ lsbom mercurial.pkg/Bom > boms.txt |
|
18 | 21 | |
|
19 | 22 | Spot-check some randomly selected files: |
|
20 | 23 | $ grep bdiff boms.txt | cut -d ' ' -f 1,2,3 |
|
21 | 24 | ./Library/Python/2.7/site-packages/mercurial/bdiff.so 100755 0/0 |
|
22 | 25 | ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.py 100644 0/0 |
|
23 | 26 | ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyc 100644 0/0 |
|
24 | 27 | ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyo 100644 0/0 |
|
25 | 28 | $ egrep 'man[15]' boms.txt | cut -d ' ' -f 1,2,3 |
|
26 | 29 | ./usr/local/share/man/man1 40755 0/0 |
|
27 | 30 | ./usr/local/share/man/man1/hg.1 100644 0/0 |
|
28 | 31 | ./usr/local/share/man/man5 40755 0/0 |
|
29 | 32 | ./usr/local/share/man/man5/hgignore.5 100644 0/0 |
|
30 | 33 | ./usr/local/share/man/man5/hgrc.5 100644 0/0 |
|
31 | 34 | $ grep bser boms.txt | cut -d ' ' -f 1,2,3 |
|
32 | 35 | ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/bser.so 100755 0/0 |
|
33 | 36 | ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.py 100644 0/0 |
|
34 | 37 | ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyc 100644 0/0 |
|
35 | 38 | ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyo 100644 0/0 |
|
36 | 39 | $ grep localrepo boms.txt | cut -d ' ' -f 1,2,3 |
|
37 | 40 | ./Library/Python/2.7/site-packages/mercurial/localrepo.py 100644 0/0 |
|
38 | 41 | ./Library/Python/2.7/site-packages/mercurial/localrepo.pyc 100644 0/0 |
|
39 | 42 | ./Library/Python/2.7/site-packages/mercurial/localrepo.pyo 100644 0/0 |
|
40 | 43 | $ grep '/hg ' boms.txt | cut -d ' ' -f 1,2,3 |
|
41 | 44 | ./usr/local/bin/hg 100755 0/0 |
|
42 | 45 | |
|
43 | 46 | Note that we're not currently installing any /etc/mercurial stuff, |
|
44 | 47 | including merge-tool configurations. |
General Comments 0
You need to be logged in to leave comments.
Login now