[PATCH 6 of 6] workingfilectx: add audit() as a wrapper for wvfs.audit()
Phil Cohen
phillco at fb.com
Mon Jun 26 05:36:06 UTC 2017
# HG changeset patch
# User Phil Cohen <phillco at fb.com>
# Date 1498455014 25200
# Sun Jun 25 22:30:14 2017 -0700
# Node ID d2f2b5a60476e18e69fdcd76ac296d37bb69b112
# Parent 8ef73d9c80f5be80fbcce7161295a4d6f1eb96f6
workingfilectx: add audit() as a wrapper for wvfs.audit()
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1882,6 +1882,9 @@
raise
return (t, tz)
+ def audit(self):
+ return self._repo.wvfs.audit(self._path)
+
def cmp(self, fctx):
"""compare with other file context
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1096,7 +1096,7 @@
repo.ui.debug(" %s: %s -> r\n" % (f, msg))
if verbose:
repo.ui.note(_("removing %s\n") % f)
- audit(f)
+ wctx[f].audit()
try:
wctx[f].remove(ignoremissing=True)
except OSError as inst:
@@ -1201,7 +1201,6 @@
if f1 != f and move:
moves.append(f1)
- audit = repo.wvfs.audit
_updating = _('updating')
_files = _('files')
progress = repo.ui.progress
@@ -1210,7 +1209,7 @@
for f in moves:
if os.path.lexists(repo.wjoin(f)):
repo.ui.debug("removing %s\n" % f)
- audit(f)
+ wctx[f].audit()
wctx[f].remove()
numupdates = sum(len(l) for m, l in actions.items() if m != 'k')
@@ -1268,7 +1267,7 @@
progress(_updating, z, item=f, total=numupdates, unit=_files)
f0, flags = args
repo.ui.note(_("moving %s to %s\n") % (f0, f))
- audit(f)
+ wctx[f].audit()
wctx[f].write(wctx.filectx(f0).data(), flags)
wctx[f0].remove()
updated += 1
@@ -1289,7 +1288,7 @@
z += 1
progress(_updating, z, item=f, total=numupdates, unit=_files)
flags, = args
- audit(f)
+ wctx[f].audit()
wctx[f].setflags('l' in flags, 'x' in flags)
updated += 1
@@ -1323,7 +1322,7 @@
subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx),
overwrite, labels)
continue
- audit(f)
+ wctx[f].audit()
complete, r = ms.preresolve(f, wctx)
if not complete:
numupdates += 1
More information about the Mercurial-devel
mailing list