Mercurial > hg
view tests/filterpyflakes.py @ 45545:e5e1285b6f6f
largefiles: prevent in-memory merge instead of switching to on-disk
I enabled in-memory merge by default while testing some changes. I
spent quite some time troubleshooting why largefiles was still
creating an on-disk mergestate. Then I found out that it ignores the
callers `wc` argument to `mergemod._update()` and always uses on-disk
merge. This patch changes that so we raise an error if largefiles is
used with in-memory merge. That way we'll notice if in-memory merge is
used with largefiles instead of silently replacing ignoring the
`overlayworkingctx` instance and updating the working copy instead.
I felt a little bad that this would break things more for users with
both largefiles and in-memory rebase enabled. So I also added a
higher-level override to make sure that largefiles disables in-memory
rebase. It turns out that that fixes `run-tests.py -k largefiles
--extra-config-opt rebase.experimental.inmemory=1`.
Differential Revision: https://phab.mercurial-scm.org/D9069
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 22 Sep 2020 23:18:37 -0700 |
parents | 2372284d9457 |
children | c102b704edb5 |
line wrap: on
line source
#!/usr/bin/env python # Filter output by pyflakes to control which warnings we check from __future__ import absolute_import, print_function import re import sys lines = [] for line in sys.stdin: # We blacklist tests that are too noisy for us pats = [ r"undefined name 'WindowsError'", r"redefinition of unused '[^']+' from line", # for cffi, allow re-exports from pure.* r"cffi/[^:]*:.*\bimport \*' used", r"cffi/[^:]*:.*\*' imported but unused", ] keep = True for pat in pats: if re.search(pat, line): keep = False break # pattern matches if keep: fn = line.split(':', 1)[0] f = open(fn) data = f.read() f.close() if 'no-' 'check-code' in data: continue lines.append(line) for line in lines: sys.stdout.write(line) print()