Skip to contentSkip to conversation

git-remote-svn: Week 13

GSoC update extra! Ramkumar Ramachandra 3 participants 5 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

I just got a proof-of-concept loader for Subversion working. It just about works for a very small reduced case. I'll still have to hammer it into shape for to handle various cases [1]. In the meantime, we also have to start working on doing the inverse of what svn-dump-fast-export does: convert a Git fast-export stream to a Subversion dumpfile.

David: Can you estimate how challenging the task is going to be?

[1]: I'm working on it directly in trunk. You can find the latest code in subversion/svnrdump in the Subversion trunk.

-- Ram

#1 lore raw

Hi,

Quoted 8 lines

I just got a proof-of-concept loader for Subversion working. It just about works for a very small reduced case. I'll still have to hammer it into shape for to handle various cases [1]. In the meantime, we also have to start working on doing the inverse of what svn-dump-fast-export does: convert a Git fast-export stream to a Subversion dumpfile.

David: Can you estimate how challenging the task is going to be?

Ram, sorry for the late reply, I've been rather sick this week.

Assuming that the fast-export stream will be already linearised... I think it will be more complex than svn-fe even with that constraint. The reason being that going from git to subversion there is a general increase in redundant data.
While svn-fe preserves much of the redundancy of the original svn dump stream, git is able to eliminate much of it.
On the other hand, to produce an svn dump stream we may need to repeat elements encountered earlier in the fast-export stream. We may be able to achieve a simple implementation by placing further restrictions on the form of the fast-export stream.

Quoted 4 lines

[1]: I'm working on it directly in trunk. You can find the latest code in subversion/svnrdump in the Subversion trunk.

-- Ram

On a related note, I've found a defect in the svn dump stream design. Truncation of an svn dump may result in a valid stream with an incomplete trailing commit. Even more fun is that when svnrdump encounters an error in the middle of handling a commit, it will likely produce such a stream. I broked my ASF mirror by loading an incomplete incremental dump. :(

TODO: cross-post the last paragraph to svn-dev.

-- David Barr.

#2 lore raw

Heya,

Quoted 2 lines · David Michael Barr

The reason being that going from git to subversion there is a general increase in redundant data.

I don't understand?

Quoted 2 lines

On the other hand, to produce an svn dump stream we may need to repeat elements encountered earlier in the fast-export stream.

What do you mean with this?

Signature · 3 lines
Cheers,

Sverre Rabbelier
#3 lore raw

Hi,

Quoted 4 lines
Quoted 2 lines

The reason being that going from git to subversion there is a general increase in redundant data.

I don't understand?

The primary issue is a blob may be repeated in a non-copy operation, requiring its content to be described again. This sort of operation only happens 20% of the time with the ASF repository. We would have to either write out the content again or compute a new delta depending on the target version of the svn dump stream.

Quoted 4 lines
Quoted 2 lines

On the other hand, to produce an svn dump stream we may need to repeat elements encountered earlier in the fast-export stream.

What do you mean with this?

See above, there was some redundancy in my post.

--
David Barr.

#4 lore raw

Heya,

Quoted 5 lines · David Michael Barr

The primary issue is a blob may be repeated in a non-copy operation, requiring its content to be described again. This sort of operation only happens 20% of the time with the ASF repository. We would have to either write out the content again or compute a new delta depending on the target version of the svn dump stream.

Ah, you mean that there might be a "'M' SP <mode> SP <dataref> SP <path> LF" line in a non-copy operation. It should probably be not that hard to teach git fast-export to not do that.

Signature · 3 lines
Cheers,

Sverre Rabbelier