mercurial/util.py
changeset 43542 5d40317d42b7
parent 43522 70d42e2ad9b4
child 43554 9f70512ae2cf
equal deleted inserted replaced
43541:3a463e5e470b 43542:5d40317d42b7
  3513                 addpath(f)
  3513                 addpath(f)
  3514 
  3514 
  3515     def addpath(self, path):
  3515     def addpath(self, path):
  3516         dirs = self._dirs
  3516         dirs = self._dirs
  3517         for base in finddirs(path):
  3517         for base in finddirs(path):
       
  3518             if base.endswith(b'/'):
       
  3519                 raise ValueError(
       
  3520                     "found invalid consecutive slashes in path: %r" % base
       
  3521                 )
  3518             if base in dirs:
  3522             if base in dirs:
  3519                 dirs[base] += 1
  3523                 dirs[base] += 1
  3520                 return
  3524                 return
  3521             dirs[base] = 1
  3525             dirs[base] = 1
  3522 
  3526