comparison hgsubversion/svnmeta.py @ 888:c6388ed0ec0a

svnmeta: only remove directory components in normalize() Previously, a file beginning with the repository subdirectory would be stripped, resulting in a leftover file name with a wrong name. A subsequent pull of a revision modifying the file would add it under its correct name, but leave the leftover file.
author Dan Villiom Podlaski Christiansen <dan@cabo.dk>
date Wed, 14 Dec 2011 00:07:57 +0100
parents 6cee57ad9045
children a80b01ceb1fc
comparison
equal deleted inserted replaced
887:f95c429124f3 888:c6388ed0ec0a
290 ''' 290 '''
291 if self.subdir and path == self.subdir[:-1]: 291 if self.subdir and path == self.subdir[:-1]:
292 return '' 292 return ''
293 if path and path[0] == '/': 293 if path and path[0] == '/':
294 path = path[1:] 294 path = path[1:]
295 if path and path.startswith(self.subdir): 295 if path == self.subdir:
296 return ''
297 if path and path.startswith(self.subdir + '/'):
296 path = path[len(self.subdir):] 298 path = path[len(self.subdir):]
297 if path and path[0] == '/': 299 if path and path[0] == '/':
298 path = path[1:] 300 path = path[1:]
299 return path 301 return path
300 302