Publish Git repository to SVN
Posted
by
Ken Williams
on Stack Overflow
See other posts from Stack Overflow
or by Ken Williams
Published on 2012-10-16T21:51:11Z
Indexed on
2012/10/27
23:01 UTC
Read the original article
Hit count: 222
I and my small team work in Git, and the larger group uses Subversion. I'd like to schedule a cron job to publish our repositories current HEAD
s every hour into a certain directory in the SVN repo.
I thought I had this figured out, but the recipe I wrote down previously doesn't seem to be working now:
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
Here's what happens when I attempt:
% 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
I could have sworn this worked previously, anyone have any suggestions? Thanks.
© Stack Overflow or respective owner