I'm playing around in vcs-svn/ to start a framework for detecting and
processing branches in svndumps. So I wanted to let you know about my ideas.
1. Import linearly and split later:
One idea is to import from svn linearly, i.e. one revision on top of it's
predecessor, like now, and detect and split branches afterwards. The svn
metadata is stored in git notes, so the required information would be
+ allows recovery, because the linear history is always here.
+ it's easier to peek around in the git history than in the svn dump during
import to do the branch detection.
- requires creation of new commits in the branch detection stage.
- this results in double commits and awkward history, linear vs. branched.
2. Split during import:
Detect branches as they are created while reading the svn dump and identify to
which branch a following node belongs.
First step is to restructure svndump.c to be able to buffer one complete
revision for inspection before starting to write a commit to fast import.
Probably it's possible to feed the blobs to fast import directly and only
buffer node data and defer commit creation, but not the data.
Currently, at the beginning of a new revision on the svn side, a new commit is
created on top of a constant ref. When we support branches, we don't know the
ref, i.e. the branch(es), the revision changes, before reading all the 'Node-
+ feels more 'right'
- requires revision buffering
Detect branches as they are created by 'Node-copyfrom*' to some commonly used
branch directories, like branches/. More complex branch detection can be
implemented later, of course.
Store detected branches permanently (necessary for incremental fetches), and
assign every file modification to one of those branches, if possible. Else
assign them to, hm ..
If a revision modifies more than one branch, create multiple commits.
Thanks for your comments and ideas!
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html