From patchwork Tue Oct 17 21:21:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1157: context: audit paths before clearing unknown files and dirs From: phabricator X-Patchwork-Id: 25143 Message-Id: <1369876d11cda681928ca2199d462b61@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Tue, 17 Oct 2017 21:21:24 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG07bbb208a924: context: audit paths before clearing unknown files and dirs (authored by mbthomas, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1157?vs=2930&id=2946 REVISION DETAIL https://phab.mercurial-scm.org/D1157 AFFECTED FILES mercurial/context.py tests/test-audit-path.t CHANGE DETAILS To: mbthomas, #hg-reviewers, ryanmce Cc: ryanmce, mercurial-devel diff --git a/tests/test-audit-path.t b/tests/test-audit-path.t --- a/tests/test-audit-path.t +++ b/tests/test-audit-path.t @@ -125,8 +125,7 @@ abort: path contains illegal component: ../test (glob) [255] $ cat ../test/file - cat: ../test/file: No such file or directory - [1] + data attack /tmp/test diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1946,6 +1946,7 @@ """ wvfs = self._repo.wvfs f = self._path + wvfs.audit(f) if wvfs.isdir(f) and not wvfs.islink(f): wvfs.rmtree(f, forcibly=True) for p in reversed(list(util.finddirs(f))):