# HG changeset patch # User Pierre-Yves David # Date 1696928520 -7200 # Node ID 59c6f99723b1cbadeef6882b4be8908704333be7 # Parent 861fe9273d57b4a1e7f40612c0524c00e4372b3e revlog: remove legacy usage of `_checkambig` All core code is now getting the setting from the DataConfig object. diff -r 861fe9273d57 -r 59c6f99723b1 mercurial/revlog.py --- a/mercurial/revlog.py Tue Oct 10 10:58:28 2023 +0200 +++ b/mercurial/revlog.py Tue Oct 10 11:02:00 2023 +0200 @@ -996,7 +996,9 @@ # You should not use this directly and use `_writing` instead try: f = self.opener( - self._indexfile, mode=b"r+", checkambig=self._checkambig + self._indexfile, + mode=b"r+", + checkambig=self.data_config.check_ambig, ) if self._docket is None: f.seek(0, os.SEEK_END) @@ -1005,7 +1007,9 @@ return f except FileNotFoundError: return self.opener( - self._indexfile, mode=b"w+", checkambig=self._checkambig + self._indexfile, + mode=b"w+", + checkambig=self.data_config.check_ambig, ) def __index_new_fp(self): @@ -1013,7 +1017,7 @@ return self.opener( self._indexfile, mode=b"w", - checkambig=self._checkambig, + checkambig=self.data_config.check_ambig, atomictemp=True, ) diff -r 861fe9273d57 -r 59c6f99723b1 mercurial/revlogutils/rewrite.py --- a/mercurial/revlogutils/rewrite.py Tue Oct 10 10:58:28 2023 +0200 +++ b/mercurial/revlogutils/rewrite.py Tue Oct 10 11:02:00 2023 +0200 @@ -539,7 +539,7 @@ util.copyfile( rl.opener.join(index_file), rl.opener.join(new_file_path), - checkambig=rl._checkambig, + checkambig=rl.data_config.check_ambig, ) with rl.opener(new_file_path, mode=b"r+") as fp: