Mercurial > public > mercurial-scm > hg
diff tests/test-revlog-raw.py @ 51027:177e7d6bf875
revlog: overwrite revlog config through copy of the config object
The new objects allow for this kind of blanket approach that make things
cleaner.
If we have more cases, it would probably deserve a context manager, but since we
only have two usage, I don't think it is worth it.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 10 Oct 2023 10:02:13 +0200 |
parents | 498afb627f78 |
children | 8ed03f773eac |
line wrap: on
line diff
--- a/tests/test-revlog-raw.py Tue Oct 10 10:02:05 2023 +0200 +++ b/tests/test-revlog-raw.py Tue Oct 10 10:02:13 2023 +0200 @@ -371,7 +371,10 @@ def slicingtest(rlog): - oldmin = rlog._srmingapsize + old_delta_config = rlog.delta_config + old_data_config = rlog.data_config + rlog.delta_config = rlog.delta_config.copy() + rlog.data_config = rlog.data_config.copy() try: # the test revlog is small, we remove the floor under which we # slicing is diregarded. @@ -388,8 +391,8 @@ print(' expected: %s' % expected) print(' result: %s' % result) finally: - rlog.data_config.sr_min_gap_size = oldmin - rlog.delta_config.sr_min_gap_size = oldmin + rlog.delta_config = old_delta_config + rlog.data_config = old_data_config def md5sum(s):