From: Pascal Obry <pascal@obry.net>
To: git list <git@vger.kernel.org>
Subject: Question about git-svn import
Date: Mon, 17 Dec 2007 18:18:29 +0100 [thread overview]
Message-ID: <4766AF65.5060706@obry.net> (raw)
Hi,
You'll find a script into this message that reproduce what I'll describe
below. Basically the Subversion repository add a given structure in the
past then rearranged to use the "standard" structure. The former
structure was:
<root>
|
| - dir1
| - dir2
The new one is:
<root>
|
|- trunk
| | - dir1
| | - dir2
|- branches
|- tags
Now I want to import this project into Git (using git-svn) as the
project won't leave Subversion for the moment. When doing:
$ git svn clone -s <repo> <git-repo>
In git-repo we get only the commits done inside <root>/trunk and not the
commits done in the former repository.
The question is what is the best way to deal with such a case with git-svn ?
Thanks.
############################ CUT HERE #############################
#!/bin/sh
REP=file://$(pwd)/repo
rm -fr repo co-repo git-repo
svnadmin create repo
svn co $REP co-repo
cd co-repo
mkdir dir
echo file1 > dir/file1
svn add dir dir/file1
svn ci -m "ci1" dir dir/file1
svn mkdir -m "create trunk" $REP/trunk
svn mkdir -m "create branches" $REP/branches
svn mkdir -m "create tags" $REP/tags
svn move -m "move dir under trunk" $REP/dir $REP/trunk/dir
svn update
sleep 2
echo file1 >> trunk/dir/file1
svn ci -m "ci2" trunk/dir/file1
sleep 2
svn update
cd ..
git svn clone -s $REP git-repo
############################ CUT HERE #############################
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
next reply other threads:[~2007-12-17 17:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 17:18 Pascal Obry [this message]
2007-12-18 3:48 ` Question about git-svn import Steven Walter
2007-12-18 7:10 ` Pascal Obry
2007-12-18 15:31 ` Jörg Sommer
2007-12-19 11:29 ` Pascal Obry
2007-12-20 16:30 ` Pascal Obry
2007-12-20 16:52 ` Jörg Sommer
2007-12-21 13:11 ` Pascal Obry
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=4766AF65.5060706@obry.net \
--to=pascal@obry.net \
--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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.