{"id":22496733,"url":"https://github.com/rikj000/ruby-svn2git-docker","last_synced_at":"2026-04-19T13:32:18.449Z","repository":{"id":264448449,"uuid":"893402213","full_name":"Rikj000/Ruby-SVN2Git-Docker","owner":"Rikj000","description":"Simple `Dockerfile` to run the Ruby `Nirvdrum/SVN2Git` script under a `Docker` container!","archived":false,"fork":false,"pushed_at":"2024-11-24T11:18:27.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2026-03-29T21:03:28.610Z","etag":null,"topics":["convert","docker","git","ruby","subversion","svn","version-control"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/Rikj000.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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-24T11:02:13.000Z","updated_at":"2024-11-24T17:05:54.000Z","dependencies_parsed_at":"2024-11-24T15:01:01.331Z","dependency_job_id":null,"html_url":"https://github.com/Rikj000/Ruby-SVN2Git-Docker","commit_stats":null,"previous_names":["rikj000/ruby-svn2git-docker"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Rikj000/Ruby-SVN2Git-Docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rikj000%2FRuby-SVN2Git-Docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rikj000%2FRuby-SVN2Git-Docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rikj000%2FRuby-SVN2Git-Docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rikj000%2FRuby-SVN2Git-Docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rikj000","download_url":"https://codeload.github.com/Rikj000/Ruby-SVN2Git-Docker/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rikj000%2FRuby-SVN2Git-Docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32009119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["convert","docker","git","ruby","subversion","svn","version-control"],"created_at":"2024-12-06T20:13:52.619Z","updated_at":"2026-04-19T13:32:18.439Z","avatar_url":"https://github.com/Rikj000.png","language":"Dockerfile","funding_links":["https://www.buymeacoffee.com/Rikj000"],"categories":[],"sub_categories":[],"readme":"# Ruby SVN2Git Docker\n\n\u003cp align=\"left\"\u003e\n    \u003ca href=\"https://github.com/Rikj000/Ruby-SVN2Git-Docker/blob/development/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/Rikj000/Ruby-SVN2Git-Docker?label=License\u0026logo=gnu\" alt=\"GNU General Public License\"\u003e\n    \u003c/a\u003e \u003ca href=\"https://github.com/Rikj000/Ruby-SVN2Git-Docker/releases\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/downloads/Rikj000/Ruby-SVN2Git-Docker/total?label=Total%20Downloads\u0026logo=github\" alt=\"Total Releases Downloaded from GitHub\"\u003e\n    \u003c/a\u003e \u003ca href=\"https://github.com/Rikj000/Ruby-SVN2Git-Docker/releases/latest\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/release/Rikj000/Ruby-SVN2Git-Docker?include_prereleases\u0026label=Latest%20Release\u0026logo=github\" alt=\"Latest Official Release on GitHub\"\u003e\n    \u003c/a\u003e \u003ca href=\"https://www.buymeacoffee.com/Rikj000\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/-Buy%20me%20a%20Coffee!-FFDD00?logo=buy-me-a-coffee\u0026logoColor=black\" alt=\"Buy me a Coffee as a way to sponsor this project!\"\u003e \n    \u003c/a\u003e\n\u003c/p\u003e\n\nSimple `Dockerfile` to run the Ruby [Nirvdrum/SVN2Git](https://github.com/nirvdrum/svn2git) script under a [Docker](https://www.docker.com/) container!\n\n## Reasoning\n- [Nirvdrum/SVN2Git](https://github.com/nirvdrum/svn2git) works better then my own [Rikj000/SVN-to-Git-convert](https://github.com/Rikj000/SVN-to-Git-convert) tool,   \n    which I will archive in favor of this container.\n- [Nirvdrum/SVN2Git](https://github.com/nirvdrum/svn2git) requires a very old version of Git (`v1.8.3.1`) to successfully convert branches + tags,   \n    which is not shipped by Linux distributions anymore, so this container builds it from source.   \n    See: https://github.com/nirvdrum/svn2git/blob/v2.4.0/lib/svn2git/migration.rb#L353\n- [Nirvdrum/SVN2Git](https://github.com/nirvdrum/svn2git) is not actively maintained anymore,   \n    which leads to unresolved bugs in the official version, which this container seeks to patch out.\n\n    **Current patches:**\n    - [Patch Svn2Git v2.4.0 to support Ruby v3.2+](https://github.com/nirvdrum/svn2git/pull/333)\n    - [Patch Svn2Git v2.4.0 to not error on `$stdin.gets.chomp`](https://github.com/nirvdrum/svn2git/pull/308)\n\n## Dependencies\n- [bash](https://archlinux.org/packages/core/x86_64/bash/)\n- [coreutils](https://archlinux.org/packages/core/x86_64/coreutils/)\n- [curl](https://archlinux.org/packages/core/x86_64/curl/)\n- [gawk](https://archlinux.org/packages/core/x86_64/gawk/)\n- [sed](https://archlinux.org/packages/core/x86_64/sed/)\n- [wget](https://archlinux.org/packages/extra/x86_64/wget/)\n- [jq](https://archlinux.org/packages/extra/x86_64/jq/)\n- [docker](https://archlinux.org/packages/extra/x86_64/docker/)\n- [subversion](https://archlinux.org/packages/extra/x86_64/subversion/)\n\n## Installation\n1. Download the latest `Dockerfile` from the `Ruby-SVN2Git-Docker` releases\n```bash\nwget \"$(\n    curl -s -H \"Accept: application/vnd.github.v3+json\" \\\n    'https://api.github.com/repos/Rikj000/Ruby-SVN2Git-Docker/releases/latest' \\\n    | jq .assets[0].browser_download_url | sed -e 's/^\"//' -e 's/\"$//')\";\n```\n\n2. Build svn2git container\n```bash\ndocker build . -t svn2git:v2.4.0;\n```\n\n## Usage\n\n1. Check out the SVN repository at the latest revision\n```bash\nsvn checkout \\\n    \"file:///path/to/svn/input/repo/@HEAD\" \\\n    \"/path/to/svn/output/checkout/\";\n```\n\n2. Query SVN checkout version history for 'authors-file.txt'\n```bash\ncd \"/path/to/svn/output/checkout/\";\nsvn log -q | \\\n    awk -F '|' '/^r/ {gsub(/ /, \"\", $2); sub(\" $\", \"\", $2); print $2\" = \"$2\" \u003c\"$2\"\u003e\"}' | \\\n    sort -u \u003e \"/path/to/authors-file.txt\";\n```\n\n3. Run svn2git container example\n```bash\nmkdir \"/path/to/git/output/repo/\";\ndocker run \\\n--volume \"/path/to/git/output/repo:/var/svn2git\" \\\n--volume \"/path/to/svn/input/repo:/var/svn\" \\\n--volume \"/path/to/authors-file.txt:/var/authors-file.txt\" \\\n    svn2git:v2.4.0 \\\n    \"file:///var/svn\" \\\n    --trunk \"trunk_dir\" \\\n    --branches \"branches_dir\" \\\n    --tags \"tags_dir\" \\\n    --authors \"/var/authors-file.txt\";\n```\n\n**Note** `--rootistrunk` is broken, instead use `--trunk \"/\" --nobranches --notags`    \nSee: https://github.com/nirvdrum/svn2git/issues/127\n\n**Note** `--exclude` is broken\n\n4. Push all branches + tags to Forgejo (or another Git forge like Github/Gitlab)\n```bash\ncd \"/path/to/git/output/repo/\";\ngit remote add origin http://localhost:3000/username/projectname;\ngit push origin '*:*';\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikj000%2Fruby-svn2git-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frikj000%2Fruby-svn2git-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikj000%2Fruby-svn2git-docker/lists"}