开发者

Trouble pushing from git to subversion using git-svn

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
E开发者_运维知识库rror 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?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜