【发布时间】:2012-10-07 02:26:53
【问题描述】:
我和我的小团队使用 Git,而更大的团队使用 Subversion。我想安排一个 cron 作业,以每小时将当前 HEADs 的存储库发布到 SVN 存储库中的某个目录。
我以为我已经弄清楚了,但我之前写下的食谱现在似乎不起作用:
git clone ssh://me@gitserver/git-repo/Projects/ProjX px2
cd px2
svn mkdir --parents http://me@svnserver/svn/repo/play/me/fromgit/ProjX
git svn init -s http://me@svnserver/svn/repo/play/me/fromgit/ProjX
git svn fetch
git rebase trunk master
git svn dcommit
当我尝试时会发生以下情况:
% git clone ssh://me@gitserver/git-repo/Projects/ProjX px2
Cloning into 'ProjX'...
...
% cd px2
% svn mkdir --parents http://me@svnserver/svn/repo/play/me/fromgit/ProjX
Committed revision 123.
% git svn init -s http://me@svnserver/svn/repo/play/me/fromgit/ProjX
Using higher level of URL: http://me@svnserver/svn/repo/play/me/fromgit/ProjX => http://me@svnserver/svn/repo
% git svn fetch
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/play/me/fromgit/ProjX'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
% git rebase trunk master
fatal: Needed a single revision
invalid upstream trunk
我本可以发誓这以前有效,有人有什么建议吗?谢谢。
【问题讨论】:
-
git show remotes 里面有什么?
-
git remotes只显示origin,这是 git 的来源。git svn info返回错误“无法从工作树历史中确定上游 SVN 信息”。 -
另外,
git svn fetch不报告任何错误,也不产生任何输出。