Mercurial > hg
changeset 40624:66adfd58cb77
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
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Tue, 13 Nov 2018 18:44:09 +0300 |
parents | 7c5a922be068 |
children | 39369475445c |
files | mercurial/store.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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):