##// END OF EJS Templates
py3: use absolute_import in test-hgweb-auth.py
Robert Stanca -
r28747:779addce default
parent child Browse files
Show More
@@ -1,253 +1,252
1 #require test-repo
1 #require test-repo
2
2
3 $ cd "$TESTDIR"/..
3 $ cd "$TESTDIR"/..
4
4
5 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
5 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
6 doc/check-seclevel.py not using absolute_import
6 doc/check-seclevel.py not using absolute_import
7 doc/gendoc.py not using absolute_import
7 doc/gendoc.py not using absolute_import
8 doc/hgmanpage.py not using absolute_import
8 doc/hgmanpage.py not using absolute_import
9 hgext/color.py not using absolute_import
9 hgext/color.py not using absolute_import
10 hgext/eol.py not using absolute_import
10 hgext/eol.py not using absolute_import
11 hgext/extdiff.py not using absolute_import
11 hgext/extdiff.py not using absolute_import
12 hgext/factotum.py not using absolute_import
12 hgext/factotum.py not using absolute_import
13 hgext/fetch.py not using absolute_import
13 hgext/fetch.py not using absolute_import
14 hgext/fsmonitor/pywatchman/__init__.py not using absolute_import
14 hgext/fsmonitor/pywatchman/__init__.py not using absolute_import
15 hgext/fsmonitor/pywatchman/__init__.py requires print_function
15 hgext/fsmonitor/pywatchman/__init__.py requires print_function
16 hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import
16 hgext/fsmonitor/pywatchman/capabilities.py not using absolute_import
17 hgext/fsmonitor/pywatchman/pybser.py not using absolute_import
17 hgext/fsmonitor/pywatchman/pybser.py not using absolute_import
18 hgext/gpg.py not using absolute_import
18 hgext/gpg.py not using absolute_import
19 hgext/graphlog.py not using absolute_import
19 hgext/graphlog.py not using absolute_import
20 hgext/hgcia.py not using absolute_import
20 hgext/hgcia.py not using absolute_import
21 hgext/hgk.py not using absolute_import
21 hgext/hgk.py not using absolute_import
22 hgext/highlight/__init__.py not using absolute_import
22 hgext/highlight/__init__.py not using absolute_import
23 hgext/highlight/highlight.py not using absolute_import
23 hgext/highlight/highlight.py not using absolute_import
24 hgext/histedit.py not using absolute_import
24 hgext/histedit.py not using absolute_import
25 hgext/largefiles/__init__.py not using absolute_import
25 hgext/largefiles/__init__.py not using absolute_import
26 hgext/largefiles/basestore.py not using absolute_import
26 hgext/largefiles/basestore.py not using absolute_import
27 hgext/largefiles/lfcommands.py not using absolute_import
27 hgext/largefiles/lfcommands.py not using absolute_import
28 hgext/largefiles/lfutil.py not using absolute_import
28 hgext/largefiles/lfutil.py not using absolute_import
29 hgext/largefiles/localstore.py not using absolute_import
29 hgext/largefiles/localstore.py not using absolute_import
30 hgext/largefiles/overrides.py not using absolute_import
30 hgext/largefiles/overrides.py not using absolute_import
31 hgext/largefiles/proto.py not using absolute_import
31 hgext/largefiles/proto.py not using absolute_import
32 hgext/largefiles/remotestore.py not using absolute_import
32 hgext/largefiles/remotestore.py not using absolute_import
33 hgext/largefiles/reposetup.py not using absolute_import
33 hgext/largefiles/reposetup.py not using absolute_import
34 hgext/largefiles/uisetup.py not using absolute_import
34 hgext/largefiles/uisetup.py not using absolute_import
35 hgext/largefiles/wirestore.py not using absolute_import
35 hgext/largefiles/wirestore.py not using absolute_import
36 hgext/mq.py not using absolute_import
36 hgext/mq.py not using absolute_import
37 hgext/rebase.py not using absolute_import
37 hgext/rebase.py not using absolute_import
38 hgext/share.py not using absolute_import
38 hgext/share.py not using absolute_import
39 hgext/win32text.py not using absolute_import
39 hgext/win32text.py not using absolute_import
40 i18n/check-translation.py not using absolute_import
40 i18n/check-translation.py not using absolute_import
41 i18n/polib.py not using absolute_import
41 i18n/polib.py not using absolute_import
42 setup.py not using absolute_import
42 setup.py not using absolute_import
43 tests/heredoctest.py requires print_function
43 tests/heredoctest.py requires print_function
44 tests/killdaemons.py not using absolute_import
44 tests/killdaemons.py not using absolute_import
45 tests/md5sum.py not using absolute_import
45 tests/md5sum.py not using absolute_import
46 tests/mockblackbox.py not using absolute_import
46 tests/mockblackbox.py not using absolute_import
47 tests/printenv.py not using absolute_import
47 tests/printenv.py not using absolute_import
48 tests/readlink.py not using absolute_import
48 tests/readlink.py not using absolute_import
49 tests/readlink.py requires print_function
49 tests/readlink.py requires print_function
50 tests/revlog-formatv0.py not using absolute_import
50 tests/revlog-formatv0.py not using absolute_import
51 tests/run-tests.py not using absolute_import
51 tests/run-tests.py not using absolute_import
52 tests/sitecustomize.py not using absolute_import
52 tests/sitecustomize.py not using absolute_import
53 tests/svn-safe-append.py not using absolute_import
53 tests/svn-safe-append.py not using absolute_import
54 tests/svnxml.py not using absolute_import
54 tests/svnxml.py not using absolute_import
55 tests/test-atomictempfile.py not using absolute_import
55 tests/test-atomictempfile.py not using absolute_import
56 tests/test-demandimport.py not using absolute_import
56 tests/test-demandimport.py not using absolute_import
57 tests/test-demandimport.py requires print_function
57 tests/test-demandimport.py requires print_function
58 tests/test-doctest.py not using absolute_import
58 tests/test-doctest.py not using absolute_import
59 tests/test-hgweb-auth.py not using absolute_import
60 tests/test-hgweb-auth.py requires print_function
59 tests/test-hgweb-auth.py requires print_function
61 tests/test-hgwebdir-paths.py not using absolute_import
60 tests/test-hgwebdir-paths.py not using absolute_import
62 tests/test-hybridencode.py not using absolute_import
61 tests/test-hybridencode.py not using absolute_import
63 tests/test-hybridencode.py requires print_function
62 tests/test-hybridencode.py requires print_function
64 tests/test-lrucachedict.py not using absolute_import
63 tests/test-lrucachedict.py not using absolute_import
65 tests/test-lrucachedict.py requires print_function
64 tests/test-lrucachedict.py requires print_function
66 tests/test-manifest.py not using absolute_import
65 tests/test-manifest.py not using absolute_import
67 tests/test-minirst.py not using absolute_import
66 tests/test-minirst.py not using absolute_import
68 tests/test-minirst.py requires print_function
67 tests/test-minirst.py requires print_function
69 tests/test-parseindex2.py not using absolute_import
68 tests/test-parseindex2.py not using absolute_import
70 tests/test-parseindex2.py requires print_function
69 tests/test-parseindex2.py requires print_function
71 tests/test-pathencode.py not using absolute_import
70 tests/test-pathencode.py not using absolute_import
72 tests/test-pathencode.py requires print_function
71 tests/test-pathencode.py requires print_function
73 tests/test-propertycache.py not using absolute_import
72 tests/test-propertycache.py not using absolute_import
74 tests/test-propertycache.py requires print_function
73 tests/test-propertycache.py requires print_function
75 tests/test-revlog-ancestry.py not using absolute_import
74 tests/test-revlog-ancestry.py not using absolute_import
76 tests/test-revlog-ancestry.py requires print_function
75 tests/test-revlog-ancestry.py requires print_function
77 tests/test-run-tests.py not using absolute_import
76 tests/test-run-tests.py not using absolute_import
78 tests/test-simplemerge.py not using absolute_import
77 tests/test-simplemerge.py not using absolute_import
79 tests/test-status-inprocess.py not using absolute_import
78 tests/test-status-inprocess.py not using absolute_import
80 tests/test-status-inprocess.py requires print_function
79 tests/test-status-inprocess.py requires print_function
81 tests/test-symlink-os-yes-fs-no.py not using absolute_import
80 tests/test-symlink-os-yes-fs-no.py not using absolute_import
82 tests/test-trusted.py not using absolute_import
81 tests/test-trusted.py not using absolute_import
83 tests/test-trusted.py requires print_function
82 tests/test-trusted.py requires print_function
84 tests/test-ui-color.py not using absolute_import
83 tests/test-ui-color.py not using absolute_import
85 tests/test-url.py not using absolute_import
84 tests/test-url.py not using absolute_import
86
85
87 #if py3exe
86 #if py3exe
88 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py
87 $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py
89 contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape' codec can't decode bytes in position *-*: malformed \N character escape (<unknown>, line *) (glob)
88 contrib/check-code.py: invalid syntax: (unicode error) 'unicodeescape' codec can't decode bytes in position *-*: malformed \N character escape (<unknown>, line *) (glob)
90 doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
89 doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
91 hgext/acl.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
90 hgext/acl.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
92 hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob)
91 hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob)
93 hgext/blackbox.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
92 hgext/blackbox.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
94 hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob)
93 hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line *) (glob)
95 hgext/censor.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
94 hgext/censor.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
96 hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob)
95 hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob)
97 hgext/children.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
96 hgext/children.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
98 hgext/churn.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
97 hgext/churn.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
99 hgext/clonebundles.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
98 hgext/clonebundles.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
100 hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
99 hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
101 hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob)
100 hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob)
102 hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
101 hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
103 hgext/convert/convcmd.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
102 hgext/convert/convcmd.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
104 hgext/convert/cvs.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
103 hgext/convert/cvs.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
105 hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
104 hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
106 hgext/convert/darcs.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
105 hgext/convert/darcs.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
107 hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob)
106 hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line *) (glob)
108 hgext/convert/git.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
107 hgext/convert/git.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
109 hgext/convert/gnuarch.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
108 hgext/convert/gnuarch.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
110 hgext/convert/hg.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
109 hgext/convert/hg.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
111 hgext/convert/monotone.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
110 hgext/convert/monotone.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
112 hgext/convert/p*.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
111 hgext/convert/p*.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
113 hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
112 hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
114 hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob)
113 hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line *) (glob)
115 hgext/eol.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
114 hgext/eol.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
116 hgext/extdiff.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
115 hgext/extdiff.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
117 hgext/factotum.py: error importing: <ImportError> No module named 'cStringIO' (error at url.py:*) (glob)
116 hgext/factotum.py: error importing: <ImportError> No module named 'cStringIO' (error at url.py:*) (glob)
118 hgext/fetch.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob)
117 hgext/fetch.py: error importing module: <SyntaxError> invalid syntax (commands.py, line *) (line *) (glob)
119 hgext/fsmonitor/state.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
118 hgext/fsmonitor/state.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
120 hgext/fsmonitor/watchmanclient.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
119 hgext/fsmonitor/watchmanclient.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
121 hgext/gpg.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
120 hgext/gpg.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
122 hgext/graphlog.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
121 hgext/graphlog.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
123 hgext/hgcia.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
122 hgext/hgcia.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
124 hgext/hgk.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
123 hgext/hgk.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
125 hgext/highlight/highlight.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
124 hgext/highlight/highlight.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
126 hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
125 hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
127 hgext/keyword.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
126 hgext/keyword.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
128 hgext/largefiles/basestore.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
127 hgext/largefiles/basestore.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
129 hgext/largefiles/lfcommands.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
128 hgext/largefiles/lfcommands.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
130 hgext/largefiles/lfutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
129 hgext/largefiles/lfutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
131 hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob)
130 hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob)
132 hgext/largefiles/overrides.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
131 hgext/largefiles/overrides.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
133 hgext/largefiles/proto.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
132 hgext/largefiles/proto.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
134 hgext/largefiles/remotestore.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
133 hgext/largefiles/remotestore.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
135 hgext/largefiles/reposetup.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
134 hgext/largefiles/reposetup.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
136 hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob)
135 hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob)
137 hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob)
136 hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line *) (glob)
138 hgext/mq.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
137 hgext/mq.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
139 hgext/notify.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
138 hgext/notify.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
140 hgext/pager.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
139 hgext/pager.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
141 hgext/patchbomb.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
140 hgext/patchbomb.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
142 hgext/purge.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
141 hgext/purge.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
143 hgext/rebase.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
142 hgext/rebase.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
144 hgext/record.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
143 hgext/record.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
145 hgext/relink.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
144 hgext/relink.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
146 hgext/schemes.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
145 hgext/schemes.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
147 hgext/share.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
146 hgext/share.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
148 hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
147 hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
149 hgext/strip.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
148 hgext/strip.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
150 hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob)
149 hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle*.py, line *) (error at bundlerepo.py:*) (glob)
151 hgext/win*text.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
150 hgext/win*text.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
152 mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
151 mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
153 mercurial/bookmarks.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
152 mercurial/bookmarks.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
154 mercurial/branchmap.py: error importing: <ImportError> No module named 'Queue' (error at scmutil.py:*) (glob)
153 mercurial/branchmap.py: error importing: <ImportError> No module named 'Queue' (error at scmutil.py:*) (glob)
155 mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
154 mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
156 mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
155 mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
157 mercurial/byterange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
156 mercurial/byterange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
158 mercurial/changegroup.py: error importing: <ImportError> No module named 'Queue' (error at scmutil.py:*) (glob)
157 mercurial/changegroup.py: error importing: <ImportError> No module named 'Queue' (error at scmutil.py:*) (glob)
159 mercurial/changelog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
158 mercurial/changelog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
160 mercurial/cmdutil.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
159 mercurial/cmdutil.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
161 mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
160 mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
162 mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob)
161 mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line *) (glob)
163 mercurial/config.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
162 mercurial/config.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
164 mercurial/context.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
163 mercurial/context.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
165 mercurial/copies.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
164 mercurial/copies.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
166 mercurial/crecord.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
165 mercurial/crecord.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
167 mercurial/destutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
166 mercurial/destutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
168 mercurial/dirstate.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
167 mercurial/dirstate.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
169 mercurial/discovery.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
168 mercurial/discovery.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
170 mercurial/dispatch.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
169 mercurial/dispatch.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
171 mercurial/exchange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
170 mercurial/exchange.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
172 mercurial/extensions.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
171 mercurial/extensions.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
173 mercurial/filelog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
172 mercurial/filelog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
174 mercurial/filemerge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
173 mercurial/filemerge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
175 mercurial/fileset.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
174 mercurial/fileset.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
176 mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
175 mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line *) (glob)
177 mercurial/graphmod.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
176 mercurial/graphmod.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
178 mercurial/help.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
177 mercurial/help.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
179 mercurial/hg.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
178 mercurial/hg.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
180 mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob)
179 mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob)
181 mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
180 mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
182 mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
181 mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
183 mercurial/hgweb/protocol.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
182 mercurial/hgweb/protocol.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
184 mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
183 mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
185 mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob)
184 mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line *) (glob)
186 mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
185 mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
187 mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
186 mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
188 mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
187 mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line *) (glob)
189 mercurial/hook.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
188 mercurial/hook.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
190 mercurial/httpclient/_readers.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
189 mercurial/httpclient/_readers.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
191 mercurial/httpconnection.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
190 mercurial/httpconnection.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
192 mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
191 mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
193 mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
192 mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line *) (glob)
194 mercurial/localrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
193 mercurial/localrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
195 mercurial/lock.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
194 mercurial/lock.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
196 mercurial/mail.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
195 mercurial/mail.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
197 mercurial/manifest.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
196 mercurial/manifest.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
198 mercurial/match.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
197 mercurial/match.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
199 mercurial/mdiff.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
198 mercurial/mdiff.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
200 mercurial/merge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
199 mercurial/merge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
201 mercurial/minirst.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
200 mercurial/minirst.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
202 mercurial/namespaces.py: error importing: <ImportError> No module named 'cStringIO' (error at patch.py:*) (glob)
201 mercurial/namespaces.py: error importing: <ImportError> No module named 'cStringIO' (error at patch.py:*) (glob)
203 mercurial/obsolete.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
202 mercurial/obsolete.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
204 mercurial/patch.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
203 mercurial/patch.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
205 mercurial/pathutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
204 mercurial/pathutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
206 mercurial/peer.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
205 mercurial/peer.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
207 mercurial/pure/mpatch.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
206 mercurial/pure/mpatch.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
208 mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
207 mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
209 mercurial/pushkey.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
208 mercurial/pushkey.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
210 mercurial/pvec.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
209 mercurial/pvec.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
211 mercurial/registrar.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
210 mercurial/registrar.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
212 mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
211 mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
213 mercurial/repoview.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
212 mercurial/repoview.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
214 mercurial/revlog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
213 mercurial/revlog.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
215 mercurial/revset.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
214 mercurial/revset.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
216 mercurial/scmutil.py: error importing module: <ImportError> No module named 'Queue' (line *) (glob)
215 mercurial/scmutil.py: error importing module: <ImportError> No module named 'Queue' (line *) (glob)
217 mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob)
216 mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob)
218 mercurial/similar.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
217 mercurial/similar.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
219 mercurial/simplemerge.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
218 mercurial/simplemerge.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
220 mercurial/sshpeer.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
219 mercurial/sshpeer.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
221 mercurial/sshserver.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
220 mercurial/sshserver.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
222 mercurial/sslutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
221 mercurial/sslutil.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
223 mercurial/statichttprepo.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
222 mercurial/statichttprepo.py: error importing module: <ImportError> No module named 'urllib2' (line *) (glob)
224 mercurial/store.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
223 mercurial/store.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
225 mercurial/streamclone.py: error importing: <ImportError> No module named 'Queue' (error at scmutil.py:*) (glob)
224 mercurial/streamclone.py: error importing: <ImportError> No module named 'Queue' (error at scmutil.py:*) (glob)
226 mercurial/subrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
225 mercurial/subrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at cmdutil.py:*) (glob)
227 mercurial/tagmerge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
226 mercurial/tagmerge.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
228 mercurial/tags.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
227 mercurial/tags.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
229 mercurial/templatefilters.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
228 mercurial/templatefilters.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
230 mercurial/templatekw.py: error importing: <ImportError> No module named 'cStringIO' (error at patch.py:*) (glob)
229 mercurial/templatekw.py: error importing: <ImportError> No module named 'cStringIO' (error at patch.py:*) (glob)
231 mercurial/templater.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
230 mercurial/templater.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
232 mercurial/transaction.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
231 mercurial/transaction.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
233 mercurial/ui.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
232 mercurial/ui.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
234 mercurial/unionrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
233 mercurial/unionrepo.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
235 mercurial/url.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
234 mercurial/url.py: error importing module: <ImportError> No module named 'cStringIO' (line *) (glob)
236 mercurial/util.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
235 mercurial/util.py: error importing: <ImportError> No module named 'cStringIO' (error at parsers.py:*) (glob)
237 mercurial/verify.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
236 mercurial/verify.py: error importing: <ImportError> No module named 'cStringIO' (error at mpatch.py:*) (glob)
238 mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob)
237 mercurial/win*.py: error importing module: <ImportError> No module named 'msvcrt' (line *) (glob)
239 mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob)
238 mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line *) (glob)
240 mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
239 mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
241 tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
240 tests/readlink.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
242 tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
241 tests/test-demandimport.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
243 tests/test-hgweb-auth.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
242 tests/test-hgweb-auth.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
244 tests/test-hybridencode.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
243 tests/test-hybridencode.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
245 tests/test-lrucachedict.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
244 tests/test-lrucachedict.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
246 tests/test-minirst.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
245 tests/test-minirst.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
247 tests/test-parseindex*.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
246 tests/test-parseindex*.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
248 tests/test-propertycache.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
247 tests/test-propertycache.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
249 tests/test-revlog-ancestry.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
248 tests/test-revlog-ancestry.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
250 tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
249 tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (<unknown>, line *) (glob)
251 tests/test-trusted.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
250 tests/test-trusted.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
252
251
253 #endif
252 #endif
@@ -1,107 +1,114
1 from __future__ import absolute_import
2
1 from mercurial import demandimport; demandimport.enable()
3 from mercurial import demandimport; demandimport.enable()
2 import urllib2
4 import urllib2
3 from mercurial import ui, util
5 from mercurial import (
4 from mercurial import url
6 ui,
5 from mercurial.error import Abort
7 url,
8 util,
9 )
10 from mercurial.error import (
11 Abort,
12 )
6
13
7 class myui(ui.ui):
14 class myui(ui.ui):
8 def interactive(self):
15 def interactive(self):
9 return False
16 return False
10
17
11 origui = myui()
18 origui = myui()
12
19
13 def writeauth(items):
20 def writeauth(items):
14 ui = origui.copy()
21 ui = origui.copy()
15 for name, value in items.iteritems():
22 for name, value in items.iteritems():
16 ui.setconfig('auth', name, value)
23 ui.setconfig('auth', name, value)
17 return ui
24 return ui
18
25
19 def dumpdict(dict):
26 def dumpdict(dict):
20 return '{' + ', '.join(['%s: %s' % (k, dict[k])
27 return '{' + ', '.join(['%s: %s' % (k, dict[k])
21 for k in sorted(dict.iterkeys())]) + '}'
28 for k in sorted(dict.iterkeys())]) + '}'
22
29
23 def test(auth, urls=None):
30 def test(auth, urls=None):
24 print 'CFG:', dumpdict(auth)
31 print 'CFG:', dumpdict(auth)
25 prefixes = set()
32 prefixes = set()
26 for k in auth:
33 for k in auth:
27 prefixes.add(k.split('.', 1)[0])
34 prefixes.add(k.split('.', 1)[0])
28 for p in prefixes:
35 for p in prefixes:
29 for name in ('.username', '.password'):
36 for name in ('.username', '.password'):
30 if (p + name) not in auth:
37 if (p + name) not in auth:
31 auth[p + name] = p
38 auth[p + name] = p
32 auth = dict((k, v) for k, v in auth.iteritems() if v is not None)
39 auth = dict((k, v) for k, v in auth.iteritems() if v is not None)
33
40
34 ui = writeauth(auth)
41 ui = writeauth(auth)
35
42
36 def _test(uri):
43 def _test(uri):
37 print 'URI:', uri
44 print 'URI:', uri
38 try:
45 try:
39 pm = url.passwordmgr(ui)
46 pm = url.passwordmgr(ui)
40 u, authinfo = util.url(uri).authinfo()
47 u, authinfo = util.url(uri).authinfo()
41 if authinfo is not None:
48 if authinfo is not None:
42 pm.add_password(*authinfo)
49 pm.add_password(*authinfo)
43 print ' ', pm.find_user_password('test', u)
50 print ' ', pm.find_user_password('test', u)
44 except Abort:
51 except Abort:
45 print 'abort'
52 print 'abort'
46
53
47 if not urls:
54 if not urls:
48 urls = [
55 urls = [
49 'http://example.org/foo',
56 'http://example.org/foo',
50 'http://example.org/foo/bar',
57 'http://example.org/foo/bar',
51 'http://example.org/bar',
58 'http://example.org/bar',
52 'https://example.org/foo',
59 'https://example.org/foo',
53 'https://example.org/foo/bar',
60 'https://example.org/foo/bar',
54 'https://example.org/bar',
61 'https://example.org/bar',
55 'https://x@example.org/bar',
62 'https://x@example.org/bar',
56 'https://y@example.org/bar',
63 'https://y@example.org/bar',
57 ]
64 ]
58 for u in urls:
65 for u in urls:
59 _test(u)
66 _test(u)
60
67
61
68
62 print '\n*** Test in-uri schemes\n'
69 print '\n*** Test in-uri schemes\n'
63 test({'x.prefix': 'http://example.org'})
70 test({'x.prefix': 'http://example.org'})
64 test({'x.prefix': 'https://example.org'})
71 test({'x.prefix': 'https://example.org'})
65 test({'x.prefix': 'http://example.org', 'x.schemes': 'https'})
72 test({'x.prefix': 'http://example.org', 'x.schemes': 'https'})
66 test({'x.prefix': 'https://example.org', 'x.schemes': 'http'})
73 test({'x.prefix': 'https://example.org', 'x.schemes': 'http'})
67
74
68 print '\n*** Test separately configured schemes\n'
75 print '\n*** Test separately configured schemes\n'
69 test({'x.prefix': 'example.org', 'x.schemes': 'http'})
76 test({'x.prefix': 'example.org', 'x.schemes': 'http'})
70 test({'x.prefix': 'example.org', 'x.schemes': 'https'})
77 test({'x.prefix': 'example.org', 'x.schemes': 'https'})
71 test({'x.prefix': 'example.org', 'x.schemes': 'http https'})
78 test({'x.prefix': 'example.org', 'x.schemes': 'http https'})
72
79
73 print '\n*** Test prefix matching\n'
80 print '\n*** Test prefix matching\n'
74 test({'x.prefix': 'http://example.org/foo',
81 test({'x.prefix': 'http://example.org/foo',
75 'y.prefix': 'http://example.org/bar'})
82 'y.prefix': 'http://example.org/bar'})
76 test({'x.prefix': 'http://example.org/foo',
83 test({'x.prefix': 'http://example.org/foo',
77 'y.prefix': 'http://example.org/foo/bar'})
84 'y.prefix': 'http://example.org/foo/bar'})
78 test({'x.prefix': '*', 'y.prefix': 'https://example.org/bar'})
85 test({'x.prefix': '*', 'y.prefix': 'https://example.org/bar'})
79
86
80 print '\n*** Test user matching\n'
87 print '\n*** Test user matching\n'
81 test({'x.prefix': 'http://example.org/foo',
88 test({'x.prefix': 'http://example.org/foo',
82 'x.username': None,
89 'x.username': None,
83 'x.password': 'xpassword'},
90 'x.password': 'xpassword'},
84 urls=['http://y@example.org/foo'])
91 urls=['http://y@example.org/foo'])
85 test({'x.prefix': 'http://example.org/foo',
92 test({'x.prefix': 'http://example.org/foo',
86 'x.username': None,
93 'x.username': None,
87 'x.password': 'xpassword',
94 'x.password': 'xpassword',
88 'y.prefix': 'http://example.org/foo',
95 'y.prefix': 'http://example.org/foo',
89 'y.username': 'y',
96 'y.username': 'y',
90 'y.password': 'ypassword'},
97 'y.password': 'ypassword'},
91 urls=['http://y@example.org/foo'])
98 urls=['http://y@example.org/foo'])
92 test({'x.prefix': 'http://example.org/foo/bar',
99 test({'x.prefix': 'http://example.org/foo/bar',
93 'x.username': None,
100 'x.username': None,
94 'x.password': 'xpassword',
101 'x.password': 'xpassword',
95 'y.prefix': 'http://example.org/foo',
102 'y.prefix': 'http://example.org/foo',
96 'y.username': 'y',
103 'y.username': 'y',
97 'y.password': 'ypassword'},
104 'y.password': 'ypassword'},
98 urls=['http://y@example.org/foo/bar'])
105 urls=['http://y@example.org/foo/bar'])
99
106
100 def testauthinfo(fullurl, authurl):
107 def testauthinfo(fullurl, authurl):
101 print 'URIs:', fullurl, authurl
108 print 'URIs:', fullurl, authurl
102 pm = urllib2.HTTPPasswordMgrWithDefaultRealm()
109 pm = urllib2.HTTPPasswordMgrWithDefaultRealm()
103 pm.add_password(*util.url(fullurl).authinfo()[1])
110 pm.add_password(*util.url(fullurl).authinfo()[1])
104 print pm.find_user_password('test', authurl)
111 print pm.find_user_password('test', authurl)
105
112
106 print '\n*** Test urllib2 and util.url\n'
113 print '\n*** Test urllib2 and util.url\n'
107 testauthinfo('http://user@example.com:8080/foo', 'http://example.com:8080/foo')
114 testauthinfo('http://user@example.com:8080/foo', 'http://example.com:8080/foo')
General Comments 0
You need to be logged in to leave comments. Login now