py3: add some r'' prefixes in hgext/narrow/narrowwirepeer.py
This fixes test-narrow-widen-no-ellipsis.t on Python 3.
# skip-blame because just r'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D5023
py3: r'' prefix default values for mimetypes.guess_mime()
As suggested by @yuja in D4967.
Differential Revision: https://phab.mercurial-scm.org/D5020
absorb: update help text
Update the help text to reflect the recent changes to absorb in D4999.
The `-p` option actually only affects the `-a` option: without `-a`, the
changes are printed; with `-a` the changes are only printed if `-p` is
specified. Reword the help text for `-p` to reflect this.
Differential Revision: https://phab.mercurial-scm.org/D5022
fsmonitor: use vfs instead of opener (
issue5938)
"opener" of localrepository object was dropped at Mercurial 4.3 (or
a7e210167c28). "vfs" should be used instead.
wlock is required to write into a file under .hg directory.
For efficiency, we should change _cmpsets() from:
1. acquire wlock
2. open log file under .hg directory with write mode
3. compare between result of watchman and Mercurial's dirstate logic
4. write out error info into a file, if error is detected
5. release wlock
to:
1. compare between result of watchman and Mercurial's dirstate logic
2. acquire wlock, if error is detected
3. open and write error info into a file
4. release wlock
But this is another issue.
tests: configure fsmonitor.mode=paranoid always if fsmonitor is used
This forces fsmonitor extension execute "paranoid" code path.
Strict speaking, we should make fsmonitor-run-tests.py accept own
specific options, but there is no code path, which is disabled in
"paranoid" mode, at least now. Therefore, this solution seems
reasonable enough.
tests: drop files from exclusion list in test-check-module-imports.t
Now, these files has no style issue at checking with import-checker.py.
BTW, tests/test-imports-checker.t is still excluded, because almost
all code fragments in it has intentional importing style violation.
Using NO_CHECK_EOF instead of EOF as heredoc limit mark can make
import-checker.py ignore such fragments. But keeping these fragments
checkable seems still useful: for example, test-imports-checker.t can
be used to test whether import-checker.py can detect erroneous code
fragment in test script as expected.
tests: use NO_CHECK_EOF for fragments used to test importing via extension
test-extension.t is excluded in test-check-module-imports.t, because
import-checker.py reports that some python code fragments in it does
not import modules in recommended style.
These code fragments are used to test importing modules relatively and
absolutely via extension (e.g.
issue4029,
issue5208, and so on). Test
specific package hierarchy becomes complicated for this purpose, and
it seems reasonable to avoid checking these code fragments with
import-checker.py.
But on the other hand, other code fragments in test-extension.t should
be checked by import-checker.py.
Therefore, this patch uses NO_CHECK_EOF limit mark only for python
code fragments, which are used to test importing via extension in
test-extension.t. NO_CHECK_EOF limit mark tells import-checker.py that
this code fragment should be ignored, via testparseutil.py.