Kde SVN2Git。错误:存储库“ my_repo”中的“ branch_1”正在从分支“ branch_2”分支,但后者不存在。无法继续

我正在尝试使用(Kde) SVN2GIT将具有26,000多个修订版的SVN存储库迁移到多个Git存储库。一个特定的存储库在迁移时会产生错误。这就是为什么我减少了迁移到该特定存储库的规则。

以下是生成资源库的规则:

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是使用Linux服务器上documentation中提供的docker image选项执行的。 我尝试过的一些替代方法中,规则中包含参数“操作递归”的用户,这在here中进行了描述。 规则如下:

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

我也遵循规则,但是我的方法都无效。

以下是日志的摘要:

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/"

我的问题是,是否有人以前曾犯过此错误?如果是,您如何处理?

任何帮助将不胜感激。我已经解决这个问题了一个多星期。

感谢并希望有人能提供帮助。

zhengfelix 回答:Kde SVN2Git。错误:存储库“ my_repo”中的“ branch_1”正在从分支“ branch_2”分支,但后者不存在。无法继续

我要在这里刺一刺。我可能会看到您的问题。假设dir1和dir2在相同的主干/分支/标签上,并且没有不同。否则让我知道。

ExecutorService exec = Executors.newFixedThreadPool(2);

exec.execute(left);
exec.executed(right);

if (!exec.isTerminated()) {
    exec.shutdown();
    exec.awaitTermination(5L,TimeUnit.SECONDS);
}

int result = left.getResult() + right.getResult();
,

你好@EncryptedWatermelon, 非常感谢您的答复,它非常有帮助。

我根据规则测试了您的建议,并进行了一些调整。仅以下规则即可解决错误:

# Recurse into branches
match /Project/branches/([^/]+)/$
 action recurse
end match

我当前的问题是未获取标签。在我的SVN仓库中,标签名称与分支名称相同。为了解决这个问题,它添加了一个额外的标记目录(refs / tags / tag /),原始标记规则如下所示:

match /Project/tags/([^/]+)/dir_1/
 repository my_repo
 branch refs/tags/tag/\1
 annotated true
end match

根据您的建议,我将遵循以下规则:

match /Project/tags/$
 action recurse
end match

# Recurse into tags
match /Project/tags/([^/]+)/dir_1/$
 action recurse
end match

但是标签仍然不存在。

您看到过类似的东西吗?标记的名称与分支的名称相同可能是一个问题吗?

预先感谢,希望能对您有所帮助。

干杯!

本文链接:https://www.f2er.com/3143786.html

大家都在问