{"id":26447508,"url":"https://github.com/mycore-org/svn-migration","last_synced_at":"2026-04-30T02:34:31.280Z","repository":{"id":77166590,"uuid":"69360705","full_name":"MyCoRe-Org/svn-migration","owner":"MyCoRe-Org","description":"project to customize SVN migration to GitHub","archived":false,"fork":false,"pushed_at":"2021-03-09T06:33:05.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-23T03:49:14.094Z","etag":null,"topics":["documentation","github","subversion","svn-migration"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MyCoRe-Org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"authors.txt","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-09-27T13:39:38.000Z","updated_at":"2021-03-09T06:33:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa92ab8e-92d9-4789-8c71-f87ba9153b6c","html_url":"https://github.com/MyCoRe-Org/svn-migration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MyCoRe-Org/svn-migration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MyCoRe-Org%2Fsvn-migration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MyCoRe-Org%2Fsvn-migration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MyCoRe-Org%2Fsvn-migration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MyCoRe-Org%2Fsvn-migration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MyCoRe-Org","download_url":"https://codeload.github.com/MyCoRe-Org/svn-migration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MyCoRe-Org%2Fsvn-migration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32452739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","github","subversion","svn-migration"],"created_at":"2025-03-18T13:57:24.237Z","updated_at":"2026-04-30T02:34:31.276Z","avatar_url":"https://github.com/MyCoRe-Org.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svn-migration\n## Check Subversion commit logs\n\nIn the [mycore](mycore) subdirectory are some XSLT files that can be helpful to get relevant information of Subversion commit logs. Start there to correct any logs that a not in form `r{revision}`, `rev {revision}`, `rev. {revision}` or `revision {revision}` required for the next steps.\n\n## Create a local Git clone of the Subversion repository\n```\nmkdir -p git-repos/mycore \u0026\u0026 cd git-repos/mycore\n```\n\nMake sure you use a file system that **does NOT ignore** cases of filenames (e.g. MacOS default).\n\n```\nMIGBASEDIR=$(cd ../.. \u0026\u0026 pwd -P)\nsvn2git https://server.mycore.de/svn/mycore \\\n --exclude '.*[/]\\.project$' --exclude '.*[/]\\.classpath$' \\\n --exclude '.*\\.class$' --exclude '.*\\.settings($|[/].*)' \\\n --exclude '(?!.*[/](src|sources)[/]).*[/]target($|[/].*)' \\\n -m --no-minimize-url --authors \"${MIGBASEDIR}/authors.txt\"\n```\n\nThis monster will initialize a local Git repository in the current directory and uses the author mapping from [authors.txt](authors.txt). It also exluded some accidental commit files and directories.\n\nNow we can finally convert SVN revision to GIT SHA checksums:\n\n```\n\"${MIGBASEDIR}/filter-branch-date-order\" \\\n --msg-filter \"${MIGBASEDIR}/mycore/mycore-msgfilter\" \\\n --tag-name-filter cat -- --all\n```\n\nAfter the initial convertation we need to update the checksum. Look [here](http://www.tt-solutions.com/en/articles/advanced_svn_to_git) further information.\n\n```\n\"${MIGBASEDIR}/filter-branch-date-order\" -f --prune-empty \\\n --msg-filter \"${MIGBASEDIR}/msgfilter-updatesha\" \\\n --tag-name-filter cat -- --all\n```\n\nGit saves a backup before rewriting everything in `refs/original`, which we can clean now with:\n\n```\ngit for-each-ref --format=\"%(refname)\" refs/original/ | xargs -n 1 git update-ref -d\ngit gc --aggressive --prune=all\n```\n\nFinally we can put it online\n\n```\ngit remote add origin https://github.com/MyCoRe-Org/{repository}.git\ngit push -u origin --all\ngit push origin --tags\n```\n\nSome final cleanup like adding a `README.md` and `.gitignore` file are left to do. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmycore-org%2Fsvn-migration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmycore-org%2Fsvn-migration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmycore-org%2Fsvn-migration/lists"}