# HG changeset patch # User Boris Feld # Date 2017-07-02 02:51:03 # Node ID c8006a25b845e2f0705369ed191d1db6adb2d7cd # Parent a59a74721c767acde8b2a6c3fbf4a643036f84d5 vfs: makes all audited path relative Only auditing relative path helps the vfs warning logic. diff --git a/mercurial/vfs.py b/mercurial/vfs.py --- a/mercurial/vfs.py +++ b/mercurial/vfs.py @@ -339,6 +339,8 @@ class vfs(abstractvfs): def _auditpath(self, path, mode): if self._audit: + if os.path.isabs(path) and path.startswith(self.base): + path = os.path.relpath(path, self.base) r = util.checkosfilename(path) if r: raise error.Abort("%s: %r" % (r, path))