Mercurial > public > mercurial-scm > hg-stable
comparison tests/common-pattern.py @ 42351:c7652f7440d9
rust-filepatterns: call new Rust implementations from Python
This change adds the import to the `rust-cpython` bindings and uses
them when appropriate.
A wrapper function has been defined in the case of `_regex` to
keep this patch simple.
Differential Revision: https://phab.mercurial-scm.org/D6273
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Fri, 17 May 2019 09:36:29 -0400 |
parents | 8695fbe17f7c |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
42350:94f3a73b6672 | 42351:c7652f7440d9 |
---|---|
113 ] | 113 ] |
114 | 114 |
115 # Various platform error strings, keyed on a common replacement string | 115 # Various platform error strings, keyed on a common replacement string |
116 _errors = { | 116 _errors = { |
117 br'$ENOENT$': ( | 117 br'$ENOENT$': ( |
118 # IOError in Python does not have the same error message | |
119 # than in Rust, and automatic conversion is not possible | |
120 # because of module member privacy. | |
121 br'No such file or directory \(os error 2\)', | |
122 | |
118 # strerror() | 123 # strerror() |
119 br'No such file or directory', | 124 br'No such file or directory', |
120 | 125 |
121 # FormatMessage(ERROR_FILE_NOT_FOUND) | 126 # FormatMessage(ERROR_FILE_NOT_FOUND) |
122 br'The system cannot find the file specified', | 127 br'The system cannot find the file specified', |