comparison hg_delta_editor.py @ 325:4f4db3d2fdbb

2.4 compat fixes.
author Augie Fackler <durin42@gmail.com>
date Mon, 18 May 2009 17:09:26 -0500
parents 05cd4a5138bf
children
comparison
equal deleted inserted replaced
324:c4061e57974c 325:4f4db3d2fdbb
406 """ 406 """
407 path = self._normalize_path(path) 407 path = self._normalize_path(path)
408 for tags_path in self.tag_locations: 408 for tags_path in self.tag_locations:
409 if path and (path.startswith(tags_path) and 409 if path and (path.startswith(tags_path) and
410 len(path) > len('%s/' % tags_path)): 410 len(path) > len('%s/' % tags_path)):
411 tag, _, subpath = path[len(tags_path)+1:].partition('/') 411 tag = path[len(tags_path)+1:]
412 if '/' in tag:
413 tag, subpath = tag.split('/', 1)
414 else:
415 subpath = ''
412 return (subpath, tag, '%s/%s' % (tags_path, tag)) 416 return (subpath, tag, '%s/%s' % (tags_path, tag))
413 return (None, None, None) 417 return (None, None, None)
414 418
415 def get_parent_svn_branch_and_rev(self, number, branch): 419 def get_parent_svn_branch_and_rev(self, number, branch):
416 number -= 1 420 number -= 1