I'm trying to migrate an SVN repository with over 26,000 revisions to multiple Git repositories using (Kde) SVN2GIT. One specific repository generates an error while migrating. This is why I reduced rules for migration to this specific repository.
Here are the rules for generating the repository:
create repository my_repo
end repository
#
# Declare the rules
# Note: rules must end in a slash
#
#
# my_repo
#
match /Project/trunk/dir_1/
repository my_repo
branch master
end match
match /Project/branches/([^/]+)/dir_1/
repository my_repo
branch \1
end match
match /Project/tags/([^/]+)/dir_1/
repository my_repo
branch refs/tags/tag/\1
annotated true
end match
match /
end match
SVN2Git was executed using the docker image option provided in the documentation on a Linux server. Some of the alternatives I tried included the user of the parameter "action recurse" in the rules, which is described in here. The rules would look like this:
create repository my_repo
end repository
#
# Declare the rules
# Note: rules must end in a slash
#
#
# my_repo
#
match /Project/trunk/dir_1/
repository my_repo
branch master
min revision 18800
end match
match /Project/branches/([^/]+)/dir_1/
repository my_repo
branch \1
min revision 18800
action recurse
end match
match /Project/tags/([^/]+)/dir_1/
repository my_repo
branch refs/tags/tag/\1
min revision 18800
action recurse
annotated true
end match
match /
end match
I also played a bit with the rules but none of my approaches worked.
Here is a snippet of the logs:
Exporting revision 18840 done
Exporting revision 18841 /Project/branches/branch_2/dir_1 was copied from /Project/branches/branch_1/dir_1 rev 18840
/Project/branches/branch_2/dir_2 was copied from /Project/branches/branch_1/dir_2 rev 18840
rev 18841 /Project/branches/branch_2/dir_2/ matched rule: "/tmp/conf/Project.rules:22 /Project/branches/([^/]+)/dir_2/" exporting.
.my_repo : branch branch_2 is branching from branch_1
"branch_2" in repository "my_repo" is branching from branch "branch_1" but the latter doesn't exist. Can't continue.
rev 18841 /Project/branches/branch_2/dir_2/ matched rule: "/tmp/conf/Project.rules:22 /Project/branches/([^/]+)/dir_2/"
My question is if someone had this error before and if yes, how did you deal with it?
Any help will be really appreciated. I'm have being dealing with this problem for over a week.
Thanks and hope someone can help.
I'm going to take a stab at this here. I may see your issue. Assuming you dir1 and dir2 are on the same trunk/branch/tag and not different. Let me know otherwise.
create repository my_repo
end repository
#
# Declare the rules
# Note: rules must end in a slash
#
#
# my_repo
#
match /Project/$
action recurse
end match
match /Project/trunk/$
action recurse
end match
match /Project/branches/$
action recurse
end match
match /Project/tags/$
action recurse
end match
# Recurse into branches
match /Project/branches/([^/]+)/$
action recurse
end match
# Recurse into tags
match /Project/tags/([^/]+)/$
action recurse
end match
# Start matching
match /Project/trunk/
repository my_repo
branch master
end match
match /Project/branches/([^/]+)/
repository my_repo
branch \1
end match
match /Project/tags/([^/]+)/
repository my_repo
branch refs/tags/\1
annotated true
end match
match /
end match