requires: use atomictemp=True when writing .hg/requires
We use an unusual file system at Google that allows writes (and
renames) but not deletions (for certain paths). That causes problems
when writing the requires files without atomictemp=True. There doesn't
appear to be any real drawbacks to using atomictemp, so I'm hoping we
can just change it in core.
Differential Revision: https://phab.mercurial-scm.org/D5274
--- a/mercurial/scmutil.py Sun Nov 11 16:47:28 2018 +0900
+++ b/mercurial/scmutil.py Wed Nov 14 11:30:46 2018 -0800
@@ -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)