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

Re: Approaches to SVN to Git conversion (was: Re: [RFC] "Remote helper for Subversion" project)

From
SBStephen Bash <bash@genarts.com>
Date
Mar 6, 2012, 20:35 UTC
Message-ID
<ab5eb5a7-a446-4dc3-b8e8-e3f7ec306452@mail>
In-Reply-To
<CA+7g9Jwb=7wH7R3=ShhOGMdHXWmq4ZahocpaEuJdf+yBfCpA8A@mail.gmail.com>
----- Original Message -----
Show 39 quoted lines
> From: "Nathan Gray" <n8gray@n8gray.org>
> Sent: Tuesday, March 6, 2012 2:29:59 PM
> Subject: Re: Approaches to SVN to Git conversion (was: Re: [RFC] "Remote helper for Subversion" project)
> 
> > > Personally, I think SVN export will always need a strong manual
> > > component to get the best results, so I've put quite a bit of work
> > > into designing a good SVN history format.  Like git-fast-import,
> > > it's an ASCII format designed both for human and machine
> > > consumption...
> >
> > First, I'm very impressed that you managed to get a language like
> > this up and working.  It could prove very useful going forward.   On
> > the flip side, from my experiments over the last year I've actually
> > been leaning toward a solution that is more implicit than explicit.
> > Taking git-svn as a model, I've been trying to define a mapping
> > system (in Perl):
> >
> >  my %branch_spec = { '/trunk/projname' => 'master',
> >                      '/branches/*/projname' => '/refs/heads/*' };
> >  my %tag_spec = { '/tags/*/projname' => '/refs/tags/*' };
> 
> The problem of specifying and detecting branches is a major problem in
> my upcoming conversion.  We've got toplevel trunk/branches/tags
> directories but underneath "branches" it's a free-for-all:
> 
> /branches/codenameA/{projectA,projectB,projectC}
> /branches/codenameB   (actually a branch of projectA)
> /branches/developers/joe/frobnicator-experiment (also a branch of
> projectA)
> 
> Clearly there's no simple regex that's going to capture this, so I'm
> reduced to listing every branch of projectA, which is tedious and
> error-prone.  However, what *would* work fabulously well for me is
> "marker file" detection.  Every copy of projectA has a certain file at
> it's root.  Let's call it "markerFile.txt".  What I'd really love is a
> way to say:
> 
> my %branch_markers = {'/branches/**/markerFile.txt' =>
>                       '/refs/heads/**'}
Ooo...  I like it.  I hadn't hit on this idea yet, but it certainly is a very helpful heuristic.  I doubt I'd have any sort of demo code for you in the near future, but it's definitely an idea to roll into the mix.

Thanks, Stephen

Previous: Nathan GrayNext: Sam Vilain
Message 10 of 22 in “[RFC] "Remote helper for Subversion" project”
  1. David BarrMar 3, 2012
  2. David BarrMar 3, 2012
  3. Jonathan NiederMar 4, 2012
  4. David BarrMar 4, 2012
  5. Andrew SayersMar 4, 2012
  6. Approaches to SVN to Git conversion (was: Re: [RFC] "Remote helper for Subversion" project)Stephen Bash, Mar 5, 2012
  7. Andrew SayersMar 5, 2012
  8. Stephen BashMar 6, 2012
  9. Nathan GrayMar 6, 2012
  10. Stephen BashMar 6, 2012
  11. Sam VilainMar 6, 2012
  12. Andrew SayersMar 7, 2012
  13. Sam VilainMar 7, 2012
  14. Andrew SayersMar 8, 2012
  15. Andrew SayersMar 6, 2012
  16. Sam VilainMar 7, 2012
  17. Andrew SayersMar 7, 2012
  18. Phil HordMar 7, 2012
  19. Nathan GrayMar 7, 2012
  20. Andrew SayersMar 7, 2012
  21. Jonathan NiederMar 4, 2012
  22. Ramkumar RamachandraMar 27, 2012

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.