hgext/notify.py
changeset 2326 d0ba2f6b9d97
parent 2296 6e8e3dd7976e
child 2329 90368f89340a
equal deleted inserted replaced
2321:d9ca698e3c5a 2326:d0ba2f6b9d97
   121     def strip(self, path):
   121     def strip(self, path):
   122         '''strip leading slashes from local path, turn into web-safe path.'''
   122         '''strip leading slashes from local path, turn into web-safe path.'''
   123 
   123 
   124         path = util.pconvert(path)
   124         path = util.pconvert(path)
   125         count = self.stripcount
   125         count = self.stripcount
   126         while path and count >= 0:
   126         while count > 0:
   127             c = path.find('/')
   127             c = path.find('/')
   128             if c == -1:
   128             if c == -1:
   129                 break
   129                 break
   130             path = path[c+1:]
   130             path = path[c+1:]
   131             count -= 1
   131             count -= 1