From: Christian Wiese <morfoh@opensde.org>
To: git@vger.kernel.org
Subject: git-svnimport
Date: Tue, 20 Mar 2007 20:00:11 +0200 [thread overview]
Message-ID: <20070320200011.444bd942@athlon> (raw)
[-- 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 --]
next reply other threads:[~2007-03-20 18:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-20 18:00 Christian Wiese [this message]
-- strict thread matches above, loose matches on Subject: below --
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
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
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070320200011.444bd942@athlon \
--to=morfoh@opensde.org \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).