# HG changeset patch # User Pulkit Goyal # Date 2018-11-13 15:44:09 # Node ID 66adfd58cb770a7fd54645d82fbec6cf1be80447 # Parent 7c5a922be068f7337a53c7508c9d24a7a7bda0ec store: raise ProgrammingError if unable to decode a storage path Right now, the function magically return False which is dangerous, so let's raise ProgrammingError. Suggested by Augie in D5139. Differential Revision: https://phab.mercurial-scm.org/D5264 diff --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -38,6 +38,8 @@ def _matchtrackedpath(path, matcher): elif path.startswith('meta/'): return matcher.visitdir(path[len('meta/'):-len('/00manifest.i')] or '.') + raise error.ProgrammingError("cannot decode path %s" % path) + # This avoids a collision between a file named foo and a dir named # foo.i or foo.d def _encodedir(path):