Skip to content

Towards a Git to SVN bridge

Ramkumar Ramachandra git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5date: Expose the time_to_tm functioncache.h date.c+2 -10 replies
2/5fast-export: Introduce --inline-blobsDocumentation/git-fast-export.txt builtin/fast-export.c contrib/svn-fe/.gitignore +3 more+92 -41 reply
3/5strbuf: Introduce strbuf_fwrite corresponding to strbuf_freadstrbuf.c strbuf.h+12 -01 reply
4/5vcs-svn: Introduce svnload, a dumpfile producerMakefile vcs-svn/dir_cache.c vcs-svn/dir_cache.h +4 more+759 -10 replies
5/5t9012-svn-fi: Add tests for svn-fi.gitignore Makefile t/t9012-svn-fi.sh +1 more+726 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] Towards a Git to SVN bridge

Hi,

Thanks to Jonathan, Junio, Peter, and Erik among others for reviewing previous iterations of this series. This iteration should take care of most error handling and design issues addressed in the previous iterations- it also comes along with a battery of tests.

Small introduction: svn-fi's design is modelled after git-fast-import. It aims to be more comprehensive and production-ready than the existing alternative, git2svn. It converts a fast-import stream to a Subversion dumpfile which can be loaded using svnadmin load (or alternatively using svnrdump load, which will feature in Subversion 1.7). The shortcomings can be summarized as follows:
1. dir_cache is a very naive implementation using string_list. This will not scale well either in memory or time, and should be replaced with a prefix tree in future.
2. It currently only supports one branch. For supporting multiple branches, two things need to be implemented: a branch-specific dir_cache, and a mapper that maps branch names to directories (if the standard "trunk", "branches", "tags" layout is not to be hardcoded).
3. Tags are currently unsupported, although it should be trivial to implement once a mapping is in place.
4. Merges are unsupported. This requires more thought.
5. The from command in the fast-import stream is ignored. This should probably be implemented like branching.
6. The data can't make round trips back-and-fourth yet. Although this topic has been discussed at length, there is no implementation of this yet.

Thanks for reading.

-- Ram

Ramkumar Ramachandra (5):
date: Expose the time_to_tm function
fast-export: Introduce --inline-blobs
strbuf: Introduce strbuf_fwrite corresponding to strbuf_fread
vcs-svn: Introduce svnload, a dumpfile producer
t9012-svn-fi: Add tests for svn-fi

 .gitignore                        |    1 +
 Documentation/git-fast-export.txt |    5 +
 Makefile                          |    6 +-
 builtin/fast-export.c             |   23 ++-
 cache.h                           |    1 +
 contrib/svn-fe/.gitignore         |    1 +
 contrib/svn-fe/Makefile           |   23 ++-
 contrib/svn-fe/svn-fi.c           |   16 +
 contrib/svn-fe/svn-fi.txt         |   28 ++
 date.c                            |    2 +-
 strbuf.c                          |   11 +
 strbuf.h                          |    1 +
 t/t9012-svn-fi.sh                 |  705 +++++++++++++++++++++++++++++++++++++
 test-svn-fi.c                     |   17 +
 vcs-svn/dir_cache.c               |   52 +++
 vcs-svn/dir_cache.h               |   11 +
 vcs-svn/dump_export.c             |  164 +++++++++
 vcs-svn/dump_export.h             |   26 ++
 vcs-svn/svnload.c                 |  485 +++++++++++++++++++++++++
 vcs-svn/svnload.h                 |   19 +
 20 files changed, 1591 insertions(+), 6 deletions(-)
 create mode 100644 contrib/svn-fe/svn-fi.c
 create mode 100644 contrib/svn-fe/svn-fi.txt
 create mode 100755 t/t9012-svn-fi.sh
 create mode 100644 test-svn-fi.c
 create mode 100644 vcs-svn/dir_cache.c
 create mode 100644 vcs-svn/dir_cache.h
 create mode 100644 vcs-svn/dump_export.c
 create mode 100644 vcs-svn/dump_export.h
 create mode 100644 vcs-svn/svnload.c
 create mode 100644 vcs-svn/svnload.h
Signature · 1 line
1.7.4.rc1.7.g2cf08.dirty