[PATCH 10 of 14] openrevlog: manually lift path auditing
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Sat Jul 1 22:56:35 EDT 2017
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1498957810 -7200
# Sun Jul 02 03:10:10 2017 +0200
# Node ID a5ddf792663096dbc14607616232081c5eadd8e7
# Parent d15514b41d39ddf23018787f5946f1df85458eaf
# EXP-Topic vfs.ward
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
# hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r a5ddf7926630
openrevlog: manually lift path auditing
This is the last user of 'audit=False' for vfs. Since this function is only used
by the perf extensions and a handful debug commands, it seems sane to add one
line of extra logic here and simplify the vfs code.
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -691,8 +691,9 @@ def openrevlog(repo, cmd, file_, opts):
raise error.CommandError(cmd, _('invalid arguments'))
if not os.path.isfile(file_):
raise error.Abort(_("revlog '%s' not found") % file_)
- r = revlog.revlog(vfsmod.vfs(pycompat.getcwd(), audit=False),
- file_[:-2] + ".i")
+ vfs = vfsmod.vfs(pycompat.getcwd())
+ vfs.audit = util.always # disable path auditing
+ r = revlog.revlog(vfs, file_[:-2] + ".i")
return r
def copy(ui, repo, pats, opts, rename=False):
More information about the Mercurial-devel
mailing list