Migrate svn non-standard layout to git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have the following SVN setup:

    Repository: http://svn-server:81/svn/DevJava
    Trunk: trunk/etl_app
    Branches: branches/etl_app
    Tags: tags/etl_app

After reading the manual and git-svn man page I tried the following command in ~/src

    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

This results in outputting this

    Initialized empty Git repository in /home/jim.garrison/git/etl_app/.git/

And 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.

Then I tried using full URLs for -T -t and -b and got:

    Initialized empty Git repository in /home/jim.garrison/git/etl_app/.git/
    Using higher level of URL: http:// svn-server:81/svn/DevJava/trunk/etl_app => http:// svn-server:81/svn/DevJava
    perl: subversion/libsvn_subr/path.c:115: svn_path_join: Assertion `svn_path_is_canonical(component, pool)' failed.
    error: git-svn died of signal 6

By accident, I discovered that the following command gets farther:

    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
    Initialized empty Git repository in /home/jim.garrison/git/etl_app/.git/
    Using higher level of URL: http:// svn-server:81/svn/DevJava/trunk/etl_app => http:// svn-server:81/svn/DevJava
    W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/trunk/etl_app'
    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
    Checked through r40200

This takes a few minutes but finally completes "successfully". 

In 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.

    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
    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

However, neither of the "for-each-ref" commands produces any output, so these are effectively no-ops.

Can 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?

Thanks
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]