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
--- a/mercurial/store.py Tue Nov 13 23:54:23 2018 -0500
+++ b/mercurial/store.py Tue Nov 13 18:44:09 2018 +0300
@@ -38,6 +38,8 @@
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):