~luoyonggang/bzr-svn/b2

« back to all changes in this revision

Viewing changes to layout/auto.py

  • Committer: Yonggang Luo
  • Date: 2011-07-31 14:51:30 UTC
  • Revision ID: luoyonggang@gmail.com-20110731145130-pyunts8x3oa5q438
First, get the things working!

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
        return _prefix
19
19
    return '/'
20
20
 
 
21
def bzr_svn_path(path):
 
22
    return path[1:]
 
23
 
21
24
class SVNChangedPath(object):
22
25
    def __init__(self, path_property):
23
26
        (self.action, self.copyfrom_path, self.copyfrom_rev, self.kind) = path_property
100
103
        :return: Tuple with type ('tag', 'branch'), project name, branch path and path
101
104
            inside the branch
102
105
        """
103
 
        #print("parse %s:%s" % (path, self.revision))
 
106
        print("parse %s:%s" % (path, self.revision))
104
107
        assert type(path) is str
105
108
        if path is None:
106
109
            raise svn_errors.NotSvnBranchPath(path)
117
120
            raise svn_errors.NotSvnBranchPath(path)
118
121
 
119
122
        path_type = self.get_path_type(branch_info[0], self.revision)
120
 
        return path_type, "", branch_info[0], subpath
 
123
        return path_type, "", bzr_svn_path(branch_info[0]), subpath
121
124
 
122
125
    #def split_project_path(self, path, project):
123
126
 
163
166
    def _get_paths(self, repository, revnum, project, pb, path_type):
164
167
        for branch_path in self.all_branches:
165
168
            if self.get_path_type(branch_path, revnum) == path_type:
166
 
                yield "", branch_path
 
169
                yield "", bzr_svn_path(branch_path)
167
170
 
168
171
    def is_parent(self, path, project, path_type):
169
172
        result = False