Patchwork [4,of,6] merge: change repo.wvfs.setflags calls to a new wctx[f].setflags function

login
register
mail settings
Submitter Phillip Cohen
Date June 26, 2017, 5:36 a.m.
Message ID <6f9cbb96b39bc21c9685.1498455364@phillco-mbp.dhcp.thefacebook.com>
Download mbox | patch
Permalink /patch/21722/
State Accepted
Headers show

Comments

Phillip Cohen - June 26, 2017, 5:36 a.m.
# HG changeset patch
# User Phil Cohen <phillco@fb.com>
# Date 1498454949 25200
#      Sun Jun 25 22:29:09 2017 -0700
# Node ID 6f9cbb96b39bc21c9685573dfd30f782da3d79b4
# Parent  5de156099f329b1296e8cbddd48278d2eab5159e
merge: change repo.wvfs.setflags calls to a new wctx[f].setflags function

As with previous changes in this series, this should be a no-op.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1899,6 +1899,9 @@ 
         """wraps repo.wwrite"""
         self._repo.wwrite(self._path, data, flags)
 
+    def setflags(self, l, x):
+        self._repo.wvfs.setflags(self._path, l, x)
+
 class workingcommitctx(workingctx):
     """A workingcommitctx object makes access to data related to
     the revision being committed convenient.
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1291,7 +1291,7 @@ 
         progress(_updating, z, item=f, total=numupdates, unit=_files)
         flags, = args
         audit(f)
-        repo.wvfs.setflags(f, 'l' in flags, 'x' in flags)
+        wctx[f].setflags('l' in flags, 'x' in flags)
         updated += 1
 
     # the ordering is important here -- ms.mergedriver will raise if the merge