2

I'm trying to push the existing git repo into svn.

There are solutions described here and here. That's what I'm doing:

1.Creating git repo:

$ mkdir /blabla/git_repo
$ cd /blabla/git_repo
$ git_init
$ touch hello.c
$ git add hello.c
$ git commit -m "init"

2.Creating svn repo:

$ svnadmin create /blabla/svn_repo
$ cd /blabla/svn_repo
$ vim conf/*
... making initial configuring ...
$ svnserve --daemon --root /blabla/svn_repo/

So, now I have pure svn repository and existing git repository.

3.Pushing git into svn

$ cd /blabla/git_repo
$ svn mkdir --parents svn://localhost/GIT/trunk -m "git import"
$ git svn init svn://localhost -T GIT/trunk
$ git svn fetch
Error from SVN, (220001): Item is not readable: Item is not readable
$ git branch -av
* master 54ab8bf init

So, the SVN branch is not apperaing!

If on step 3 I try to do this:

$ cd /blabla/git_repo
$ svn mkdir --parents svn://localhost/GIT/trunk -m "git import"
$ git svn init svn://localhost          <--  **no "-T" flag here**
$ git svn fetch
Authentication realm: <svn://localhost:3690> 1d926320-a80a-43d5-9e77-9dc2a43fc4f0
Password for 'arsen': 
W: +empty_dir: GIT/trunk
r1 = 8d3e31cf67f29846660ef20faf3454005101e012 (refs/remotes/git-svn)
$ git branch -av
* master          18cbfbd init
  remotes/git-svn 8d3e31c git-svn-id: svn://localhost@1 1d926320-a80a-43d5-9e77-9dc2a43fc4f0

then everything goes OK, except that I can't push git repository into GIT svn project, I can push it only into svn root.

So, what am I doing wrong?

2 Answers 2

2

I've found the trouble.

Though there was "anon-access = read" string in svnserve.conf, I had to add manually "* = r" into svn authz file. Now it works, though doesn't makes sense for me.

Sign up to request clarification or add additional context in comments.

Comments

0

Put something in your SVN tree and try again. (you may remove that later in svn by dump/load)

1 Comment

I've added and commited these files into SVN: /GIT/trunk/1, /GIT/2, /3. I removed and created git repository again. The same story.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.