* git-svnimport
@ 2006-02-03 19:29 Jason Harrison
2006-02-04 2:47 ` git-svnimport Jason Riedy
2006-02-04 3:12 ` git-svnimport Martin Langhoff
0 siblings, 2 replies; 15+ messages in thread
From: Jason Harrison @ 2006-02-03 19:29 UTC (permalink / raw)
To: git
Greetings,
I am trying to import from an svn repository into a git repository using
git-svnimport. So far my attempts have failed. Here is what I have done so
far.
git-svnimport svn://svn.debian.org/demi/
### Snippet ###
73: Unrecognized path: /demi.sql
73: Unrecognized path: /lib/dsa.py
74: Unrecognized path: /bin/add-demi-machine
cp: cannot stat `/home/jharrison/svn/demi.git/.git/refs/heads/origin': No such
file or directory
fatal: master: not a valid SHA1
usage: git-read-tree (<sha> | -m [-u | -i] <sha1> [<sha2> [<sha3>]])
checkout failed: 256
git-svnimport -T demi svn://svn.debian.org/demi/
### Snippet ###
73: Unrecognized path: /web/machine.py
73: Unrecognized path: /lib/demi.py
73: Unrecognized path: /lib/dsa.py
74: Unrecognized path: /bin/add-demi-machine
Thanks for your time.
Regards,
Jason
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2006-02-03 19:29 git-svnimport Jason Harrison
@ 2006-02-04 2:47 ` Jason Riedy
2006-02-04 3:16 ` git-svnimport Martin Langhoff
2006-02-04 3:12 ` git-svnimport Martin Langhoff
1 sibling, 1 reply; 15+ messages in thread
From: Jason Riedy @ 2006-02-04 2:47 UTC (permalink / raw)
To: Jason Harrison; +Cc: git
And Jason Harrison writes:
- I am trying to import from an svn repository into a git repository using
- git-svnimport. So far my attempts have failed. Here is what I have done so
- far.
-
- git-svnimport svn://svn.debian.org/demi/
[...]
- git-svnimport -T demi svn://svn.debian.org/demi/
[...]
It seems git-svnimport requires one level of directory
structure. Running
git-svnimport -T bin svn://svn.debian.org/demi/
gives me the contents of the bin directory while (noisily)
ignoring everything else. I think svn repositories
usually have a structure with branches in one directory,
tags in another, and its version of HEAD in yet another.
Looking through the git-svnimport source makes it appear
difficult to just snarf just one directory (maybe /) out
of a svn repository. Actually, it makes everything svn-
related appear difficult. Why should I worry about
memory management by default in Perl?!? It'd be nice if
there were an git-svnimport-trivial that just snarfed a
single URL without tags or branches.
I have to deal with a few repos with bizarre directory
structures but _no_ branches or tags, and I found a work-
around that may be good enough. Mirroring the repos using
svm (or svn-mirror, from SVN::Mirror) then importing the
mirrors works, but it gives an extraneous first commit.
Example derived from the svn-mirror/svm man page:
env SVMREPOS=${HOME}/svm svn-mirror init mirror/demi \
svn://svn.debian.org/demi
env SVMREPOS=${HOME}/svm svn-mirror sync mirror/demi
git-svnimport -v -T mirror/demi file://${HOME}/svm
That may spew messages about unrecognized paths if you
mirror a few repos, but it should work. Syncing and re-
running git-svnimport appears to keep things up-to-date,
but I haven't had much opportunity to test that.
SVK (same author as SVN::Mirror) might work for creating
a mirror, possibly without the extraneous first commit,
but I couldn't figure out the right -T and URL options
for git-svnimport.
Jason
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2006-02-03 19:29 git-svnimport Jason Harrison
2006-02-04 2:47 ` git-svnimport Jason Riedy
@ 2006-02-04 3:12 ` Martin Langhoff
1 sibling, 0 replies; 15+ messages in thread
From: Martin Langhoff @ 2006-02-04 3:12 UTC (permalink / raw)
To: Jason Harrison; +Cc: git
On 2/4/06, Jason Harrison <jharrison@linuxbs.org> wrote:
> I am trying to import from an svn repository into a git repository using
> git-svnimport. So far my attempts have failed. Here is what I have done so
> far.
You always want to be passing the branches and tags parameters
explicitly. SVN repos have so many weird layouts that svnimport does a
bad job without them. Trial and error has worked for me ;-)
See for instance:
http://www.gelato.unsw.edu.au/archives/git/0512/14069.html
regards,
martin
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2006-02-04 2:47 ` git-svnimport Jason Riedy
@ 2006-02-04 3:16 ` Martin Langhoff
0 siblings, 0 replies; 15+ messages in thread
From: Martin Langhoff @ 2006-02-04 3:16 UTC (permalink / raw)
To: Jason Riedy; +Cc: Jason Harrison, git
On 2/4/06, Jason Riedy <ejr@eecs.berkeley.edu> wrote:
> Looking through the git-svnimport source makes it appear
> difficult to just snarf just one directory (maybe /) out
> of a svn repository. Actually, it makes everything svn-
> related appear difficult. Why should I worry about
> memory management by default in Perl?!?
I think that the SVN internals are so yucky that we're lucky to get
away with "just" that bit of memory-handling crud.
> It'd be nice if
> there were an git-svnimport-trivial that just snarfed a
> single URL without tags or branches.
We're definitely needing some updates to the doco for svnimport to
make it easier. Maybe some examples of real life scenarios with
different repo layouts
> I have to deal with a few repos with bizarre directory
> structures...
looks like you're the man for the job ;-)
cheers,
martin
^ permalink raw reply [flat|nested] 15+ messages in thread
* git-svnimport
@ 2007-03-20 18:00 Christian Wiese
0 siblings, 0 replies; 15+ messages in thread
From: Christian Wiese @ 2007-03-20 18:00 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 3215 bytes --]
Hello folks,
I'd like to use git-svnimport to mirror the subprojects within our svn
repository, but I encountered some pitfalls while testing.
Our Layout is like this:
<SVN_Repository_Root>/{subproject-a,subproject-b}/{trunk,branches,tags}
From the documentation of git-svnimport I assumed that I can use:
------------------------------------------------------
$ git-svnimport -v <SVN_Repository_Root>/subproject-a
------------------------------------------------------
to just fetch subproject-a, but the import fails with an error like
this:
-------snip--------------------------------------------------------------
40: Unrecognized path: /subproject-b/tags
40: Unrecognized path: /subproject-b/trunk
41: Unrecognized path: /subproject-a/trunk/foo/bar.txt
42: Unrecognized path: /subproject-a/trunk/foo/bar.txt
43: Unrecognized path: /subproject-a/trunk/foo/bar.txt
Generating pack...
Done counting 0 objects.
Nothing new to pack.
Removing unused objects 100%...
Done.
DONE; creating master branch
cp: cannot stat `/repos/test/tmp/.git/refs/heads/origin':
No such file or directory
fatal: master: not a valid SHA1
-------snip--------------------------------------------------------------
What am I doing wrong ?
When I am using:
--------------------------------------------------------
$ git-svnimport -v -T subproject-a <SVN_Repository_Root>
--------------------------------------------------------
it gets happily imported.
So I have the impression that the described <SVN_repository_URL> in
the documentation of git-svnimport is in fact the Repository Root of the
svn repo.
For me it looks like git-svnimport makes the assumption that most svn
repos are organized in the following way:
<SVN_repository_URL>/{trunk,branches,tags}/{subproject-a,subproject-b}
I have never seen svn repos organized that way if there are more than
one project inside a repo, and it is even not recommended by the svn
people as we can see here:
http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.branchmerge.maint.layout
So the assumption of git-svnimport, that trunk, branches and tags are
always top-level directories is unlikely the case in most svn
deployments. Most subprojects hosted in a svn repo have their own
trunk, branches and tags directories.
I think the '-P' option of git-svnimport should rather define the
relative path of the subproject from the svn repository root than from
a trunk toplevel directory, which is not existing in most cases.
It might be even useful to rename <SVN_repository_URL> to
<SVN_Repository_Root>
-P <Path_from_SVN_Repository_Root>
By default, the whole repository is imported.
-P my/proj will import starting only from my/proj.
This option is useful when you want to import one project from
a svn repo which hosts multiple projects, that have their own
trunk, branches and tags directory structure.
<SVN_Repository_Root>/<Path_from_SVN_Repository_Root>/{trunk,branches,tags}
As far as I can see now that would ease the use of git-svnimport a lot
and would help people to migrate from svn to git as well.
Any suggestions are highly welcome!
Thanks in advance.
Cheers
--Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* git-svnimport
@ 2007-10-25 9:25 Felipe Balbi
2007-10-25 10:56 ` git-svnimport Johannes Schindelin
0 siblings, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2007-10-25 9:25 UTC (permalink / raw)
To: git
Hello all,
I was importing busybox svn repository to git but I got a connection
timeout after more than 19k commits... is there a way to continue
where the error happened or should I do it all over again ??
Thanks
--
Best Regards,
Felipe Balbi
felipebalbi@users.sourceforge.net
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2007-10-25 9:25 git-svnimport Felipe Balbi
@ 2007-10-25 10:56 ` Johannes Schindelin
2007-10-25 11:08 ` git-svnimport Felipe Balbi
2007-10-26 14:55 ` git-svnimport Gerrit Pape
0 siblings, 2 replies; 15+ messages in thread
From: Johannes Schindelin @ 2007-10-25 10:56 UTC (permalink / raw)
To: Felipe Balbi; +Cc: git
Hi,
On Thu, 25 Oct 2007, Felipe Balbi wrote:
> I was importing busybox svn repository to git but I got a connection
> timeout after more than 19k commits... is there a way to continue where
> the error happened or should I do it all over again ??
AFAICT git-svn is better suited, even to one-shot importing svn.
As it happens, I got interested in this project, too, and did an import
some time ago. For your pleasure, I uploaded it to
http://repo.or.cz/w/busybox.git/
Hth,
Dscho
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2007-10-25 10:56 ` git-svnimport Johannes Schindelin
@ 2007-10-25 11:08 ` Felipe Balbi
2007-10-25 13:04 ` git-svnimport Johannes Schindelin
2007-10-26 14:55 ` git-svnimport Gerrit Pape
1 sibling, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2007-10-25 11:08 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
Hi,
On 10/25/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Thu, 25 Oct 2007, Felipe Balbi wrote:
>
> > I was importing busybox svn repository to git but I got a connection
> > timeout after more than 19k commits... is there a way to continue where
> > the error happened or should I do it all over again ??
>
> AFAICT git-svn is better suited, even to one-shot importing svn.
>
> As it happens, I got interested in this project, too, and did an import
> some time ago. For your pleasure, I uploaded it to
>
> http://repo.or.cz/w/busybox.git/
thanks... much better... I'm cloning your tree and I'll merge with
current busybox tree... ;-)
>
> Hth,
> Dscho
>
>
--
Best Regards,
Felipe Balbi
felipebalbi@users.sourceforge.net
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2007-10-25 11:08 ` git-svnimport Felipe Balbi
@ 2007-10-25 13:04 ` Johannes Schindelin
2007-10-25 22:20 ` git-svnimport Steven Walter
0 siblings, 1 reply; 15+ messages in thread
From: Johannes Schindelin @ 2007-10-25 13:04 UTC (permalink / raw)
To: Felipe Balbi; +Cc: git
Hi,
On Thu, 25 Oct 2007, Felipe Balbi wrote:
> On 10/25/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>
> > On Thu, 25 Oct 2007, Felipe Balbi wrote:
> >
> > > I was importing busybox svn repository to git but I got a connection
> > > timeout after more than 19k commits... is there a way to continue
> > > where the error happened or should I do it all over again ??
> >
> > AFAICT git-svn is better suited, even to one-shot importing svn.
> >
> > As it happens, I got interested in this project, too, and did an
> > import some time ago. For your pleasure, I uploaded it to
> >
> > http://repo.or.cz/w/busybox.git/
>
> thanks... much better... I'm cloning your tree and I'll merge with
> current busybox tree... ;-)
FYI you'll have to do something like this:
git svn init svn://busybox.net/trunk/busybox
git svn fetch
to merge with current busybox (although I updated before I pushed).
Ciao,
Dscho
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2007-10-25 13:04 ` git-svnimport Johannes Schindelin
@ 2007-10-25 22:20 ` Steven Walter
2007-10-25 22:22 ` git-svnimport Johannes Schindelin
0 siblings, 1 reply; 15+ messages in thread
From: Steven Walter @ 2007-10-25 22:20 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Felipe Balbi, git
On Thu, Oct 25, 2007 at 02:04:29PM +0100, Johannes Schindelin wrote:
> FYI you'll have to do something like this:
>
> git svn init svn://busybox.net/trunk/busybox
> git svn fetch
>
> to merge with current busybox (although I updated before I pushed).
More than that, you'll want to:
git svn init <foo>
cp .git/refs/remotes/origin/master .git/refs/remotes/git-svn
git svn fetch
If git-svn doesn't find a remote named "git-svn" it will assume that it
has no information about the repository and starting doing a full
checkout. By copying the ref, git-svn will see that there are already
commits with git-svn-id lines and rebuild its "rev-db". After that, it
will incrementally update for newer revisions.
That ought to save you a few precious minutes :)
--
-Steven Walter <stevenrwalter@gmail.com>
Freedom is the freedom to say that 2 + 2 = 4
B2F1 0ECC E605 7321 E818 7A65 FC81 9777 DC28 9E8F
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2007-10-25 22:20 ` git-svnimport Steven Walter
@ 2007-10-25 22:22 ` Johannes Schindelin
0 siblings, 0 replies; 15+ messages in thread
From: Johannes Schindelin @ 2007-10-25 22:22 UTC (permalink / raw)
To: Steven Walter; +Cc: Felipe Balbi, git
Hi,
On Thu, 25 Oct 2007, Steven Walter wrote:
> On Thu, Oct 25, 2007 at 02:04:29PM +0100, Johannes Schindelin wrote:
> > FYI you'll have to do something like this:
> >
> > git svn init svn://busybox.net/trunk/busybox
> > git svn fetch
> >
> > to merge with current busybox (although I updated before I pushed).
>
> More than that, you'll want to:
>
> git svn init <foo>
> cp .git/refs/remotes/origin/master .git/refs/remotes/git-svn
> git svn fetch
>
> If git-svn doesn't find a remote named "git-svn" it will assume that it
> has no information about the repository and starting doing a full
> checkout. By copying the ref, git-svn will see that there are already
> commits with git-svn-id lines and rebuild its "rev-db". After that, it
> will incrementally update for newer revisions.
>
> That ought to save you a few precious minutes :)
Good catch. Thanks.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2007-10-25 10:56 ` git-svnimport Johannes Schindelin
2007-10-25 11:08 ` git-svnimport Felipe Balbi
@ 2007-10-26 14:55 ` Gerrit Pape
2007-10-26 16:45 ` git-svnimport Johannes Schindelin
1 sibling, 1 reply; 15+ messages in thread
From: Gerrit Pape @ 2007-10-26 14:55 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
On Thu, Oct 25, 2007 at 11:56:44AM +0100, Johannes Schindelin wrote:
> On Thu, 25 Oct 2007, Felipe Balbi wrote:
> > I was importing busybox svn repository to git but I got a connection
> > timeout after more than 19k commits... is there a way to continue where
> > the error happened or should I do it all over again ??
>
> AFAICT git-svn is better suited, even to one-shot importing svn.
AIUI git-svnimport provides a subset of git-svn's functionality.
There've been some problems with git-svnimport reported through the
Debian BTS
http://bugs.debian.org/436930
http://bugs.debian.org/447325
http://bugs.debian.org/447965
I'm not sure these are worth fixing, I'd rather suggest to drop
git-svnimport in favor of git-svn, and not installing it in future
versions.
Regards, Gerrit.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2007-10-26 14:55 ` git-svnimport Gerrit Pape
@ 2007-10-26 16:45 ` Johannes Schindelin
2007-10-26 18:06 ` git-svnimport Steven Grimm
0 siblings, 1 reply; 15+ messages in thread
From: Johannes Schindelin @ 2007-10-26 16:45 UTC (permalink / raw)
To: Gerrit Pape; +Cc: git
Hi,
On Fri, 26 Oct 2007, Gerrit Pape wrote:
> http://bugs.debian.org/436930
> http://bugs.debian.org/447325
> http://bugs.debian.org/447965
>
> I'm not sure these are worth fixing, I'd rather suggest to drop
> git-svnimport in favor of git-svn, and not installing it in future
> versions.
I already proposed this. The outcome was... silent.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2007-10-26 16:45 ` git-svnimport Johannes Schindelin
@ 2007-10-26 18:06 ` Steven Grimm
2007-10-26 19:30 ` git-svnimport Junio C Hamano
0 siblings, 1 reply; 15+ messages in thread
From: Steven Grimm @ 2007-10-26 18:06 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Gerrit Pape, git
Johannes Schindelin wrote:
>> I'm not sure these are worth fixing, I'd rather suggest to drop
>> git-svnimport in favor of git-svn, and not installing it in future
>> versions.
>>
> I already proposed this. The outcome was... silent.
>
Me too, and same reaction.
So I vote we interpret that as, "No objections from anyone."
-Steve
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: git-svnimport
2007-10-26 18:06 ` git-svnimport Steven Grimm
@ 2007-10-26 19:30 ` Junio C Hamano
0 siblings, 0 replies; 15+ messages in thread
From: Junio C Hamano @ 2007-10-26 19:30 UTC (permalink / raw)
To: Steven Grimm; +Cc: Johannes Schindelin, Gerrit Pape, git
Steven Grimm <koreth@midwinter.com> writes:
> Johannes Schindelin wrote:
>>> I'm not sure these are worth fixing, I'd rather suggest to drop
>>> git-svnimport in favor of git-svn, and not installing it in future
>>> versions.
>>>
>> I already proposed this. The outcome was... silent.
>>
>
> Me too, and same reaction.
>
> So I vote we interpret that as, "No objections from anyone."
Likewise.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-10-26 19:30 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-03 19:29 git-svnimport Jason Harrison
2006-02-04 2:47 ` git-svnimport Jason Riedy
2006-02-04 3:16 ` git-svnimport Martin Langhoff
2006-02-04 3:12 ` git-svnimport Martin Langhoff
-- strict thread matches above, loose matches on Subject: below --
2007-03-20 18:00 git-svnimport Christian Wiese
2007-10-25 9:25 git-svnimport Felipe Balbi
2007-10-25 10:56 ` git-svnimport Johannes Schindelin
2007-10-25 11:08 ` git-svnimport Felipe Balbi
2007-10-25 13:04 ` git-svnimport Johannes Schindelin
2007-10-25 22:20 ` git-svnimport Steven Walter
2007-10-25 22:22 ` git-svnimport Johannes Schindelin
2007-10-26 14:55 ` git-svnimport Gerrit Pape
2007-10-26 16:45 ` git-svnimport Johannes Schindelin
2007-10-26 18:06 ` git-svnimport Steven Grimm
2007-10-26 19:30 ` git-svnimport Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).