##// END OF EJS Templates
py3: update test expectations for py3-commands test
Augie Fackler -
r32520:dc0da982 default
parent child Browse files
Show More
@@ -1,201 +1,198
1 #require py3exe
1 #require py3exe
2
2
3 This test helps in keeping a track on which commands we can run on
3 This test helps in keeping a track on which commands we can run on
4 Python 3 and see what kind of errors are coming up.
4 Python 3 and see what kind of errors are coming up.
5 The full traceback is hidden to have a stable output.
5 The full traceback is hidden to have a stable output.
6 $ HGBIN=`which hg`
6 $ HGBIN=`which hg`
7
7
8 $ for cmd in version debuginstall ; do
8 $ for cmd in version debuginstall ; do
9 > echo $cmd
9 > echo $cmd
10 > $PYTHON3 $HGBIN $cmd 2>&1 2>&1 | tail -1
10 > $PYTHON3 $HGBIN $cmd 2>&1 2>&1 | tail -1
11 > done
11 > done
12 version
12 version
13 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 debuginstall
14 debuginstall
15 no problems detected
15 no problems detected
16
16
17 #if test-repo
17 #if test-repo
18 Make a clone so that any features in the developer's .hg/hgrc that
18 Make a clone so that any features in the developer's .hg/hgrc that
19 might confuse Python 3 don't break this test. When we can do commit in
19 might confuse Python 3 don't break this test. When we can do commit in
20 Python 3, we'll stop doing this. We use e76ed1e480ef for the clone
20 Python 3, we'll stop doing this. We use e76ed1e480ef for the clone
21 because it has different files than 273ce12ad8f1, so we can test both
21 because it has different files than 273ce12ad8f1, so we can test both
22 `files` from dirstate and `files` loaded from a specific revision.
22 `files` from dirstate and `files` loaded from a specific revision.
23
23
24 $ hg clone -r e76ed1e480ef "`dirname "$TESTDIR"`" testrepo 2>&1 | tail -1
24 $ hg clone -r e76ed1e480ef "`dirname "$TESTDIR"`" testrepo 2>&1 | tail -1
25 15 files updated, 0 files merged, 0 files removed, 0 files unresolved
25 15 files updated, 0 files merged, 0 files removed, 0 files unresolved
26
26
27 Test using -R, which exercises some URL code:
27 Test using -R, which exercises some URL code:
28 $ $PYTHON3 $HGBIN -R testrepo files -r 273ce12ad8f1 | tail -1
28 $ $PYTHON3 $HGBIN -R testrepo files -r 273ce12ad8f1 | tail -1
29 testrepo/tkmerge
29 testrepo/tkmerge
30
30
31 Now prove `hg files` is reading the whole manifest. We have to grep
31 Now prove `hg files` is reading the whole manifest. We have to grep
32 out some potential warnings that come from hgrc as yet.
32 out some potential warnings that come from hgrc as yet.
33 $ cd testrepo
33 $ cd testrepo
34 $ $PYTHON3 $HGBIN files -r 273ce12ad8f1
34 $ $PYTHON3 $HGBIN files -r 273ce12ad8f1
35 .hgignore
35 .hgignore
36 PKG-INFO
36 PKG-INFO
37 README
37 README
38 hg
38 hg
39 mercurial/__init__.py
39 mercurial/__init__.py
40 mercurial/byterange.py
40 mercurial/byterange.py
41 mercurial/fancyopts.py
41 mercurial/fancyopts.py
42 mercurial/hg.py
42 mercurial/hg.py
43 mercurial/mdiff.py
43 mercurial/mdiff.py
44 mercurial/revlog.py
44 mercurial/revlog.py
45 mercurial/transaction.py
45 mercurial/transaction.py
46 notes.txt
46 notes.txt
47 setup.py
47 setup.py
48 tkmerge
48 tkmerge
49
49
50 $ $PYTHON3 $HGBIN files -r 273ce12ad8f1 | wc -l
50 $ $PYTHON3 $HGBIN files -r 273ce12ad8f1 | wc -l
51 \s*14 (re)
51 \s*14 (re)
52 $ $PYTHON3 $HGBIN files | wc -l
52 $ $PYTHON3 $HGBIN files | wc -l
53 \s*15 (re)
53 \s*15 (re)
54
54
55 Test if log-like commands work:
55 Test if log-like commands work:
56
56
57 $ $PYTHON3 $HGBIN tip
57 $ $PYTHON3 $HGBIN tip
58 changeset: 10:e76ed1e480ef
58 changeset: 10:e76ed1e480ef
59 tag: tip
59 tag: tip
60 user: oxymoron@cinder.waste.org
60 user: oxymoron@cinder.waste.org
61 date: Tue May 03 23:37:43 2005 -0800
61 date: Tue May 03 23:37:43 2005 -0800
62 summary: Fix linking of changeset revs when merging
62 summary: Fix linking of changeset revs when merging
63
63
64
64
65 $ $PYTHON3 $HGBIN log -r0
65 $ $PYTHON3 $HGBIN log -r0
66 changeset: 0:9117c6561b0b
66 changeset: 0:9117c6561b0b
67 user: mpm@selenic.com
67 user: mpm@selenic.com
68 date: Tue May 03 13:16:10 2005 -0800
68 date: Tue May 03 13:16:10 2005 -0800
69 summary: Add back links from file revisions to changeset revisions
69 summary: Add back links from file revisions to changeset revisions
70
70
71
71
72 $ cd ..
72 $ cd ..
73 #endif
73 #endif
74
74
75 Test if `hg config` works:
75 Test if `hg config` works:
76
76
77 $ $PYTHON3 $HGBIN config
77 $ $PYTHON3 $HGBIN config
78 defaults.backout=-d "0 0"
79 defaults.commit=-d "0 0"
80 defaults.shelve=--date "0 0"
81 defaults.tag=-d "0 0"
82 devel.all-warnings=true
78 devel.all-warnings=true
79 devel.default-date=0 0
83 largefiles.usercache=$TESTTMP/.cache/largefiles
80 largefiles.usercache=$TESTTMP/.cache/largefiles
84 ui.slash=True
81 ui.slash=True
85 ui.interactive=False
82 ui.interactive=False
86 ui.mergemarkers=detailed
83 ui.mergemarkers=detailed
87 ui.promptecho=True
84 ui.promptecho=True
88 web.address=localhost
85 web.address=localhost
89 web.ipv6=False
86 web.ipv6=False
90
87
91 $ cat > included-hgrc <<EOF
88 $ cat > included-hgrc <<EOF
92 > [extensions]
89 > [extensions]
93 > babar = imaginary_elephant
90 > babar = imaginary_elephant
94 > EOF
91 > EOF
95 $ cat >> $HGRCPATH <<EOF
92 $ cat >> $HGRCPATH <<EOF
96 > %include $TESTTMP/included-hgrc
93 > %include $TESTTMP/included-hgrc
97 > EOF
94 > EOF
98 $ $PYTHON3 $HGBIN version | tail -1
95 $ $PYTHON3 $HGBIN version | tail -1
99 *** failed to import extension babar from imaginary_elephant: *: 'imaginary_elephant' (glob)
96 *** failed to import extension babar from imaginary_elephant: *: 'imaginary_elephant' (glob)
100 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
97 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
101
98
102 $ rm included-hgrc
99 $ rm included-hgrc
103 $ touch included-hgrc
100 $ touch included-hgrc
104
101
105 Test bytes-ness of policy.policy with HGMODULEPOLICY
102 Test bytes-ness of policy.policy with HGMODULEPOLICY
106
103
107 $ HGMODULEPOLICY=py
104 $ HGMODULEPOLICY=py
108 $ export HGMODULEPOLICY
105 $ export HGMODULEPOLICY
109 $ $PYTHON3 `which hg` debuginstall 2>&1 2>&1 | tail -1
106 $ $PYTHON3 `which hg` debuginstall 2>&1 2>&1 | tail -1
110 no problems detected
107 no problems detected
111
108
112 `hg init` can create empty repos
109 `hg init` can create empty repos
113 `hg status works fine`
110 `hg status works fine`
114 `hg summary` also works!
111 `hg summary` also works!
115
112
116 $ $PYTHON3 `which hg` init py3repo
113 $ $PYTHON3 `which hg` init py3repo
117 $ cd py3repo
114 $ cd py3repo
118 $ echo "This is the file 'iota'." > iota
115 $ echo "This is the file 'iota'." > iota
119 $ $PYTHON3 $HGBIN status
116 $ $PYTHON3 $HGBIN status
120 ? iota
117 ? iota
121 $ $PYTHON3 $HGBIN add iota
118 $ $PYTHON3 $HGBIN add iota
122 $ $PYTHON3 $HGBIN status
119 $ $PYTHON3 $HGBIN status
123 A iota
120 A iota
124 $ $PYTHON3 $HGBIN commit --message 'commit performed in Python 3'
121 $ $PYTHON3 $HGBIN commit --message 'commit performed in Python 3'
125 $ $PYTHON3 $HGBIN status
122 $ $PYTHON3 $HGBIN status
126
123
127 $ mkdir A
124 $ mkdir A
128 $ echo "This is the file 'mu'." > A/mu
125 $ echo "This is the file 'mu'." > A/mu
129 $ $PYTHON3 $HGBIN addremove
126 $ $PYTHON3 $HGBIN addremove
130 adding A/mu
127 adding A/mu
131 $ $PYTHON3 $HGBIN status
128 $ $PYTHON3 $HGBIN status
132 A A/mu
129 A A/mu
133 $ HGEDITOR='echo message > ' $PYTHON3 $HGBIN commit
130 $ HGEDITOR='echo message > ' $PYTHON3 $HGBIN commit
134 $ $PYTHON3 $HGBIN status
131 $ $PYTHON3 $HGBIN status
135 $ $PYHON3 $HGBIN summary
132 $ $PYHON3 $HGBIN summary
136 parent: 1:e1e9167203d4 tip
133 parent: 1:e1e9167203d4 tip
137 message
134 message
138 branch: default
135 branch: default
139 commit: (clean)
136 commit: (clean)
140 update: (current)
137 update: (current)
141 phases: 2 draft
138 phases: 2 draft
142
139
143 Prove the repo is valid using the Python 2 `hg`:
140 Prove the repo is valid using the Python 2 `hg`:
144 $ hg verify
141 $ hg verify
145 checking changesets
142 checking changesets
146 checking manifests
143 checking manifests
147 crosschecking files in changesets and manifests
144 crosschecking files in changesets and manifests
148 checking files
145 checking files
149 2 files, 2 changesets, 2 total revisions
146 2 files, 2 changesets, 2 total revisions
150 $ hg log
147 $ hg log
151 changeset: 1:e1e9167203d4
148 changeset: 1:e1e9167203d4
152 tag: tip
149 tag: tip
153 user: test
150 user: test
154 date: Thu Jan 01 00:00:00 1970 +0000
151 date: Thu Jan 01 00:00:00 1970 +0000
155 summary: message
152 summary: message
156
153
157 changeset: 0:71c96e924262
154 changeset: 0:71c96e924262
158 user: test
155 user: test
159 date: Thu Jan 01 00:00:00 1970 +0000
156 date: Thu Jan 01 00:00:00 1970 +0000
160 summary: commit performed in Python 3
157 summary: commit performed in Python 3
161
158
162
159
163 $ hg log -G
160 $ hg log -G
164 @ changeset: 1:e1e9167203d4
161 @ changeset: 1:e1e9167203d4
165 | tag: tip
162 | tag: tip
166 | user: test
163 | user: test
167 | date: Thu Jan 01 00:00:00 1970 +0000
164 | date: Thu Jan 01 00:00:00 1970 +0000
168 | summary: message
165 | summary: message
169 |
166 |
170 o changeset: 0:71c96e924262
167 o changeset: 0:71c96e924262
171 user: test
168 user: test
172 date: Thu Jan 01 00:00:00 1970 +0000
169 date: Thu Jan 01 00:00:00 1970 +0000
173 summary: commit performed in Python 3
170 summary: commit performed in Python 3
174
171
175 $ hg log -Tjson
172 $ hg log -Tjson
176 [
173 [
177 {
174 {
178 "rev": 1,
175 "rev": 1,
179 "node": "e1e9167203d450ca2f558af628955b5f5afd4489",
176 "node": "e1e9167203d450ca2f558af628955b5f5afd4489",
180 "branch": "default",
177 "branch": "default",
181 "phase": "draft",
178 "phase": "draft",
182 "user": "test",
179 "user": "test",
183 "date": [0, 0],
180 "date": [0, 0],
184 "desc": "message",
181 "desc": "message",
185 "bookmarks": [],
182 "bookmarks": [],
186 "tags": ["tip"],
183 "tags": ["tip"],
187 "parents": ["71c96e924262969ff0d8d3d695b0f75412ccc3d8"]
184 "parents": ["71c96e924262969ff0d8d3d695b0f75412ccc3d8"]
188 },
185 },
189 {
186 {
190 "rev": 0,
187 "rev": 0,
191 "node": "71c96e924262969ff0d8d3d695b0f75412ccc3d8",
188 "node": "71c96e924262969ff0d8d3d695b0f75412ccc3d8",
192 "branch": "default",
189 "branch": "default",
193 "phase": "draft",
190 "phase": "draft",
194 "user": "test",
191 "user": "test",
195 "date": [0, 0],
192 "date": [0, 0],
196 "desc": "commit performed in Python 3",
193 "desc": "commit performed in Python 3",
197 "bookmarks": [],
194 "bookmarks": [],
198 "tags": [],
195 "tags": [],
199 "parents": ["0000000000000000000000000000000000000000"]
196 "parents": ["0000000000000000000000000000000000000000"]
200 }
197 }
201 ]
198 ]
General Comments 0
You need to be logged in to leave comments. Login now