Kde SVN2Git tags not fetched completely

牧云@^-^@ 提交于 2019-12-11 14:09:39

问题


After running Kde svn2git for migrating a single svn repo (with over 26,000 revisions) into several git repos, the tags were not completely fetched. In this case the names of the tags are the same as the name of the branches. After finished the migration step some of the new git repositories contain a few of the original tags and some of them none of the them. There are not errors thrown.

Among the aproaches I tried to solve the problem there are:

  • Created a rule with one of the tags that are not being fetched

    Result: This rule was not matched once.

    /tmp/conf/rules.txt:58 /Project/tags/$ was matched 0 times

    /tmp/conf/rules.txt:70 /Project/tags/tag_1/dir_1/$ was matched 0 times

    /tmp/conf/rule.txts:87 /Project/tags/tag_1/dir_1/ was matched 0 times

  • Added "action recurse" to the rules that match the tags

    Results: The migration finished successfully and the some tags are included in some repos but others not.

  • Migrate some of the repositories alone

    Results: The migration finished successfully and the some tags are included in some repos but others not.

  • Migrate the whole svn-repository into one single git-repository

    Results: The migration finished successfully and all the Tags appear to be there.

Here is the command I use to star the migration:

/usr/local/svn2git/svn-all-fast-export \
--identity-map /tmp/conf/authors.txt --rules /tmp/conf/rules.txt \
--stats --commit-interval 1 --add-metadata --fast-import-timeout 1 --debug-rules \
--svn-branches --debug-rules --svn-ignore --debug-rules  --empty-dirs 
/tmp/svn/

Here is an snippet my rules file, I only included one of the repositories I tried to migrate alone:

create repository my_repo
end repository

#
# Declare the rules
# Note: rules must end in a slash
# my_repo
#

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

# Recurse into tags
match /Project/tags/tag_1/dir_1/$  
 action recurse
end match

#
# Start matching
#
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/tag_1/dir_1/
  repository my_repo
  branch refs/tags/vtag_1
  annotated true
end match

match /
end match

As I mentioned before there are not errors thrown but something is not working right.

I would really appreciate any comment or help.

Thanks and hope someone can help.

EDIT 1: I found something in the logs:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++recursiveDumpDir: "/Project/tags/tag1/dir_1/" skip entry for different/ignored repository

That is happening with all the paths in the form /Project/tags/tag_x/dir_1/.

Does this mean that there is a problem with the SVN repository?

来源:https://stackoverflow.com/questions/58802738/kde-svn2git-tags-not-fetched-completely

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!