@@ -33,10 +33,14 @@ def __init__(self, path):
33
33
34
34
35
35
class SvnRepo (Repo ):
36
- def get_tree (self , rev , path , ignored ):
36
+ def get_tree (self , rev , path , checksum_cache , ignored ):
37
37
cmd_options = ["svn-ls-tree" , "-r" , "-t" ,
38
38
"--root" , path ]
39
39
40
+ if checksum_cache :
41
+ cmd_options .append ("--checksum-cache" )
42
+ cmd_options .append (checksum_cache )
43
+
40
44
for p in ignored :
41
45
cmd_options .append ("--ignore-path" )
42
46
cmd_options .append (p )
@@ -86,7 +90,7 @@ def parse_git_marks(path):
86
90
return marks
87
91
88
92
89
- def compare_repositories (svn_path , git_path , svn_marks , git_marks , ignored ):
93
+ def compare_repositories (svn_path , git_path , svn_marks , git_marks , checksum_cache , ignored ):
90
94
svn = SvnRepo (svn_path )
91
95
git = GitRepo (git_path )
92
96
@@ -101,7 +105,7 @@ def compare_repositories(svn_path, git_path, svn_marks, git_marks, ignored):
101
105
for (ref , branch , mark ) in commits :
102
106
commit = git_marks [mark ]
103
107
104
- svn_tree = svn .get_tree (rev , branch , ignored )
108
+ svn_tree = svn .get_tree (rev , branch , checksum_cache , ignored )
105
109
git_tree = git .get_tree (commit )
106
110
107
111
errors = []
@@ -128,6 +132,7 @@ def main():
128
132
parser .add_argument ("--marks" , dest = "git_marks" , type = str , required = True )
129
133
parser .add_argument ("--rev-marks" , dest = "svn_marks" , type = str , required = True )
130
134
parser .add_argument ("--ignore-path" , dest = "ignored" , type = str , action = "append" )
135
+ parser .add_argument ("--checksum-cache" , dest = "checksum_cache" , type = str )
131
136
132
137
args = parser .parse_args ()
133
138
@@ -139,6 +144,7 @@ def main():
139
144
args .git_path ,
140
145
args .svn_marks ,
141
146
args .git_marks ,
147
+ args .checksum_cache ,
142
148
ignored )
143
149
144
150
0 commit comments