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

Re: Getting correct tree layout when importing svn repo into git

From
MKMichael Kerrisk <michael.kerrisk@googlemail.com>
Date
Sep 16, 2008, 23:40 UTC
Message-ID
<c49095e30809161640o21cb89b7x17a9ac1b5b18054f@mail.gmail.com>
In-Reply-To
<37fcd2780809161620v38d9ade0sc1a2715f79501c6f@mail.gmail.com>
Hello Dmitry,
On Wed, Sep 17, 2008 at 1:20 AM, Dmitry Potapov <dpotapov@gmail.com> wrote:
Show 30 quoted lines
> On Wed, Sep 17, 2008 at 2:05 AM, Michael Kerrisk
> <mtk.manpages@googlemail.com> wrote:
>>
>> I'm currently trying to import an svn repository, along with its tags,
>> into git, and everything seems okay except that after the import I
>> expect to have the following structure to my checked out repository:
>>
>>    [root-dir]
>>        .git
>>        <checked-out-files>
>>
>> But instead I end up with
>>
>>    [root-dir]
>>        .git
>>        man-pages               <-- name of my svn project
>>            <checked-out-files>
>>
>> I've tried out a few different command-line flag settings but so far I
>> haven't managed to get the desired layout.  I guess that I'm missing
>> something trivial, but I haven't worked out what it is so far.
>>
>> The commands I'm using to do the import are:
>>
>> $ git svn init file:///home/mtk/man-pages-rep/ -t tags -T trunk -b branches
>
> Probably, you want to run:
>
> $ git svn init file:///home/mtk/man-pages-rep/ -t tags -T
> trunk/man-pages -b branches

I had wondered about this. And I haven't yet had a chance to verify the result. The reason is that whereas the command:

$ git svn init file:///home/mtk/man-pages-rep/ -t tags -T trunk -b branches

takes about half an hour to run, the other command (which I already started yesterday) seems to be taking (far) more than a day! Therefore, so far, I have not had a chance to run the command to completion to see if it gives the desired result. The greatly increased tun time also made me suspicious about whether the command was going to do the right thing. And, I end up with a lot of strange looking tags in the (as yet incompletely) imported tree:

$ git branch -a
  tags/man-pages-2.00
  tags/man-pages-2.00@117
  tags/man-pages-2.01
  tags/man-pages-2.01@145
  tags/man-pages-2.02
  tags/man-pages-2.02@184
  tags/man-pages-2.03
  tags/man-pages-2.03@232
  tags/man-pages-2.04
  tags/man-pages-2.04@283
What are the @nnn tags about?

By tomorrow, probably the command will complete and I can see whether it produces the desired result. But why does it take so much longer to run this version of the command?

Cheers,
Michael
Previous: Dmitry PotapovNext: Dmitry Potapov
Message 3 of 17 in “Getting correct tree layout when importing svn repo into git”
  1. Michael KerriskSep 16, 2008
  2. Dmitry PotapovSep 16, 2008
  3. Michael KerriskSep 16, 2008
  4. Dmitry PotapovSep 17, 2008
  5. Michael KerriskSep 17, 2008
  6. Andreas EricssonSep 17, 2008
  7. Michael KerriskSep 17, 2008
  8. Michael GebetsroitherSep 17, 2008
  9. Björn SteinbrinkSep 17, 2008
  10. Michael KerriskSep 17, 2008
  11. Michael J GruberSep 17, 2008
  12. Michael KerriskSep 17, 2008
  13. Björn SteinbrinkSep 17, 2008
  14. Michael KerriskSep 17, 2008
  15. Michael J GruberSep 17, 2008
  16. Michael KerriskSep 17, 2008
  17. Michael J GruberSep 17, 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.