Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new Github repo history gets corrupted when an SVN project history contains a "fork" for a different version #151

Open
cromero-wincomplm opened this issue May 4, 2023 · 3 comments

Comments

@cromero-wincomplm
Copy link

We're using KDE's svn2git tool, (svn-all-fast-export), but we've noticed, that when a project, has been manually "copied/forked" during its history in SVN the resulting Github Repo will not be accurate comparing against the latest revision of SVN trunk.

What's the best way to implement project rules that can avoid this mistakes, currently we're using the following rules:

declare PROJECT_NAME=<svn project name>
declare PROJECT_PATH=/<starting path>/.+/<svn project name>

create repository ${PROJECT_NAME}
end repository

match ${PROJECT_PATH}/trunk/
  repository ${PROJECT_NAME}
  branch master
end match

match ${PROJECT_PATH}/branches/([^/]+)/
  repository ${PROJECT_NAME}
  branch \1
end match

match ${PROJECT_PATH}/tags/([^/]+)/
  repository ${PROJECT_NAME}
  branch refs/tags/\1
end match

match /
end match

Thanks for all the help that can be provided in this subject.

@eeijlar
Copy link

eeijlar commented May 4, 2023

Are you saying that the 'forked/copied' project doesn't match any of the rules you have defined above? Can you provide the svn path to the 'forked/copied' project?

(I think you mean copied, I don't think svn has a fork option as far as I know)

@tnyblom
Copy link
Contributor

tnyblom commented May 4, 2023

My best advice would be to take a file that is inaccurate in git, trace it's history in SVN and then try to write rules that would match it's history. Doing this might give you a longer rule file but it will allow you to get 100% accurate conversion.

@cromero-wincomplm
Copy link
Author

Thanks for the quick replies! I will test the proposed solutions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants