marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. marmoute added a comment. Alphare accepted this revision. This revision is now accepted and ready to land.
This does not seems to be all of the issue we have with nointerrupt.t … https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/233269 REVISION SUMMARY This make sure viewer cannot see the new file with partial content. This was likely the cause of some flakiness in `test-nointerrupt.t` REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D11250 AFFECTED FILES mercurial/testing/__init__.py CHANGE DETAILS diff --git a/mercurial/testing/__init__.py b/mercurial/testing/__init__.py --- a/mercurial/testing/__init__.py +++ b/mercurial/testing/__init__.py @@ -33,5 +33,11 @@ def write_file(path, content=b''): - with open(path, 'wb') as f: + if content: + write_path = b'%s.tmp' % path + else: + write_path = path + with open(write_path, 'wb') as f: f.write(content) + if path != write_path: + os.rename(write_path, path) To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel