# HG changeset patch# User Nicolas Dumazet <nicdumz.commits@gmail.com># Date 1289433751 -32400# Branch stable# Node ID 5f8cd2c3c477d5ec45eefa25b0109d5beff03fca# Parent 42dccfd41f29fb2b2c901994eaaaf2d30dc10d87util: have path_auditor perform check against absolute pathsauditor is responsible for those checks: it's not necessary tohardcode one in merge.pyNote that we currently only hit this path with tampered bundles.diff --git a/mercurial/merge.py b/mercurial/merge.py--- a/mercurial/merge.py+++ b/mercurial/merge.py@@ -301,8 +301,6 @@ f, m = a[:2] u.progress(_('updating'), i + 1, item=f, total=numupdates, unit=_('files'))- if f and f[0] == "/":- continue if m == "r": # remove repo.ui.note(_("removing %s\n") % f) audit_path(f)diff --git a/mercurial/util.py b/mercurial/util.py--- a/mercurial/util.py+++ b/mercurial/util.py@@ -505,6 +505,8 @@ def __call__(self, path): if path in self.audited: return+ if path[0] == '/':+ raise Abort(_("path is absolute: %s") % path) normpath = os.path.normcase(path) parts = splitpath(normpath) if (os.path.splitdrive(path)[0]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@@ -78,5 +78,5 @@ $ hg manifest -r4 /tmp/test $ hg update -Cr4- abort: No such file or directory: $TESTTMP/target//tmp/test+ abort: path is absolute: /tmp/test [255]