Patchwork merge: use repo.wvfs.setflags() instead of util.setflags()

login
register
mail settings
Submitter Phillip Cohen
Date May 12, 2017, 1:42 a.m.
Message ID <90180de768113d9f6b1e.1494553350@phillco-mbp>
Download mbox | patch
Permalink /patch/20583/
State Accepted
Headers show

Comments

Phillip Cohen - May 12, 2017, 1:42 a.m.
# HG changeset patch
# User Phil Cohen <phillco@fb.com>
# Date 1494553123 25200
#      Thu May 11 18:38:43 2017 -0700
# Node ID 90180de768113d9f6b1ec990a634ec4b872636a0
# Parent  8f1a2b848b52ea7bf3fe2404e3b62924c7aae93f
merge: use repo.wvfs.setflags() instead of util.setflags()

Most merge.py code goes through the vfs instead of maniulating
files directly, so let's do the same here.
Sean Farley - May 12, 2017, 1:45 a.m.
Phil Cohen <phillco@fb.com> writes:

> # HG changeset patch
> # User Phil Cohen <phillco@fb.com>
> # Date 1494553123 25200
> #      Thu May 11 18:38:43 2017 -0700
> # Node ID 90180de768113d9f6b1ec990a634ec4b872636a0
> # Parent  8f1a2b848b52ea7bf3fe2404e3b62924c7aae93f
> merge: use repo.wvfs.setflags() instead of util.setflags()
>
> Most merge.py code goes through the vfs instead of maniulating
> files directly, so let's do the same here.

(already reviewed in person) This looks good to me!
Augie Fackler - May 13, 2017, 2:07 a.m.
On Thu, May 11, 2017 at 06:45:03PM -0700, Sean Farley wrote:
> Phil Cohen <phillco@fb.com> writes:
>
> > # HG changeset patch
> > # User Phil Cohen <phillco@fb.com>
> > # Date 1494553123 25200
> > #      Thu May 11 18:38:43 2017 -0700
> > # Node ID 90180de768113d9f6b1ec990a634ec4b872636a0
> > # Parent  8f1a2b848b52ea7bf3fe2404e3b62924c7aae93f
> > merge: use repo.wvfs.setflags() instead of util.setflags()
> >
> > Most merge.py code goes through the vfs instead of maniulating
> > files directly, so let's do the same here.
>
> (already reviewed in person) This looks good to me!

Queued, thanks

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1288,7 +1288,7 @@ 
         progress(_updating, z, item=f, total=numupdates, unit=_files)
         flags, = args
         audit(f)
-        util.setflags(repo.wjoin(f), 'l' in flags, 'x' in flags)
+        repo.wvfs.setflags(f, 'l' in flags, 'x' in flags)
         updated += 1
 
     # the ordering is important here -- ms.mergedriver will raise if the merge