Mercurial > hg-stable
changeset 50095:7b289a70c2c8
dirstate: use wlock and changing_files context in `test-revlog-ancestry`
This is the way.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 25 Jan 2023 12:57:52 +0100 |
parents | 6cdcab3ae3fa |
children | d41960df197e |
files | tests/test-revlog-ancestry.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-revlog-ancestry.py Tue Dec 13 15:01:59 2022 +0100 +++ b/tests/test-revlog-ancestry.py Wed Jan 25 12:57:52 2023 +0100 @@ -19,8 +19,10 @@ 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):