Skip to content
This repository was archived by the owner on Jul 17, 2021. It is now read-only.

Commit 84d91c5

Browse files
committed
Use checksum cache for verification
1 parent aae5b92 commit 84d91c5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Diff for: git-svn-verify-import.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ def __init__(self, path):
3333

3434

3535
class SvnRepo(Repo):
36-
def get_tree(self, rev, path, ignored):
36+
def get_tree(self, rev, path, checksum_cache, ignored):
3737
cmd_options = ["svn-ls-tree", "-r", "-t",
3838
"--root", path]
3939

40+
if checksum_cache:
41+
cmd_options.append("--checksum-cache")
42+
cmd_options.append(checksum_cache)
43+
4044
for p in ignored:
4145
cmd_options.append("--ignore-path")
4246
cmd_options.append(p)
@@ -86,7 +90,7 @@ def parse_git_marks(path):
8690
return marks
8791

8892

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):
9094
svn = SvnRepo(svn_path)
9195
git = GitRepo(git_path)
9296

@@ -101,7 +105,7 @@ def compare_repositories(svn_path, git_path, svn_marks, git_marks, ignored):
101105
for (ref, branch, mark) in commits:
102106
commit = git_marks[mark]
103107

104-
svn_tree = svn.get_tree(rev, branch, ignored)
108+
svn_tree = svn.get_tree(rev, branch, checksum_cache, ignored)
105109
git_tree = git.get_tree(commit)
106110

107111
errors = []
@@ -128,6 +132,7 @@ def main():
128132
parser.add_argument("--marks", dest="git_marks", type=str, required=True)
129133
parser.add_argument("--rev-marks", dest="svn_marks", type=str, required=True)
130134
parser.add_argument("--ignore-path", dest="ignored", type=str, action="append")
135+
parser.add_argument("--checksum-cache", dest="checksum_cache", type=str)
131136

132137
args = parser.parse_args()
133138

@@ -139,6 +144,7 @@ def main():
139144
args.git_path,
140145
args.svn_marks,
141146
args.git_marks,
147+
args.checksum_cache,
142148
ignored)
143149

144150

0 commit comments

Comments
 (0)