threads / discuss / 25444

git-svn clone: file outside trunk

Subject: git-svn clone: file outside trunk

## tl;dr

One message between Oct 14, 2010 and Oct 14, 2010.

replies: 0people: 1as markdown or json

Mathieu Malaterre· Oct 14, 2010, 10:19 UTC · lore
Hi,
  I am trying to use git-svn to import an old svn project. I am not
sure I understand the documentation. For instance I am trying to
import a svn project where a portion of the history was directly at
the root level of the svn server. Eg:
  svnadmin create test
  mkdir out && cd out
  svn co file:///tmp/test
  echo "bla" > bla.c
  svn add bla.c
  svn ci -m"First commit"
  mkdir trunk
  svn add trunk
  svn mv bla.c trunk
  svn ci -m"Second Commit"
Now if I try to import it using git-svn:
$ git svn --no-metadata --stdlayout clone  file:///tmp/test
Initialized empty Git repository in /tmp/git/test/.git/
	A	bla.c
r2 = d40bd2cdcc4208f54b4b092dca0a6b3f2b010fd0 (refs/remotes/trunk)
Checked out HEAD:
  file:///tmp/test/trunk r2

Clearly rev 1 was lost. Is there a way to preserve history before the re-root operation ?

Thanks a bunch !
-- 
Mathieu

← back to recent threads