更改svn repo地址后git svn错误

时间:2011-11-13 11:37:23

标签: git git-svn

我首先使用git svn -s clone

克隆了一个回购
svn+ssh://savannah.psi.ch/afs/psi.ch/project/meg/svn/elog

但后来回购已改为

svn+ssh://svn@savannah.psi.ch/repos/meg/elog

然后我修改.git/config文件,只需更改[remote-svn "svn"]下面的行。然后git svn fetch工作正常,但任何其他svn命令(例如svn infosvn rebase)都会在错误中失败:

  

无法确定工作树历史记录中的上游SVN信息

我搜索了堆栈溢出,之前有人得到了同样的错误,但答案对我不起作用。更改svn-repo地址后我该怎么办?

平台:archlinux; git:1.7.7.3; svn:1.6.17

2 个答案:

答案 0 :(得分:5)

我在使用此解决方案时通过查找revmap问题来到这里,但它得到了变基/提取工作:

http://honk.sigxcpu.org/con/Using_git_svn_when_upstream_moves_the_subversion_repository.html

git config svn-remote.svn.url newUrl
git config svn-remote.svn.rewriteRoot originalUrl
git svn rebase

revmaps似乎没有正确用于合并,不确定标签是否仍然有用...

答案 1 :(得分:0)

尝试仅删除.metadata文件并运行git svn fetch,就好像这是在新的git svn init

之后

另一个想法是:http://ciaran-lee.com/2008/06/13/how-to-fix-git-svn-if-the-svn-repo-moves.html

相关问题