D1882: atomicupdate: add an experimental option to use atomictemp when updating
lothiraldan (Boris Feld)
phabricator at mercurial-scm.org
Thu Jan 18 15:31:50 EST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG45b678bf3a78: atomicupdate: add an experimental option to use atomictemp when updating (authored by lothiraldan, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D1882?vs=4867&id=4930
REVISION DETAIL
https://phab.mercurial-scm.org/D1882
AFFECTED FILES
mercurial/configitems.py
mercurial/localrepo.py
mercurial/merge.py
CHANGE DETAILS
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1376,7 +1376,9 @@
if repo.wvfs.lexists(absf):
util.rename(absf, orig)
wctx[f].clearunknown()
- wctx[f].write(fctx(f).data(), flags, backgroundclose=True)
+ atomictemp = ui.configbool("experimental", "update.atomic-file")
+ wctx[f].write(fctx(f).data(), flags, backgroundclose=True,
+ atomictemp=atomictemp)
if i == 100:
yield i, f
i = 0
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1112,6 +1112,8 @@
**kwargs)
if 'x' in flags:
self.wvfs.setflags(filename, False, True)
+ else:
+ self.wvfs.setflags(filename, False, False)
return len(data)
def wwritedata(self, filename, data):
diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -568,6 +568,9 @@
coreconfigitem('experimental', 'treemanifest',
default=False,
)
+coreconfigitem('experimental', 'update.atomic-file',
+ default=False,
+)
coreconfigitem('extensions', '.*',
default=None,
generic=True,
To: lothiraldan, #hg-reviewers, durin42
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list