Subject: Re: [SoC RFC] libsvn-fs-git: A git backend for the subversion filesystem

From: Jakub Narebski <[email-masked]>
Date: Thu, 20 Mar 2008 11:01:48 +0100

[Cc: Shawn O. Pearce <[email-masked]>, 
     Bryan Donlan <[email-masked]>,
     [email-masked]]

Shawn O. Pearce wrote:
> Bryan Donlan <[email-masked]> wrote:

>> /revmap/NNN - a reference to the commit hash in the .git-svn branch
>>   corresponding to the given subversion revision number
> 
> How about using a simple flat file interface?  To initially prime
> the file you can do something like:
> 
>         git rev-list --topo-order --date-order --reverse --all \
>                >.git/svn-map 
> 
> and then number the revisions by the line number that they appear on.
> Locating a Git SHA-1 for a specific SVN revision would be a simple
> case of lseek(fd, 41 * rev, SEEK_SET).  Going the other direction
> would be more of a challenge, but is still doable.
> 
> Updating the file should just require appending new commits; if
> the SVN client wants a new commit you append on and return the
> line number.  If Git has caused new commits not in this file you
> need to rebuild the log.  This would have to be done incrementally,
> to prevent changing a prior SVN revision number that clients may
> already know about.

By the way, have you looked into what git-svn uses? IIRC it had some
improvements to avoid spending more disk space on SVN revno <-> Git SHA-1
mapping than on the repository itself...
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git