Patchwork D5274: requires: use atomictemp=True when writing .hg/requires

login
register
mail settings
Submitter phabricator
Date Nov. 14, 2018, 8:26 p.m.
Message ID <1e1a8d9276a1f052066c282c695fa0d3@localhost.localdomain>
Download mbox | patch
Permalink /patch/36586/
State Not Applicable
Headers show

Comments

phabricator - Nov. 14, 2018, 8:26 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGacd17caa699a: requires: use atomictemp=True when writing .hg/requires (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5274?vs=12542&id=12544

REVISION DETAIL
  https://phab.mercurial-scm.org/D5274

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1166,7 +1166,7 @@ 
             wctx.copy(origsrc, dst)
 
 def writerequires(opener, requirements):
-    with opener('requires', 'w') as fp:
+    with opener('requires', 'w', atomictemp=True) as fp:
         for r in sorted(requirements):
             fp.write("%s\n" % r)