{"thread":{"id":"35240","subject":"Migrate svn non-standard layout to git","startedAt":"2013-10-29T20:04:56Z","lastAt":"2013-10-29T20:04:56Z","messageCount":1,"participants":["Jim Garrison"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"229744","messageId":"0C723FEB5B4E5642B25B451BA57E273041FD42F6@S1P5DAG3C.EXCHPROD.USA.NET","threadId":"35240","inReplyTo":null,"subject":"Migrate svn non-standard layout to git","fromName":"Jim Garrison","fromEmail":"jim.garrison@nwea.org","sentAt":"2013-10-29T20:04:56Z","receivedAt":"2013-10-29T20:04:56Z","isPatch":false,"sender":{"key":"jim.garrison@nwea.org","avatar":null},"body":"I have the following SVN setup:\n\n    Repository: http://svn-server:81/svn/DevJava\n    Trunk: trunk/etl_app\n    Branches: branches/etl_app\n    Tags: tags/etl_app\n\nAfter reading the manual and git-svn man page I tried the following command in ~/src\n\n    git svn clone -T trunk/etl_app -b branches/etl_app -t tags/etl_app --authors-file=users.txt --no-metadata http://svn-server:81/svn/DevJava etl_app\n\nThis results in outputting this\n\n    Initialized empty Git repository in /home/jim.garrison/git/etl_app/.git/\n\nAnd then.... nothing. It appears to hang, but is consuming about 10% CPU and no I/O as far as I can determine.  I let it run for 30 minutes and checked the contents of the etl_app subdirectory from another terminal session but it never produced any more terminal output or wrote anything to the local disk.\n\nThen I tried using full URLs for -T -t and -b and got:\n\n    Initialized empty Git repository in /home/jim.garrison/git/etl_app/.git/\n    Using higher level of URL: http:// svn-server:81/svn/DevJava/trunk/etl_app => http:// svn-server:81/svn/DevJava\n    perl: subversion/libsvn_subr/path.c:115: svn_path_join: Assertion `svn_path_is_canonical(component, pool)' failed.\n    error: git-svn died of signal 6\n\nBy accident, I discovered that the following command gets farther:\n\n    git svn clone -T trunk/etl_app -b branches/etl_app -t tags/etl_app --authors-file=users.txt --no-metadata http:// svn-server:81/svn/DevJava/trunk/etl_app etl_app\n    Initialized empty Git repository in /home/jim.garrison/git/etl_app/.git/\n    Using higher level of URL: http:// svn-server:81/svn/DevJava/trunk/etl_app => http:// svn-server:81/svn/DevJava\n    W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/trunk/etl_app'\n    W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.\n    This may take a while on large repositories\n    Checked through r40200\n\nThis takes a few minutes but finally completes \"successfully\". \n\nIn the Git online book's migration chapter it then says to execute a couple of commands to move the svn tags and branches to proper Git tags and branches.\n\n    git for-each-ref refs/remotes/tags | cut -d / -f 4- | grep -v @ | while read tagname; do git tag \"$tagname\" \"tags/$tagname\"; git branch -r -d \"tags/$tagname\"; done\n    git for-each-ref refs/remotes | cut -d / -f 3- | grep -v @ | while read branchname; do git branch \"$branchname\" \"refs/remotes/$branchname\"; git branch -r -d \"$branchname\"; done\n\nHowever, neither of the \"for-each-ref\" commands produces any output, so these are effectively no-ops.\n\nCan someone explain what's going on? How do I get the svn tags and branches fetched so I can migrate the svn repository to git without losing them?\n\nThanks\n"}]}