Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Matthias Urlichs <smurf@smurf.noris.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] SVN import: Use one log call
Date: Tue, 29 Nov 2005 12:22:11 -0800	[thread overview]
Message-ID: <7vhd9vdx1o.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: pan.2005.11.29.07.13.02.145977@smurf.noris.de

Matthias Urlichs <smurf@smurf.noris.de> writes:

> One "svn log" (or its equivalent) per revision adds delay and server load.
> Instead, open two SVN connections -- one for the log, and one for the files.

Thanks, applied and pushed out.

BTW, I've never successfully managed to run svnimport from my
private svn repository.  Admittedly the repository does not
follow the recommended layout and that probably is the major
cause (it started its life when svn documentation recommended
{trunk,branches,tags}/{projectA,projectB,projectC} layout.
{projectA,projectB,projectC}/{trunk,branches,tags} is the layout
they recommend these days, I think [*1*]).

It does not use any branches (it is primarily a random
collection of small throwaway scripts).  The repository hosts
many unrelated pieces ("http://127.0.0.1/svn/private/" is the
root level of the repository), organized like this:

    $ svn ls http://127.0.0.1/svn/private/
    attic/
    main/
    tags/

   main/ is the active one (trunk), and it has bunch of
   unrelated subdirectories.

   attic/ is where I prepared to "svn mv" things from main/ that
   are no longer needed, but is empty.

   tags/ have one tree that is a copy of one of the subtrees
   under main/ from distant past.

I wanted to convert one of the subsubdirectory of main to git.

    $ svn ls http://127.0.0.1/svn/private/main/sources/photocat
    Makefile
    Notes
    cmdmason.pm
    ...

What is the svnimport command line I should give?  Luckily, I do
not have "tags" or "branches" under private/main/sources/, so I
tried to cheat like this, hoping it would mistake "photocat" is the trunk of 
"main/sources" project in the repository.  No such luck.

$ cd /var/tmp && rm -fr try0 && mkdir try0 && cd try0
$ git svnimport -v -i -t photocat http://127.0.0.1/svn/private main/sources
1: Unrecognized path: /main/sources
1: Unrecognized path: /main/in-place
1: Unrecognized path: /main
...
1500: Unrecognized path: /main/sources/photocat/db/catalog.sql
1501: Unrecognized path: /main/sources/photocat/data/035-maribon-making.yaml
DONE; creating master branch
cp: cannot stat `/var/tmp/try0/.git/refs/heads/origin': No such file or directory
fatal: master: not a valid SHA1
$ 

If your answer is "your repository layout is too weird and
nonstandard, you are screwed", that is perfectly fine.  I do not
want you to bend over backwards to butcher the import script to
support it, if it is too nonstandard.  I already converted what
I wanted to convert manually already; history being linear
without branches, that was easy enough.

But I thought it would never hurt to ask ;-).

[Footnote]

*1*

http://svnbook.red-bean.com/en/1.1/svn-book.html#svn-ch-5-sect-6.1
shows two layouts, one with {trunk,tags,branches} at the top
level of each project, another with nested projects (if you look
at "utils" in the picture as a project with two subcomponents
"calc" and "calendar"), with {trunk,tags,branches} under each
subproject.  I think the current code should import from
"calendar" or "calc" level just fine, but I wonder if we want to
support importing from "utils" level.

  reply	other threads:[~2005-11-29 20:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-29  7:13 [PATCH] SVN import: Use one log call Matthias Urlichs
2005-11-29 20:22 ` Junio C Hamano [this message]
2005-11-30  2:46   ` Matthias Urlichs
2005-11-30  3:54   ` Nicolas Pitre
2005-11-30  6:52     ` Matthias Urlichs
2005-11-30  7:54       ` Junio C Hamano
2005-11-30  8:34         ` Matthias Urlichs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vhd9vdx1o.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=smurf@smurf.noris.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox