comparison hgsubversion/layouts/base.py @ 1029:513f2b607b06

layouts: pull out logic for splitting svn paths into branch and local parts There is a single method on svnmeta that is responsible for both splitting a subversion path into a local component, which specifies a path relative to the mercurial root, and a branch component, which specifies the path to the root of a subversion branch, and translating that branch path into a mercurial branch name. This pulls the logic for doing the path splitting into a layout object method that *only* splits the path, and changes the svnmeta to call the layout objects's localname method to do the subversion branch path to mercurial branch name translation.
author David Schleimer <dschleimer@fb.com>
date Wed, 05 Jun 2013 11:06:34 -0700
parents 16045f6f3fef
children 91d061989acc
comparison
equal deleted inserted replaced
1028:c4b25a903ad3 1029:513f2b607b06
61 Path should be relative to the repo url. 61 Path should be relative to the repo url.
62 taglocations should be as returned by self.taglocations() 62 taglocations should be as returned by self.taglocations()
63 63
64 """ 64 """
65 self.__unimplemented('get_path_tag') 65 self.__unimplemented('get_path_tag')
66
67 def split_remote_name(self, path, known_branches):
68 """Split the path into a branch component and a local component.
69
70 path should be relative to our repo url
71
72 returns (branch_path, local_path)
73
74 branch_path should be suitable to pass into localname,
75 i.e. branch_path should NOT have a leading or trailing /
76
77 local_path should be relative to the root of the Mercurial working dir
78
79 """
80 self.unimplemented('split_branch_and_local_path')