mercurial/util.py
changeset 43494 5d40317d42b7
parent 43474 70d42e2ad9b4
child 43506 9f70512ae2cf
--- a/mercurial/util.py	Tue Nov 05 22:56:12 2019 -0500
+++ b/mercurial/util.py	Thu Oct 17 19:29:22 2019 -0400
@@ -3515,6 +3515,10 @@
     def addpath(self, path):
         dirs = self._dirs
         for base in finddirs(path):
+            if base.endswith(b'/'):
+                raise ValueError(
+                    "found invalid consecutive slashes in path: %r" % base
+                )
             if base in dirs:
                 dirs[base] += 1
                 return