Submitter | phabricator |
---|---|
Date | April 20, 2021, 4:09 a.m. |
Message ID | <differential-rev-PHID-DREV-luolurwu77vizvkxtrvi-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/48794/ |
State | Superseded |
Headers | show |
Comments
Patch
diff --git a/mercurial/testing/__init__.py b/mercurial/testing/__init__.py --- a/mercurial/testing/__init__.py +++ b/mercurial/testing/__init__.py @@ -28,3 +28,8 @@ if time.time() - start > timeout: raise RuntimeError(b"timed out waiting for file: %s" % path) time.sleep(0.01) + + +def write_file(path, content=b''): + with open(path, 'wb') as f: + f.write(content)