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: