##// END OF EJS Templates
py3: port test-batching.py to python3...
Augie Fackler -
r41366:b81ca9a3 default
parent child Browse files
Show More
@@ -1,719 +1,720 b''
1 test-abort-checkin.t
1 test-abort-checkin.t
2 test-absorb-edit-lines.t
2 test-absorb-edit-lines.t
3 test-absorb-filefixupstate.py
3 test-absorb-filefixupstate.py
4 test-absorb-phase.t
4 test-absorb-phase.t
5 test-absorb-rename.t
5 test-absorb-rename.t
6 test-absorb-strip.t
6 test-absorb-strip.t
7 test-absorb.t
7 test-absorb.t
8 test-add.t
8 test-add.t
9 test-addremove-similar.t
9 test-addremove-similar.t
10 test-addremove.t
10 test-addremove.t
11 test-alias.t
11 test-alias.t
12 test-amend-subrepo.t
12 test-amend-subrepo.t
13 test-amend.t
13 test-amend.t
14 test-ancestor.py
14 test-ancestor.py
15 test-annotate.py
15 test-annotate.py
16 test-annotate.t
16 test-annotate.t
17 test-arbitraryfilectx.t
17 test-arbitraryfilectx.t
18 test-archive-symlinks.t
18 test-archive-symlinks.t
19 test-archive.t
19 test-archive.t
20 test-atomictempfile.py
20 test-atomictempfile.py
21 test-audit-path.t
21 test-audit-path.t
22 test-audit-subrepo.t
22 test-audit-subrepo.t
23 test-automv.t
23 test-automv.t
24 test-backout.t
24 test-backout.t
25 test-backwards-remove.t
25 test-backwards-remove.t
26 test-bad-extension.t
26 test-bad-extension.t
27 test-bad-pull.t
27 test-bad-pull.t
28 test-basic.t
28 test-basic.t
29 test-batching.py
29 test-bdiff.py
30 test-bdiff.py
30 test-bheads.t
31 test-bheads.t
31 test-bisect.t
32 test-bisect.t
32 test-bisect2.t
33 test-bisect2.t
33 test-bisect3.t
34 test-bisect3.t
34 test-blackbox.t
35 test-blackbox.t
35 test-bookflow.t
36 test-bookflow.t
36 test-bookmarks-current.t
37 test-bookmarks-current.t
37 test-bookmarks-merge.t
38 test-bookmarks-merge.t
38 test-bookmarks-pushpull.t
39 test-bookmarks-pushpull.t
39 test-bookmarks-rebase.t
40 test-bookmarks-rebase.t
40 test-bookmarks-strip.t
41 test-bookmarks-strip.t
41 test-bookmarks.t
42 test-bookmarks.t
42 test-branch-change.t
43 test-branch-change.t
43 test-branch-option.t
44 test-branch-option.t
44 test-branch-tag-confict.t
45 test-branch-tag-confict.t
45 test-branches.t
46 test-branches.t
46 test-bundle-phases.t
47 test-bundle-phases.t
47 test-bundle-r.t
48 test-bundle-r.t
48 test-bundle-type.t
49 test-bundle-type.t
49 test-bundle-vs-outgoing.t
50 test-bundle-vs-outgoing.t
50 test-bundle.t
51 test-bundle.t
51 test-bundle2-exchange.t
52 test-bundle2-exchange.t
52 test-bundle2-format.t
53 test-bundle2-format.t
53 test-bundle2-multiple-changegroups.t
54 test-bundle2-multiple-changegroups.t
54 test-bundle2-pushback.t
55 test-bundle2-pushback.t
55 test-bundle2-remote-changegroup.t
56 test-bundle2-remote-changegroup.t
56 test-cache-abuse.t
57 test-cache-abuse.t
57 test-cappedreader.py
58 test-cappedreader.py
58 test-casecollision.t
59 test-casecollision.t
59 test-cat.t
60 test-cat.t
60 test-cbor.py
61 test-cbor.py
61 test-censor.t
62 test-censor.t
62 test-changelog-exec.t
63 test-changelog-exec.t
63 test-check-code.t
64 test-check-code.t
64 test-check-commit.t
65 test-check-commit.t
65 test-check-config.py
66 test-check-config.py
66 test-check-config.t
67 test-check-config.t
67 test-check-execute.t
68 test-check-execute.t
68 test-check-help.t
69 test-check-help.t
69 test-check-interfaces.py
70 test-check-interfaces.py
70 test-check-module-imports.t
71 test-check-module-imports.t
71 test-check-py3-compat.t
72 test-check-py3-compat.t
72 test-check-pyflakes.t
73 test-check-pyflakes.t
73 test-check-pylint.t
74 test-check-pylint.t
74 test-check-shbang.t
75 test-check-shbang.t
75 test-children.t
76 test-children.t
76 test-churn.t
77 test-churn.t
77 test-clone-cgi.t
78 test-clone-cgi.t
78 test-clone-pull-corruption.t
79 test-clone-pull-corruption.t
79 test-clone-r.t
80 test-clone-r.t
80 test-clone-uncompressed.t
81 test-clone-uncompressed.t
81 test-clone-update-order.t
82 test-clone-update-order.t
82 test-clone.t
83 test-clone.t
83 test-clonebundles.t
84 test-clonebundles.t
84 test-close-head.t
85 test-close-head.t
85 test-commandserver.t
86 test-commandserver.t
86 test-commit-amend.t
87 test-commit-amend.t
87 test-commit-interactive.t
88 test-commit-interactive.t
88 test-commit-multiple.t
89 test-commit-multiple.t
89 test-commit-unresolved.t
90 test-commit-unresolved.t
90 test-commit.t
91 test-commit.t
91 test-committer.t
92 test-committer.t
92 test-completion.t
93 test-completion.t
93 test-config-env.py
94 test-config-env.py
94 test-config.t
95 test-config.t
95 test-conflict.t
96 test-conflict.t
96 test-confused-revert.t
97 test-confused-revert.t
97 test-context-metadata.t
98 test-context-metadata.t
98 test-context.py
99 test-context.py
99 test-contrib-check-code.t
100 test-contrib-check-code.t
100 test-contrib-check-commit.t
101 test-contrib-check-commit.t
101 test-contrib-dumprevlog.t
102 test-contrib-dumprevlog.t
102 test-contrib-perf.t
103 test-contrib-perf.t
103 test-contrib-relnotes.t
104 test-contrib-relnotes.t
104 test-contrib-testparseutil.t
105 test-contrib-testparseutil.t
105 test-contrib.t
106 test-contrib.t
106 test-convert-authormap.t
107 test-convert-authormap.t
107 test-convert-clonebranches.t
108 test-convert-clonebranches.t
108 test-convert-cvs-branch.t
109 test-convert-cvs-branch.t
109 test-convert-cvs-detectmerge.t
110 test-convert-cvs-detectmerge.t
110 test-convert-cvs-synthetic.t
111 test-convert-cvs-synthetic.t
111 test-convert-cvs.t
112 test-convert-cvs.t
112 test-convert-cvsnt-mergepoints.t
113 test-convert-cvsnt-mergepoints.t
113 test-convert-datesort.t
114 test-convert-datesort.t
114 test-convert-filemap.t
115 test-convert-filemap.t
115 test-convert-hg-sink.t
116 test-convert-hg-sink.t
116 test-convert-hg-source.t
117 test-convert-hg-source.t
117 test-convert-hg-startrev.t
118 test-convert-hg-startrev.t
118 test-convert-splicemap.t
119 test-convert-splicemap.t
119 test-convert-svn-sink.t
120 test-convert-svn-sink.t
120 test-convert-tagsbranch-topology.t
121 test-convert-tagsbranch-topology.t
121 test-copy-move-merge.t
122 test-copy-move-merge.t
122 test-copy.t
123 test-copy.t
123 test-copytrace-heuristics.t
124 test-copytrace-heuristics.t
124 test-custom-filters.t
125 test-custom-filters.t
125 test-debugbuilddag.t
126 test-debugbuilddag.t
126 test-debugbundle.t
127 test-debugbundle.t
127 test-debugcommands.t
128 test-debugcommands.t
128 test-debugextensions.t
129 test-debugextensions.t
129 test-debugindexdot.t
130 test-debugindexdot.t
130 test-debugrename.t
131 test-debugrename.t
131 test-default-push.t
132 test-default-push.t
132 test-diff-antipatience.t
133 test-diff-antipatience.t
133 test-diff-binary-file.t
134 test-diff-binary-file.t
134 test-diff-change.t
135 test-diff-change.t
135 test-diff-color.t
136 test-diff-color.t
136 test-diff-copy-depth.t
137 test-diff-copy-depth.t
137 test-diff-hashes.t
138 test-diff-hashes.t
138 test-diff-ignore-whitespace.t
139 test-diff-ignore-whitespace.t
139 test-diff-indent-heuristic.t
140 test-diff-indent-heuristic.t
140 test-diff-issue2761.t
141 test-diff-issue2761.t
141 test-diff-newlines.t
142 test-diff-newlines.t
142 test-diff-reverse.t
143 test-diff-reverse.t
143 test-diff-subdir.t
144 test-diff-subdir.t
144 test-diff-unified.t
145 test-diff-unified.t
145 test-diff-upgrade.t
146 test-diff-upgrade.t
146 test-diffdir.t
147 test-diffdir.t
147 test-diffstat.t
148 test-diffstat.t
148 test-directaccess.t
149 test-directaccess.t
149 test-dirstate-backup.t
150 test-dirstate-backup.t
150 test-dirstate-nonnormalset.t
151 test-dirstate-nonnormalset.t
151 test-dirstate-race.t
152 test-dirstate-race.t
152 test-dirstate.t
153 test-dirstate.t
153 test-dispatch.py
154 test-dispatch.py
154 test-doctest.py
155 test-doctest.py
155 test-double-merge.t
156 test-double-merge.t
156 test-drawdag.t
157 test-drawdag.t
157 test-duplicateoptions.py
158 test-duplicateoptions.py
158 test-editor-filename.t
159 test-editor-filename.t
159 test-empty-dir.t
160 test-empty-dir.t
160 test-empty-file.t
161 test-empty-file.t
161 test-empty-group.t
162 test-empty-group.t
162 test-empty.t
163 test-empty.t
163 test-encode.t
164 test-encode.t
164 test-encoding-func.py
165 test-encoding-func.py
165 test-encoding-textwrap.t
166 test-encoding-textwrap.t
166 test-encoding.t
167 test-encoding.t
167 test-eol-add.t
168 test-eol-add.t
168 test-eol-clone.t
169 test-eol-clone.t
169 test-eol-hook.t
170 test-eol-hook.t
170 test-eol-patch.t
171 test-eol-patch.t
171 test-eol-tag.t
172 test-eol-tag.t
172 test-eol-update.t
173 test-eol-update.t
173 test-eol.t
174 test-eol.t
174 test-eolfilename.t
175 test-eolfilename.t
175 test-excessive-merge.t
176 test-excessive-merge.t
176 test-exchange-obsmarkers-case-A1.t
177 test-exchange-obsmarkers-case-A1.t
177 test-exchange-obsmarkers-case-A2.t
178 test-exchange-obsmarkers-case-A2.t
178 test-exchange-obsmarkers-case-A3.t
179 test-exchange-obsmarkers-case-A3.t
179 test-exchange-obsmarkers-case-A4.t
180 test-exchange-obsmarkers-case-A4.t
180 test-exchange-obsmarkers-case-A5.t
181 test-exchange-obsmarkers-case-A5.t
181 test-exchange-obsmarkers-case-A6.t
182 test-exchange-obsmarkers-case-A6.t
182 test-exchange-obsmarkers-case-A7.t
183 test-exchange-obsmarkers-case-A7.t
183 test-exchange-obsmarkers-case-B1.t
184 test-exchange-obsmarkers-case-B1.t
184 test-exchange-obsmarkers-case-B2.t
185 test-exchange-obsmarkers-case-B2.t
185 test-exchange-obsmarkers-case-B3.t
186 test-exchange-obsmarkers-case-B3.t
186 test-exchange-obsmarkers-case-B4.t
187 test-exchange-obsmarkers-case-B4.t
187 test-exchange-obsmarkers-case-B5.t
188 test-exchange-obsmarkers-case-B5.t
188 test-exchange-obsmarkers-case-B6.t
189 test-exchange-obsmarkers-case-B6.t
189 test-exchange-obsmarkers-case-B7.t
190 test-exchange-obsmarkers-case-B7.t
190 test-exchange-obsmarkers-case-C1.t
191 test-exchange-obsmarkers-case-C1.t
191 test-exchange-obsmarkers-case-C2.t
192 test-exchange-obsmarkers-case-C2.t
192 test-exchange-obsmarkers-case-C3.t
193 test-exchange-obsmarkers-case-C3.t
193 test-exchange-obsmarkers-case-C4.t
194 test-exchange-obsmarkers-case-C4.t
194 test-exchange-obsmarkers-case-D1.t
195 test-exchange-obsmarkers-case-D1.t
195 test-exchange-obsmarkers-case-D2.t
196 test-exchange-obsmarkers-case-D2.t
196 test-exchange-obsmarkers-case-D3.t
197 test-exchange-obsmarkers-case-D3.t
197 test-exchange-obsmarkers-case-D4.t
198 test-exchange-obsmarkers-case-D4.t
198 test-execute-bit.t
199 test-execute-bit.t
199 test-export.t
200 test-export.t
200 test-extdata.t
201 test-extdata.t
201 test-extdiff.t
202 test-extdiff.t
202 test-extension-timing.t
203 test-extension-timing.t
203 test-extensions-afterloaded.t
204 test-extensions-afterloaded.t
204 test-extensions-wrapfunction.py
205 test-extensions-wrapfunction.py
205 test-extra-filelog-entry.t
206 test-extra-filelog-entry.t
206 test-fastannotate-corrupt.t
207 test-fastannotate-corrupt.t
207 test-fastannotate-diffopts.t
208 test-fastannotate-diffopts.t
208 test-fastannotate-hg.t
209 test-fastannotate-hg.t
209 test-fastannotate-perfhack.t
210 test-fastannotate-perfhack.t
210 test-fastannotate-protocol.t
211 test-fastannotate-protocol.t
211 test-fastannotate-renames.t
212 test-fastannotate-renames.t
212 test-fastannotate-revmap.py
213 test-fastannotate-revmap.py
213 test-fastannotate.t
214 test-fastannotate.t
214 test-fetch.t
215 test-fetch.t
215 test-filebranch.t
216 test-filebranch.t
216 test-filecache.py
217 test-filecache.py
217 test-filelog.py
218 test-filelog.py
218 test-fileset-generated.t
219 test-fileset-generated.t
219 test-fileset.t
220 test-fileset.t
220 test-fix-topology.t
221 test-fix-topology.t
221 test-fix.t
222 test-fix.t
222 test-flags.t
223 test-flags.t
223 test-fncache.t
224 test-fncache.t
224 test-gendoc-da.t
225 test-gendoc-da.t
225 test-gendoc-de.t
226 test-gendoc-de.t
226 test-gendoc-el.t
227 test-gendoc-el.t
227 test-gendoc-fr.t
228 test-gendoc-fr.t
228 test-gendoc-it.t
229 test-gendoc-it.t
229 test-gendoc-ja.t
230 test-gendoc-ja.t
230 test-gendoc-pt_BR.t
231 test-gendoc-pt_BR.t
231 test-gendoc-ro.t
232 test-gendoc-ro.t
232 test-gendoc-ru.t
233 test-gendoc-ru.t
233 test-gendoc-sv.t
234 test-gendoc-sv.t
234 test-gendoc-zh_CN.t
235 test-gendoc-zh_CN.t
235 test-gendoc-zh_TW.t
236 test-gendoc-zh_TW.t
236 test-gendoc.t
237 test-gendoc.t
237 test-generaldelta.t
238 test-generaldelta.t
238 test-getbundle.t
239 test-getbundle.t
239 test-git-export.t
240 test-git-export.t
240 test-globalopts.t
241 test-globalopts.t
241 test-glog-beautifygraph.t
242 test-glog-beautifygraph.t
242 test-glog-topological.t
243 test-glog-topological.t
243 test-glog.t
244 test-glog.t
244 test-gpg.t
245 test-gpg.t
245 test-graft.t
246 test-graft.t
246 test-grep.t
247 test-grep.t
247 test-hardlinks.t
248 test-hardlinks.t
248 test-help-hide.t
249 test-help-hide.t
249 test-help.t
250 test-help.t
250 test-hg-parseurl.py
251 test-hg-parseurl.py
251 test-hghave.t
252 test-hghave.t
252 test-hgignore.t
253 test-hgignore.t
253 test-hgk.t
254 test-hgk.t
254 test-hgrc.t
255 test-hgrc.t
255 test-hgweb-annotate-whitespace.t
256 test-hgweb-annotate-whitespace.t
256 test-hgweb-bundle.t
257 test-hgweb-bundle.t
257 test-hgweb-commands.t
258 test-hgweb-commands.t
258 test-hgweb-csp.t
259 test-hgweb-csp.t
259 test-hgweb-descend-empties.t
260 test-hgweb-descend-empties.t
260 test-hgweb-diffs.t
261 test-hgweb-diffs.t
261 test-hgweb-empty.t
262 test-hgweb-empty.t
262 test-hgweb-filelog.t
263 test-hgweb-filelog.t
263 test-hgweb-no-path-info.t
264 test-hgweb-no-path-info.t
264 test-hgweb-no-request-uri.t
265 test-hgweb-no-request-uri.t
265 test-hgweb-non-interactive.t
266 test-hgweb-non-interactive.t
266 test-hgweb-raw.t
267 test-hgweb-raw.t
267 test-hgweb-removed.t
268 test-hgweb-removed.t
268 test-hgweb-symrev.t
269 test-hgweb-symrev.t
269 test-hgweb.t
270 test-hgweb.t
270 test-hgwebdir-paths.py
271 test-hgwebdir-paths.py
271 test-hgwebdir.t
272 test-hgwebdir.t
272 test-hgwebdirsym.t
273 test-hgwebdirsym.t
273 test-histedit-arguments.t
274 test-histedit-arguments.t
274 test-histedit-base.t
275 test-histedit-base.t
275 test-histedit-bookmark-motion.t
276 test-histedit-bookmark-motion.t
276 test-histedit-commute.t
277 test-histedit-commute.t
277 test-histedit-drop.t
278 test-histedit-drop.t
278 test-histedit-edit.t
279 test-histedit-edit.t
279 test-histedit-fold-non-commute.t
280 test-histedit-fold-non-commute.t
280 test-histedit-fold.t
281 test-histedit-fold.t
281 test-histedit-no-backup.t
282 test-histedit-no-backup.t
282 test-histedit-no-change.t
283 test-histedit-no-change.t
283 test-histedit-non-commute-abort.t
284 test-histedit-non-commute-abort.t
284 test-histedit-non-commute.t
285 test-histedit-non-commute.t
285 test-histedit-obsolete.t
286 test-histedit-obsolete.t
286 test-histedit-outgoing.t
287 test-histedit-outgoing.t
287 test-histedit-templates.t
288 test-histedit-templates.t
288 test-http-api.t
289 test-http-api.t
289 test-http-branchmap.t
290 test-http-branchmap.t
290 test-http-bundle1.t
291 test-http-bundle1.t
291 test-http-clone-r.t
292 test-http-clone-r.t
292 test-http-permissions.t
293 test-http-permissions.t
293 test-http.t
294 test-http.t
294 test-hybridencode.py
295 test-hybridencode.py
295 test-i18n.t
296 test-i18n.t
296 test-identify.t
297 test-identify.t
297 test-impexp-branch.t
298 test-impexp-branch.t
298 test-import-bypass.t
299 test-import-bypass.t
299 test-import-context.t
300 test-import-context.t
300 test-import-eol.t
301 test-import-eol.t
301 test-import-merge.t
302 test-import-merge.t
302 test-import-unknown.t
303 test-import-unknown.t
303 test-import.t
304 test-import.t
304 test-imports-checker.t
305 test-imports-checker.t
305 test-incoming-outgoing.t
306 test-incoming-outgoing.t
306 test-infinitepush-bundlestore.t
307 test-infinitepush-bundlestore.t
307 test-infinitepush-ci.t
308 test-infinitepush-ci.t
308 test-infinitepush.t
309 test-infinitepush.t
309 test-inherit-mode.t
310 test-inherit-mode.t
310 test-init.t
311 test-init.t
311 test-install.t
312 test-install.t
312 test-issue1089.t
313 test-issue1089.t
313 test-issue1102.t
314 test-issue1102.t
314 test-issue1175.t
315 test-issue1175.t
315 test-issue1306.t
316 test-issue1306.t
316 test-issue1438.t
317 test-issue1438.t
317 test-issue1502.t
318 test-issue1502.t
318 test-issue1802.t
319 test-issue1802.t
319 test-issue1877.t
320 test-issue1877.t
320 test-issue1993.t
321 test-issue1993.t
321 test-issue2137.t
322 test-issue2137.t
322 test-issue3084.t
323 test-issue3084.t
323 test-issue4074.t
324 test-issue4074.t
324 test-issue522.t
325 test-issue522.t
325 test-issue586.t
326 test-issue586.t
326 test-issue5979.t
327 test-issue5979.t
327 test-issue612.t
328 test-issue612.t
328 test-issue619.t
329 test-issue619.t
329 test-issue660.t
330 test-issue660.t
330 test-issue672.t
331 test-issue672.t
331 test-issue842.t
332 test-issue842.t
332 test-journal-exists.t
333 test-journal-exists.t
333 test-journal-share.t
334 test-journal-share.t
334 test-journal.t
335 test-journal.t
335 test-keyword.t
336 test-keyword.t
336 test-known.t
337 test-known.t
337 test-largefiles-cache.t
338 test-largefiles-cache.t
338 test-largefiles-misc.t
339 test-largefiles-misc.t
339 test-largefiles-small-disk.t
340 test-largefiles-small-disk.t
340 test-largefiles-update.t
341 test-largefiles-update.t
341 test-largefiles-wireproto.t
342 test-largefiles-wireproto.t
342 test-largefiles.t
343 test-largefiles.t
343 test-lfconvert.t
344 test-lfconvert.t
344 test-lfs-bundle.t
345 test-lfs-bundle.t
345 test-lfs-largefiles.t
346 test-lfs-largefiles.t
346 test-lfs-pointer.py
347 test-lfs-pointer.py
347 test-lfs.t
348 test-lfs.t
348 test-linelog.py
349 test-linelog.py
349 test-linerange.py
350 test-linerange.py
350 test-locate.t
351 test-locate.t
351 test-lock-badness.t
352 test-lock-badness.t
352 test-log-exthook.t
353 test-log-exthook.t
353 test-log-linerange.t
354 test-log-linerange.t
354 test-log.t
355 test-log.t
355 test-logexchange.t
356 test-logexchange.t
356 test-logtoprocess.t
357 test-logtoprocess.t
357 test-lrucachedict.py
358 test-lrucachedict.py
358 test-mactext.t
359 test-mactext.t
359 test-mailmap.t
360 test-mailmap.t
360 test-manifest-merging.t
361 test-manifest-merging.t
361 test-manifest.py
362 test-manifest.py
362 test-manifest.t
363 test-manifest.t
363 test-match.py
364 test-match.py
364 test-mdiff.py
365 test-mdiff.py
365 test-merge-changedelete.t
366 test-merge-changedelete.t
366 test-merge-closedheads.t
367 test-merge-closedheads.t
367 test-merge-commit.t
368 test-merge-commit.t
368 test-merge-criss-cross.t
369 test-merge-criss-cross.t
369 test-merge-default.t
370 test-merge-default.t
370 test-merge-force.t
371 test-merge-force.t
371 test-merge-halt.t
372 test-merge-halt.t
372 test-merge-internal-tools-pattern.t
373 test-merge-internal-tools-pattern.t
373 test-merge-local.t
374 test-merge-local.t
374 test-merge-no-file-change.t
375 test-merge-no-file-change.t
375 test-merge-remove.t
376 test-merge-remove.t
376 test-merge-revert.t
377 test-merge-revert.t
377 test-merge-revert2.t
378 test-merge-revert2.t
378 test-merge-subrepos.t
379 test-merge-subrepos.t
379 test-merge-symlinks.t
380 test-merge-symlinks.t
380 test-merge-tools.t
381 test-merge-tools.t
381 test-merge-types.t
382 test-merge-types.t
382 test-merge1.t
383 test-merge1.t
383 test-merge10.t
384 test-merge10.t
384 test-merge2.t
385 test-merge2.t
385 test-merge4.t
386 test-merge4.t
386 test-merge5.t
387 test-merge5.t
387 test-merge6.t
388 test-merge6.t
388 test-merge7.t
389 test-merge7.t
389 test-merge8.t
390 test-merge8.t
390 test-merge9.t
391 test-merge9.t
391 test-minifileset.py
392 test-minifileset.py
392 test-minirst.py
393 test-minirst.py
393 test-missing-capability.t
394 test-missing-capability.t
394 test-mq-git.t
395 test-mq-git.t
395 test-mq-guards.t
396 test-mq-guards.t
396 test-mq-header-date.t
397 test-mq-header-date.t
397 test-mq-header-from.t
398 test-mq-header-from.t
398 test-mq-merge.t
399 test-mq-merge.t
399 test-mq-missingfiles.t
400 test-mq-missingfiles.t
400 test-mq-pull-from-bundle.t
401 test-mq-pull-from-bundle.t
401 test-mq-qclone-http.t
402 test-mq-qclone-http.t
402 test-mq-qdelete.t
403 test-mq-qdelete.t
403 test-mq-qdiff.t
404 test-mq-qdiff.t
404 test-mq-qfold.t
405 test-mq-qfold.t
405 test-mq-qgoto.t
406 test-mq-qgoto.t
406 test-mq-qimport-fail-cleanup.t
407 test-mq-qimport-fail-cleanup.t
407 test-mq-qimport.t
408 test-mq-qimport.t
408 test-mq-qnew.t
409 test-mq-qnew.t
409 test-mq-qpush-exact.t
410 test-mq-qpush-exact.t
410 test-mq-qpush-fail.t
411 test-mq-qpush-fail.t
411 test-mq-qqueue.t
412 test-mq-qqueue.t
412 test-mq-qrefresh-interactive.t
413 test-mq-qrefresh-interactive.t
413 test-mq-qrefresh-replace-log-message.t
414 test-mq-qrefresh-replace-log-message.t
414 test-mq-qrefresh.t
415 test-mq-qrefresh.t
415 test-mq-qrename.t
416 test-mq-qrename.t
416 test-mq-qsave.t
417 test-mq-qsave.t
417 test-mq-safety.t
418 test-mq-safety.t
418 test-mq-subrepo.t
419 test-mq-subrepo.t
419 test-mq-symlinks.t
420 test-mq-symlinks.t
420 test-mq.t
421 test-mq.t
421 test-mv-cp-st-diff.t
422 test-mv-cp-st-diff.t
422 test-narrow-acl.t
423 test-narrow-acl.t
423 test-narrow-archive.t
424 test-narrow-archive.t
424 test-narrow-clone-no-ellipsis.t
425 test-narrow-clone-no-ellipsis.t
425 test-narrow-clone-non-narrow-server.t
426 test-narrow-clone-non-narrow-server.t
426 test-narrow-clone-nonlinear.t
427 test-narrow-clone-nonlinear.t
427 test-narrow-clone-stream.t
428 test-narrow-clone-stream.t
428 test-narrow-clone.t
429 test-narrow-clone.t
429 test-narrow-commit.t
430 test-narrow-commit.t
430 test-narrow-copies.t
431 test-narrow-copies.t
431 test-narrow-debugcommands.t
432 test-narrow-debugcommands.t
432 test-narrow-debugrebuilddirstate.t
433 test-narrow-debugrebuilddirstate.t
433 test-narrow-exchange-merges.t
434 test-narrow-exchange-merges.t
434 test-narrow-exchange.t
435 test-narrow-exchange.t
435 test-narrow-expanddirstate.t
436 test-narrow-expanddirstate.t
436 test-narrow-merge.t
437 test-narrow-merge.t
437 test-narrow-patch.t
438 test-narrow-patch.t
438 test-narrow-patterns.t
439 test-narrow-patterns.t
439 test-narrow-pull.t
440 test-narrow-pull.t
440 test-narrow-rebase.t
441 test-narrow-rebase.t
441 test-narrow-shallow-merges.t
442 test-narrow-shallow-merges.t
442 test-narrow-shallow.t
443 test-narrow-shallow.t
443 test-narrow-share.t
444 test-narrow-share.t
444 test-narrow-sparse.t
445 test-narrow-sparse.t
445 test-narrow-strip.t
446 test-narrow-strip.t
446 test-narrow-trackedcmd.t
447 test-narrow-trackedcmd.t
447 test-narrow-update.t
448 test-narrow-update.t
448 test-narrow-widen-no-ellipsis.t
449 test-narrow-widen-no-ellipsis.t
449 test-narrow-widen.t
450 test-narrow-widen.t
450 test-narrow.t
451 test-narrow.t
451 test-nested-repo.t
452 test-nested-repo.t
452 test-newbranch.t
453 test-newbranch.t
453 test-newercgi.t
454 test-newercgi.t
454 test-nointerrupt.t
455 test-nointerrupt.t
455 test-obshistory.t
456 test-obshistory.t
456 test-obsmarker-template.t
457 test-obsmarker-template.t
457 test-obsmarkers-effectflag.t
458 test-obsmarkers-effectflag.t
458 test-obsolete-bounds-checking.t
459 test-obsolete-bounds-checking.t
459 test-obsolete-bundle-strip.t
460 test-obsolete-bundle-strip.t
460 test-obsolete-changeset-exchange.t
461 test-obsolete-changeset-exchange.t
461 test-obsolete-checkheads.t
462 test-obsolete-checkheads.t
462 test-obsolete-distributed.t
463 test-obsolete-distributed.t
463 test-obsolete-divergent.t
464 test-obsolete-divergent.t
464 test-obsolete-tag-cache.t
465 test-obsolete-tag-cache.t
465 test-obsolete.t
466 test-obsolete.t
466 test-origbackup-conflict.t
467 test-origbackup-conflict.t
467 test-pager-legacy.t
468 test-pager-legacy.t
468 test-pager.t
469 test-pager.t
469 test-parents.t
470 test-parents.t
470 test-parse-date.t
471 test-parse-date.t
471 test-parseindex2.py
472 test-parseindex2.py
472 test-patch-offset.t
473 test-patch-offset.t
473 test-patch.t
474 test-patch.t
474 test-patchbomb-bookmark.t
475 test-patchbomb-bookmark.t
475 test-patchbomb-tls.t
476 test-patchbomb-tls.t
476 test-patchbomb.t
477 test-patchbomb.t
477 test-pathconflicts-basic.t
478 test-pathconflicts-basic.t
478 test-pathconflicts-merge.t
479 test-pathconflicts-merge.t
479 test-pathconflicts-update.t
480 test-pathconflicts-update.t
480 test-pathencode.py
481 test-pathencode.py
481 test-pending.t
482 test-pending.t
482 test-permissions.t
483 test-permissions.t
483 test-phases-exchange.t
484 test-phases-exchange.t
484 test-phases.t
485 test-phases.t
485 test-profile.t
486 test-profile.t
486 test-progress.t
487 test-progress.t
487 test-propertycache.py
488 test-propertycache.py
488 test-pull-branch.t
489 test-pull-branch.t
489 test-pull-http.t
490 test-pull-http.t
490 test-pull-permission.t
491 test-pull-permission.t
491 test-pull-pull-corruption.t
492 test-pull-pull-corruption.t
492 test-pull-r.t
493 test-pull-r.t
493 test-pull-update.t
494 test-pull-update.t
494 test-pull.t
495 test-pull.t
495 test-purge.t
496 test-purge.t
496 test-push-cgi.t
497 test-push-cgi.t
497 test-push-checkheads-partial-C1.t
498 test-push-checkheads-partial-C1.t
498 test-push-checkheads-partial-C2.t
499 test-push-checkheads-partial-C2.t
499 test-push-checkheads-partial-C3.t
500 test-push-checkheads-partial-C3.t
500 test-push-checkheads-partial-C4.t
501 test-push-checkheads-partial-C4.t
501 test-push-checkheads-pruned-B1.t
502 test-push-checkheads-pruned-B1.t
502 test-push-checkheads-pruned-B2.t
503 test-push-checkheads-pruned-B2.t
503 test-push-checkheads-pruned-B3.t
504 test-push-checkheads-pruned-B3.t
504 test-push-checkheads-pruned-B4.t
505 test-push-checkheads-pruned-B4.t
505 test-push-checkheads-pruned-B5.t
506 test-push-checkheads-pruned-B5.t
506 test-push-checkheads-pruned-B6.t
507 test-push-checkheads-pruned-B6.t
507 test-push-checkheads-pruned-B7.t
508 test-push-checkheads-pruned-B7.t
508 test-push-checkheads-pruned-B8.t
509 test-push-checkheads-pruned-B8.t
509 test-push-checkheads-superceed-A1.t
510 test-push-checkheads-superceed-A1.t
510 test-push-checkheads-superceed-A2.t
511 test-push-checkheads-superceed-A2.t
511 test-push-checkheads-superceed-A3.t
512 test-push-checkheads-superceed-A3.t
512 test-push-checkheads-superceed-A4.t
513 test-push-checkheads-superceed-A4.t
513 test-push-checkheads-superceed-A5.t
514 test-push-checkheads-superceed-A5.t
514 test-push-checkheads-superceed-A6.t
515 test-push-checkheads-superceed-A6.t
515 test-push-checkheads-superceed-A7.t
516 test-push-checkheads-superceed-A7.t
516 test-push-checkheads-superceed-A8.t
517 test-push-checkheads-superceed-A8.t
517 test-push-checkheads-unpushed-D1.t
518 test-push-checkheads-unpushed-D1.t
518 test-push-checkheads-unpushed-D2.t
519 test-push-checkheads-unpushed-D2.t
519 test-push-checkheads-unpushed-D3.t
520 test-push-checkheads-unpushed-D3.t
520 test-push-checkheads-unpushed-D4.t
521 test-push-checkheads-unpushed-D4.t
521 test-push-checkheads-unpushed-D5.t
522 test-push-checkheads-unpushed-D5.t
522 test-push-checkheads-unpushed-D6.t
523 test-push-checkheads-unpushed-D6.t
523 test-push-checkheads-unpushed-D7.t
524 test-push-checkheads-unpushed-D7.t
524 test-push-http.t
525 test-push-http.t
525 test-push-race.t
526 test-push-race.t
526 test-push-warn.t
527 test-push-warn.t
527 test-push.t
528 test-push.t
528 test-pushvars.t
529 test-pushvars.t
529 test-qrecord.t
530 test-qrecord.t
530 test-rebase-abort.t
531 test-rebase-abort.t
531 test-rebase-backup.t
532 test-rebase-backup.t
532 test-rebase-base-flag.t
533 test-rebase-base-flag.t
533 test-rebase-bookmarks.t
534 test-rebase-bookmarks.t
534 test-rebase-brute-force.t
535 test-rebase-brute-force.t
535 test-rebase-cache.t
536 test-rebase-cache.t
536 test-rebase-check-restore.t
537 test-rebase-check-restore.t
537 test-rebase-collapse.t
538 test-rebase-collapse.t
538 test-rebase-conflicts.t
539 test-rebase-conflicts.t
539 test-rebase-dest.t
540 test-rebase-dest.t
540 test-rebase-detach.t
541 test-rebase-detach.t
541 test-rebase-emptycommit.t
542 test-rebase-emptycommit.t
542 test-rebase-inmemory.t
543 test-rebase-inmemory.t
543 test-rebase-interruptions.t
544 test-rebase-interruptions.t
544 test-rebase-issue-noparam-single-rev.t
545 test-rebase-issue-noparam-single-rev.t
545 test-rebase-legacy.t
546 test-rebase-legacy.t
546 test-rebase-mq-skip.t
547 test-rebase-mq-skip.t
547 test-rebase-mq.t
548 test-rebase-mq.t
548 test-rebase-named-branches.t
549 test-rebase-named-branches.t
549 test-rebase-newancestor.t
550 test-rebase-newancestor.t
550 test-rebase-obsolete.t
551 test-rebase-obsolete.t
551 test-rebase-parameters.t
552 test-rebase-parameters.t
552 test-rebase-partial.t
553 test-rebase-partial.t
553 test-rebase-pull.t
554 test-rebase-pull.t
554 test-rebase-rename.t
555 test-rebase-rename.t
555 test-rebase-scenario-global.t
556 test-rebase-scenario-global.t
556 test-rebase-templates.t
557 test-rebase-templates.t
557 test-rebase-transaction.t
558 test-rebase-transaction.t
558 test-rebuildstate.t
559 test-rebuildstate.t
559 test-record.t
560 test-record.t
560 test-releasenotes-formatting.t
561 test-releasenotes-formatting.t
561 test-releasenotes-merging.t
562 test-releasenotes-merging.t
562 test-releasenotes-parsing.t
563 test-releasenotes-parsing.t
563 test-relink.t
564 test-relink.t
564 test-remotefilelog-bad-configs.t
565 test-remotefilelog-bad-configs.t
565 test-remotefilelog-bgprefetch.t
566 test-remotefilelog-bgprefetch.t
566 test-remotefilelog-blame.t
567 test-remotefilelog-blame.t
567 test-remotefilelog-bundle2.t
568 test-remotefilelog-bundle2.t
568 test-remotefilelog-bundles.t
569 test-remotefilelog-bundles.t
569 test-remotefilelog-cacheprocess.t
570 test-remotefilelog-cacheprocess.t
570 test-remotefilelog-clone-tree.t
571 test-remotefilelog-clone-tree.t
571 test-remotefilelog-clone.t
572 test-remotefilelog-clone.t
572 test-remotefilelog-gcrepack.t
573 test-remotefilelog-gcrepack.t
573 test-remotefilelog-histpack.py
574 test-remotefilelog-histpack.py
574 test-remotefilelog-http.t
575 test-remotefilelog-http.t
575 test-remotefilelog-keepset.t
576 test-remotefilelog-keepset.t
576 test-remotefilelog-local.t
577 test-remotefilelog-local.t
577 test-remotefilelog-log.t
578 test-remotefilelog-log.t
578 test-remotefilelog-partial-shallow.t
579 test-remotefilelog-partial-shallow.t
579 test-remotefilelog-permissions.t
580 test-remotefilelog-permissions.t
580 test-remotefilelog-permisssions.t
581 test-remotefilelog-permisssions.t
581 test-remotefilelog-prefetch.t
582 test-remotefilelog-prefetch.t
582 test-remotefilelog-pull-noshallow.t
583 test-remotefilelog-pull-noshallow.t
583 test-remotefilelog-share.t
584 test-remotefilelog-share.t
584 test-remotefilelog-sparse.t
585 test-remotefilelog-sparse.t
585 test-remotefilelog-tags.t
586 test-remotefilelog-tags.t
586 test-remotefilelog-wireproto.t
587 test-remotefilelog-wireproto.t
587 test-remove.t
588 test-remove.t
588 test-removeemptydirs.t
589 test-removeemptydirs.t
589 test-rename-after-merge.t
590 test-rename-after-merge.t
590 test-rename-dir-merge.t
591 test-rename-dir-merge.t
591 test-rename-merge1.t
592 test-rename-merge1.t
592 test-rename-merge2.t
593 test-rename-merge2.t
593 test-rename.t
594 test-rename.t
594 test-repair-strip.t
595 test-repair-strip.t
595 test-repo-compengines.t
596 test-repo-compengines.t
596 test-requires.t
597 test-requires.t
597 test-resolve.t
598 test-resolve.t
598 test-revert-flags.t
599 test-revert-flags.t
599 test-revert-interactive.t
600 test-revert-interactive.t
600 test-revert-unknown.t
601 test-revert-unknown.t
601 test-revert.t
602 test-revert.t
602 test-revisions.t
603 test-revisions.t
603 test-revlog-ancestry.py
604 test-revlog-ancestry.py
604 test-revlog-group-emptyiter.t
605 test-revlog-group-emptyiter.t
605 test-revlog-mmapindex.t
606 test-revlog-mmapindex.t
606 test-revlog-packentry.t
607 test-revlog-packentry.t
607 test-revlog-raw.py
608 test-revlog-raw.py
608 test-revlog-v2.t
609 test-revlog-v2.t
609 test-revlog.t
610 test-revlog.t
610 test-revset-dirstate-parents.t
611 test-revset-dirstate-parents.t
611 test-revset-legacy-lookup.t
612 test-revset-legacy-lookup.t
612 test-revset-outgoing.t
613 test-revset-outgoing.t
613 test-rollback.t
614 test-rollback.t
614 test-run-tests.py
615 test-run-tests.py
615 test-run-tests.t
616 test-run-tests.t
616 test-rust-ancestor.py
617 test-rust-ancestor.py
617 test-schemes.t
618 test-schemes.t
618 test-serve.t
619 test-serve.t
619 test-setdiscovery.t
620 test-setdiscovery.t
620 test-share.t
621 test-share.t
621 test-shelve.t
622 test-shelve.t
622 test-shelve2.t
623 test-shelve2.t
623 test-show-stack.t
624 test-show-stack.t
624 test-show-work.t
625 test-show-work.t
625 test-show.t
626 test-show.t
626 test-simple-update.t
627 test-simple-update.t
627 test-simplekeyvaluefile.py
628 test-simplekeyvaluefile.py
628 test-simplemerge.py
629 test-simplemerge.py
629 test-single-head.t
630 test-single-head.t
630 test-sparse-clear.t
631 test-sparse-clear.t
631 test-sparse-clone.t
632 test-sparse-clone.t
632 test-sparse-import.t
633 test-sparse-import.t
633 test-sparse-merges.t
634 test-sparse-merges.t
634 test-sparse-profiles.t
635 test-sparse-profiles.t
635 test-sparse-requirement.t
636 test-sparse-requirement.t
636 test-sparse-verbose-json.t
637 test-sparse-verbose-json.t
637 test-sparse.t
638 test-sparse.t
638 test-split.t
639 test-split.t
639 test-ssh-bundle1.t
640 test-ssh-bundle1.t
640 test-ssh-clone-r.t
641 test-ssh-clone-r.t
641 test-ssh-proto-unbundle.t
642 test-ssh-proto-unbundle.t
642 test-ssh-proto.t
643 test-ssh-proto.t
643 test-ssh-repoerror.t
644 test-ssh-repoerror.t
644 test-ssh.t
645 test-ssh.t
645 test-sshserver.py
646 test-sshserver.py
646 test-stack.t
647 test-stack.t
647 test-status-color.t
648 test-status-color.t
648 test-status-inprocess.py
649 test-status-inprocess.py
649 test-status-rev.t
650 test-status-rev.t
650 test-status-terse.t
651 test-status-terse.t
651 test-status.t
652 test-status.t
652 test-storage.py
653 test-storage.py
653 test-stream-bundle-v2.t
654 test-stream-bundle-v2.t
654 test-strict.t
655 test-strict.t
655 test-strip-cross.t
656 test-strip-cross.t
656 test-strip.t
657 test-strip.t
657 test-subrepo-deep-nested-change.t
658 test-subrepo-deep-nested-change.t
658 test-subrepo-missing.t
659 test-subrepo-missing.t
659 test-subrepo-paths.t
660 test-subrepo-paths.t
660 test-subrepo-recursion.t
661 test-subrepo-recursion.t
661 test-subrepo-relative-path.t
662 test-subrepo-relative-path.t
662 test-subrepo.t
663 test-subrepo.t
663 test-symlink-os-yes-fs-no.py
664 test-symlink-os-yes-fs-no.py
664 test-symlink-placeholder.t
665 test-symlink-placeholder.t
665 test-symlinks.t
666 test-symlinks.t
666 test-tag.t
667 test-tag.t
667 test-tags.t
668 test-tags.t
668 test-template-basic.t
669 test-template-basic.t
669 test-template-functions.t
670 test-template-functions.t
670 test-template-keywords.t
671 test-template-keywords.t
671 test-template-map.t
672 test-template-map.t
672 test-tools.t
673 test-tools.t
673 test-transplant.t
674 test-transplant.t
674 test-treediscovery-legacy.t
675 test-treediscovery-legacy.t
675 test-treediscovery.t
676 test-treediscovery.t
676 test-treemanifest.t
677 test-treemanifest.t
677 test-ui-color.py
678 test-ui-color.py
678 test-ui-config.py
679 test-ui-config.py
679 test-ui-verbosity.py
680 test-ui-verbosity.py
680 test-unamend.t
681 test-unamend.t
681 test-unbundlehash.t
682 test-unbundlehash.t
682 test-uncommit.t
683 test-uncommit.t
683 test-unified-test.t
684 test-unified-test.t
684 test-unionrepo.t
685 test-unionrepo.t
685 test-unrelated-pull.t
686 test-unrelated-pull.t
686 test-up-local-change.t
687 test-up-local-change.t
687 test-update-branches.t
688 test-update-branches.t
688 test-update-dest.t
689 test-update-dest.t
689 test-update-issue1456.t
690 test-update-issue1456.t
690 test-update-names.t
691 test-update-names.t
691 test-update-reverse.t
692 test-update-reverse.t
692 test-upgrade-repo.t
693 test-upgrade-repo.t
693 test-url-download.t
694 test-url-download.t
694 test-url-rev.t
695 test-url-rev.t
695 test-url.py
696 test-url.py
696 test-username-newline.t
697 test-username-newline.t
697 test-util.py
698 test-util.py
698 test-verify.t
699 test-verify.t
699 test-walk.t
700 test-walk.t
700 test-walkrepo.py
701 test-walkrepo.py
701 test-websub.t
702 test-websub.t
702 test-win32text.t
703 test-win32text.t
703 test-wireproto-clientreactor.py
704 test-wireproto-clientreactor.py
704 test-wireproto-command-branchmap.t
705 test-wireproto-command-branchmap.t
705 test-wireproto-command-changesetdata.t
706 test-wireproto-command-changesetdata.t
706 test-wireproto-command-filedata.t
707 test-wireproto-command-filedata.t
707 test-wireproto-command-filesdata.t
708 test-wireproto-command-filesdata.t
708 test-wireproto-command-heads.t
709 test-wireproto-command-heads.t
709 test-wireproto-command-listkeys.t
710 test-wireproto-command-listkeys.t
710 test-wireproto-command-lookup.t
711 test-wireproto-command-lookup.t
711 test-wireproto-command-manifestdata.t
712 test-wireproto-command-manifestdata.t
712 test-wireproto-command-pushkey.t
713 test-wireproto-command-pushkey.t
713 test-wireproto-command-rawstorefiledata.t
714 test-wireproto-command-rawstorefiledata.t
714 test-wireproto-framing.py
715 test-wireproto-framing.py
715 test-wireproto-serverreactor.py
716 test-wireproto-serverreactor.py
716 test-wireproto.py
717 test-wireproto.py
717 test-wireproto.t
718 test-wireproto.t
718 test-wsgirequest.py
719 test-wsgirequest.py
719 test-xdg.t
720 test-xdg.t
@@ -1,180 +1,184 b''
1 # test-batching.py - tests for transparent command batching
1 # test-batching.py - tests for transparent command batching
2 #
2 #
3 # Copyright 2011 Peter Arrenbrecht <peter@arrenbrecht.ch>
3 # Copyright 2011 Peter Arrenbrecht <peter@arrenbrecht.ch>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from __future__ import absolute_import, print_function
8 from __future__ import absolute_import, print_function
9
9
10 import contextlib
10 import contextlib
11
11
12 from mercurial import (
12 from mercurial import (
13 localrepo,
13 localrepo,
14 pycompat,
14 wireprotov1peer,
15 wireprotov1peer,
16 )
15
17
16 )
18 def bprint(*bs):
19 print(*[pycompat.sysstr(b) for b in bs])
17
20
18 # equivalent of repo.repository
21 # equivalent of repo.repository
19 class thing(object):
22 class thing(object):
20 def hello(self):
23 def hello(self):
21 return "Ready."
24 return b"Ready."
22
25
23 # equivalent of localrepo.localrepository
26 # equivalent of localrepo.localrepository
24 class localthing(thing):
27 class localthing(thing):
25 def foo(self, one, two=None):
28 def foo(self, one, two=None):
26 if one:
29 if one:
27 return "%s and %s" % (one, two,)
30 return b"%s and %s" % (one, two,)
28 return "Nope"
31 return b"Nope"
29 def bar(self, b, a):
32 def bar(self, b, a):
30 return "%s und %s" % (b, a,)
33 return b"%s und %s" % (b, a,)
31 def greet(self, name=None):
34 def greet(self, name=None):
32 return "Hello, %s" % name
35 return b"Hello, %s" % name
33
36
34 @contextlib.contextmanager
37 @contextlib.contextmanager
35 def commandexecutor(self):
38 def commandexecutor(self):
36 e = localrepo.localcommandexecutor(self)
39 e = localrepo.localcommandexecutor(self)
37 try:
40 try:
38 yield e
41 yield e
39 finally:
42 finally:
40 e.close()
43 e.close()
41
44
42 # usage of "thing" interface
45 # usage of "thing" interface
43 def use(it):
46 def use(it):
44
47
45 # Direct call to base method shared between client and server.
48 # Direct call to base method shared between client and server.
46 print(it.hello())
49 bprint(it.hello())
47
50
48 # Direct calls to proxied methods. They cause individual roundtrips.
51 # Direct calls to proxied methods. They cause individual roundtrips.
49 print(it.foo("Un", two="Deux"))
52 bprint(it.foo(b"Un", two=b"Deux"))
50 print(it.bar("Eins", "Zwei"))
53 bprint(it.bar(b"Eins", b"Zwei"))
51
54
52 # Batched call to a couple of proxied methods.
55 # Batched call to a couple of proxied methods.
53
56
54 with it.commandexecutor() as e:
57 with it.commandexecutor() as e:
55 ffoo = e.callcommand('foo', {'one': 'One', 'two': 'Two'})
58 ffoo = e.callcommand(b'foo', {b'one': b'One', b'two': b'Two'})
56 fbar = e.callcommand('bar', {'b': 'Eins', 'a': 'Zwei'})
59 fbar = e.callcommand(b'bar', {b'b': b'Eins', b'a': b'Zwei'})
57 fbar2 = e.callcommand('bar', {'b': 'Uno', 'a': 'Due'})
60 fbar2 = e.callcommand(b'bar', {b'b': b'Uno', b'a': b'Due'})
58
61
59 print(ffoo.result())
62 bprint(ffoo.result())
60 print(fbar.result())
63 bprint(fbar.result())
61 print(fbar2.result())
64 bprint(fbar2.result())
62
65
63 # local usage
66 # local usage
64 mylocal = localthing()
67 mylocal = localthing()
65 print()
68 print()
66 print("== Local")
69 bprint(b"== Local")
67 use(mylocal)
70 use(mylocal)
68
71
69 # demo remoting; mimicks what wireproto and HTTP/SSH do
72 # demo remoting; mimicks what wireproto and HTTP/SSH do
70
73
71 # shared
74 # shared
72
75
73 def escapearg(plain):
76 def escapearg(plain):
74 return (plain
77 return (plain
75 .replace(':', '::')
78 .replace(b':', b'::')
76 .replace(',', ':,')
79 .replace(b',', b':,')
77 .replace(';', ':;')
80 .replace(b';', b':;')
78 .replace('=', ':='))
81 .replace(b'=', b':='))
79 def unescapearg(escaped):
82 def unescapearg(escaped):
80 return (escaped
83 return (escaped
81 .replace(':=', '=')
84 .replace(b':=', b'=')
82 .replace(':;', ';')
85 .replace(b':;', b';')
83 .replace(':,', ',')
86 .replace(b':,', b',')
84 .replace('::', ':'))
87 .replace(b'::', b':'))
85
88
86 # server side
89 # server side
87
90
88 # equivalent of wireproto's global functions
91 # equivalent of wireproto's global functions
89 class server(object):
92 class server(object):
90 def __init__(self, local):
93 def __init__(self, local):
91 self.local = local
94 self.local = local
92 def _call(self, name, args):
95 def _call(self, name, args):
93 args = dict(arg.split('=', 1) for arg in args)
96 args = dict(arg.split(b'=', 1) for arg in args)
94 return getattr(self, name)(**args)
97 return getattr(self, name)(**args)
95 def perform(self, req):
98 def perform(self, req):
96 print("REQ:", req)
99 bprint(b"REQ:", req)
97 name, args = req.split('?', 1)
100 name, args = req.split(b'?', 1)
98 args = args.split('&')
101 args = args.split(b'&')
99 vals = dict(arg.split('=', 1) for arg in args)
102 vals = dict(arg.split(b'=', 1) for arg in args)
100 res = getattr(self, name)(**vals)
103 res = getattr(self, pycompat.sysstr(name))(**pycompat.strkwargs(vals))
101 print(" ->", res)
104 bprint(b" ->", res)
102 return res
105 return res
103 def batch(self, cmds):
106 def batch(self, cmds):
104 res = []
107 res = []
105 for pair in cmds.split(';'):
108 for pair in cmds.split(b';'):
106 name, args = pair.split(':', 1)
109 name, args = pair.split(b':', 1)
107 vals = {}
110 vals = {}
108 for a in args.split(','):
111 for a in args.split(b','):
109 if a:
112 if a:
110 n, v = a.split('=')
113 n, v = a.split(b'=')
111 vals[n] = unescapearg(v)
114 vals[n] = unescapearg(v)
112 res.append(escapearg(getattr(self, name)(**vals)))
115 res.append(escapearg(getattr(self, pycompat.sysstr(name))(
113 return ';'.join(res)
116 **pycompat.strkwargs(vals))))
117 return b';'.join(res)
114 def foo(self, one, two):
118 def foo(self, one, two):
115 return mangle(self.local.foo(unmangle(one), unmangle(two)))
119 return mangle(self.local.foo(unmangle(one), unmangle(two)))
116 def bar(self, b, a):
120 def bar(self, b, a):
117 return mangle(self.local.bar(unmangle(b), unmangle(a)))
121 return mangle(self.local.bar(unmangle(b), unmangle(a)))
118 def greet(self, name):
122 def greet(self, name):
119 return mangle(self.local.greet(unmangle(name)))
123 return mangle(self.local.greet(unmangle(name)))
120 myserver = server(mylocal)
124 myserver = server(mylocal)
121
125
122 # local side
126 # local side
123
127
124 # equivalent of wireproto.encode/decodelist, that is, type-specific marshalling
128 # equivalent of wireproto.encode/decodelist, that is, type-specific marshalling
125 # here we just transform the strings a bit to check we're properly en-/decoding
129 # here we just transform the strings a bit to check we're properly en-/decoding
126 def mangle(s):
130 def mangle(s):
127 return ''.join(chr(ord(c) + 1) for c in s)
131 return b''.join(pycompat.bytechr(ord(c) + 1) for c in pycompat.bytestr(s))
128 def unmangle(s):
132 def unmangle(s):
129 return ''.join(chr(ord(c) - 1) for c in s)
133 return b''.join(pycompat.bytechr(ord(c) - 1) for c in pycompat.bytestr(s))
130
134
131 # equivalent of wireproto.wirerepository and something like http's wire format
135 # equivalent of wireproto.wirerepository and something like http's wire format
132 class remotething(thing):
136 class remotething(thing):
133 def __init__(self, server):
137 def __init__(self, server):
134 self.server = server
138 self.server = server
135 def _submitone(self, name, args):
139 def _submitone(self, name, args):
136 req = name + '?' + '&'.join(['%s=%s' % (n, v) for n, v in args])
140 req = name + b'?' + b'&'.join([b'%s=%s' % (n, v) for n, v in args])
137 return self.server.perform(req)
141 return self.server.perform(req)
138 def _submitbatch(self, cmds):
142 def _submitbatch(self, cmds):
139 req = []
143 req = []
140 for name, args in cmds:
144 for name, args in cmds:
141 args = ','.join(n + '=' + escapearg(v) for n, v in args)
145 args = b','.join(n + b'=' + escapearg(v) for n, v in args)
142 req.append(name + ':' + args)
146 req.append(name + b':' + args)
143 req = ';'.join(req)
147 req = b';'.join(req)
144 res = self._submitone('batch', [('cmds', req,)])
148 res = self._submitone(b'batch', [(b'cmds', req,)])
145 for r in res.split(';'):
149 for r in res.split(b';'):
146 yield r
150 yield r
147
151
148 @contextlib.contextmanager
152 @contextlib.contextmanager
149 def commandexecutor(self):
153 def commandexecutor(self):
150 e = wireprotov1peer.peerexecutor(self)
154 e = wireprotov1peer.peerexecutor(self)
151 try:
155 try:
152 yield e
156 yield e
153 finally:
157 finally:
154 e.close()
158 e.close()
155
159
156 @wireprotov1peer.batchable
160 @wireprotov1peer.batchable
157 def foo(self, one, two=None):
161 def foo(self, one, two=None):
158 encargs = [('one', mangle(one),), ('two', mangle(two),)]
162 encargs = [(b'one', mangle(one),), (b'two', mangle(two),)]
159 encresref = wireprotov1peer.future()
163 encresref = wireprotov1peer.future()
160 yield encargs, encresref
164 yield encargs, encresref
161 yield unmangle(encresref.value)
165 yield unmangle(encresref.value)
162
166
163 @wireprotov1peer.batchable
167 @wireprotov1peer.batchable
164 def bar(self, b, a):
168 def bar(self, b, a):
165 encresref = wireprotov1peer.future()
169 encresref = wireprotov1peer.future()
166 yield [('b', mangle(b),), ('a', mangle(a),)], encresref
170 yield [(b'b', mangle(b),), (b'a', mangle(a),)], encresref
167 yield unmangle(encresref.value)
171 yield unmangle(encresref.value)
168
172
169 # greet is coded directly. It therefore does not support batching. If it
173 # greet is coded directly. It therefore does not support batching. If it
170 # does appear in a batch, the batch is split around greet, and the call to
174 # does appear in a batch, the batch is split around greet, and the call to
171 # greet is done in its own roundtrip.
175 # greet is done in its own roundtrip.
172 def greet(self, name=None):
176 def greet(self, name=None):
173 return unmangle(self._submitone('greet', [('name', mangle(name),)]))
177 return unmangle(self._submitone(b'greet', [(b'name', mangle(name),)]))
174
178
175 # demo remote usage
179 # demo remote usage
176
180
177 myproxy = remotething(myserver)
181 myproxy = remotething(myserver)
178 print()
182 print()
179 print("== Remote")
183 bprint(b"== Remote")
180 use(myproxy)
184 use(myproxy)
General Comments 0
You need to be logged in to leave comments. Login now