Unable to complete svn2git in a shell script

221 Views Asked by At

I am migrating a SVN codebase to Git and need to create more than 30 projects. Hence I approached this problem by automating the steps in a shell script.

Below is the code snippet

test.sh

#!/bin/sh
svn2git http(s)://svn.yyy.xxx.com:1080/SVNROOT/PROJECTSUITE --trunk trunk/SOURCES/Project1 --notags --nobranches --authors /Users/praveen/users.txt --verbose > log.txt
git remote add origin [email protected]:PROJECTSUITE/Project1.git 
git push origin --all 

I am able to perform this migration successfully when the commands are executed individually from the terminal.

Terminal

$ svn2git http(s)://svn.yyy.xxx.com:1080/SVNROOT/MERLINSUITE --username praveen  --trunk trunk/SERVER_SOURCES/MerlinTMS --notags --nobranches --authors /Users/praveen/users.txt --verbose
Running command: git svn init --prefix=svn/ --no-metadata --trunk=trunk/SOURCES/Project1 http(s)://svn.yyy.xxx.com:1080/SVNROOT/PROJECTSUITE
Initialized empty Git repository in /Users/praveen/projectFolder/.git/
Running command: git config --local --get user.name
Running command: git config --local svn.authorsfile /Users/praveen/users.txt
Running command: git svn fetch 
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/trunk/SOURCES/Project1'
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
....
....
success :)

But when the above shell script is executed using verbose it gets stuck. The project tested was around 30MB in size.

log.txt

Running command: git svn init --prefix=svn/  --no-metadata --trunk=trunk/SOURCES/Project1 http(s)://svn.yyy.xxx.com:1080/SVNROOT/PROJECTSUITE

What am I doing wrong? Is it that svn2git cannot be called within a shell script?

0

There are 0 best solutions below