# HG changeset patch # User Pierre-Yves David # Date 2023-01-25 11:57:52 # Node ID 7b289a70c2c823d1787506019fc91acbe51cb347 # Parent 6cdcab3ae3fa597c4c7eaf9de1853cdac3daa2f2 dirstate: use wlock and changing_files context in `test-revlog-ancestry` This is the way. diff --git a/tests/test-revlog-ancestry.py b/tests/test-revlog-ancestry.py --- a/tests/test-revlog-ancestry.py +++ b/tests/test-revlog-ancestry.py @@ -19,8 +19,10 @@ def addcommit(name, time): f = open(name, 'wb') f.write(b'%s\n' % name) f.close() - repo[None].add([name]) - commit(name, time) + with repo.wlock(): + with repo.dirstate.changing_files(repo): + repo[None].add([name]) + commit(name, time) def update(rev):