git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
HHHarvey Harrison <harvey.harrison@gmail.com>
Date
Mar 20, 2008, 06:18 UTC
Message-ID
<1205993915.17607.32.camel@brick>
In-Reply-To
<20080320045632.GB8410@spearce.org>
On Thu, 2008-03-20 at 00:56 -0400, Shawn O. Pearce wrote:
Show 20 quoted lines
> Bryan Donlan <bdonlan@gmail.com> 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.

Why not just copy the rev_map format git-svn already uses, it's pretty efficient.

Harvey
Previous: Shawn O. PearceNext: Julian Phillips
Message 4 of 11 in “[SoC RFC] libsvn-fs-git: A git backend for the subversion filesystem”
  1. Bryan DonlanMar 19, 2008
  2. Sam VilainMar 20, 2008
  3. Shawn O. PearceMar 20, 2008
  4. Harvey HarrisonMar 20, 2008
  5. Julian PhillipsMar 20, 2008
  6. Jakub NarebskiMar 20, 2008
  7. Bryan DonlanMar 22, 2008
  8. thread-safe libgit.a as a GSoC project, was Re: [SoC RFC] libsvn-fs-git: A git backend for the subversion filesystemJohannes Schindelin, Mar 22, 2008
  9. Govind SalinasMar 23, 2008
  10. Johannes SchindelinMar 23, 2008
  11. Bryan DonlanMar 24, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.