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

Re: Question about git-svn import

From
JSJörg Sommer <joerg@alea.gnuu.de>
Date
Dec 18, 2007, 15:31 UTC
Message-ID
<20071218153159.GA12549@alea.gnuu.de>
In-Reply-To
<4767724A.9040207@obry.net>
Hello Pascal,
Pascal Obry schrieb am Tue 18. Dec, 08:10 (+0100):
Show 5 quoted lines
> Steven Walter a écrit :
> > Not sure if this is the best way, but I would recommend cloning into two
> > repositories, then combining them.  
> 
> I feared that :)
It's not as complicated as you might think.
Show 12 quoted lines
> > So you already have the newer
> > changes with the standard layout.  You would now:
> > 
> >     $ git svn init <repo>
> > 
> > And only fetch the revisions before the layout change.  You could then
> > combine the two repositories using .git/info/grafts and
> > git-rewrite-branch.
> 
> Hum, looks like something not easy to do (at least for a Git beginner
> like me) ! Any documentation on this ? Would you mind showing this on
> the example script I sent ?

I had the same problem. We changed the structure of our SVN repository from /trunk/pkg to /pkg/trunk and git-svn couldn't deal with this.

I used the script posted in http://lists.alioth.debian.org/pipermail/pkg-jed-devel/2007-December/001719.html to do the switch.

Some suggestions:
1. Import both parts into one git repo into their own branches. (use
   --prefix)
2. Use gitk to insprect the history to find bad commits, e.g. empty
   commits or things git-svn imported wrong.
3. Use git-filter-branch with the --parent-filter to join the branches.
HTH, Jörg.
-- 
Die am Lautesten reden, haben stets am wenigsten zu sagen.
Previous: Pascal ObryNext: Pascal Obry
Message 4 of 8 in “Question about git-svn import”
  1. Pascal ObryDec 17, 2007
  2. Steven WalterDec 18, 2007
  3. Pascal ObryDec 18, 2007
  4. Jörg SommerDec 18, 2007
  5. Pascal ObryDec 19, 2007
  6. Pascal ObryDec 20, 2007
  7. Jörg SommerDec 20, 2007
  8. Pascal ObryDec 21, 2007

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.