{"thread":{"id":"3230","subject":"git-svnimport","startedAt":"2006-02-03T19:29:07Z","lastAt":"2006-02-04T03:16:22Z","messageCount":4,"participants":["Jason Harrison","Jason Riedy","Martin Langhoff"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"15523","messageId":"200602031429.07894.jharrison@linuxbs.org","threadId":"3230","inReplyTo":null,"subject":"git-svnimport","fromName":"Jason Harrison","fromEmail":"jharrison@linuxbs.org","sentAt":"2006-02-03T19:29:07Z","receivedAt":"2006-02-03T19:29:07Z","isPatch":false,"sender":{"key":"jharrison@linuxbs.org","avatar":null},"body":"Greetings,\n\nI am trying to import from an svn repository into a git repository using \ngit-svnimport.  So far my attempts have failed.  Here is what I have done so \nfar.\n\ngit-svnimport svn://svn.debian.org/demi/\n\n### Snippet ###\n73: Unrecognized path: /demi.sql\n73: Unrecognized path: /lib/dsa.py\n74: Unrecognized path: /bin/add-demi-machine\ncp: cannot stat `/home/jharrison/svn/demi.git/.git/refs/heads/origin': No such \nfile or directory\nfatal: master: not a valid SHA1\nusage: git-read-tree (<sha> | -m [-u | -i] <sha1> [<sha2> [<sha3>]])\ncheckout failed: 256\n\ngit-svnimport -T demi svn://svn.debian.org/demi/\n\n### Snippet ###\n73: Unrecognized path: /web/machine.py\n73: Unrecognized path: /lib/demi.py\n73: Unrecognized path: /lib/dsa.py\n74: Unrecognized path: /bin/add-demi-machine\n\nThanks for your time.\n\nRegards,\nJason\n"},{"id":"15548","messageId":"16255.1139021263@lotus.CS.Berkeley.EDU","threadId":"3230","inReplyTo":"200602031429.07894.jharrison@linuxbs.org","subject":"Re: git-svnimport","fromName":"Jason Riedy","fromEmail":"ejr@eecs.berkeley.edu","sentAt":"2006-02-04T02:47:43Z","receivedAt":"2006-02-04T02:47:43Z","isPatch":false,"sender":{"key":"ejr@eecs.berkeley.edu","avatar":"https://gravatar.com/avatar/547fa56f887cab01599edab4e9f813c949c1269e02714f20e0496c56185d9837?d=mp&s=160"},"body":"And Jason Harrison writes:\n - I am trying to import from an svn repository into a git repository using \n - git-svnimport.  So far my attempts have failed.  Here is what I have done so \n - far.\n - \n - git-svnimport svn://svn.debian.org/demi/\n[...]\n - git-svnimport -T demi svn://svn.debian.org/demi/\n[...]\n\nIt seems git-svnimport requires one level of directory \nstructure.  Running \n  git-svnimport -T bin svn://svn.debian.org/demi/\ngives me the contents of the bin directory while (noisily)\nignoring everything else.  I think svn repositories\nusually have a structure with branches in one directory,\ntags in another, and its version of HEAD in yet another.\n\nLooking through the git-svnimport source makes it appear\ndifficult to just snarf just one directory (maybe /) out \nof a svn repository.  Actually, it makes everything svn-\nrelated appear difficult.  Why should I worry about\nmemory management by default in Perl?!?  It'd be nice if \nthere were an git-svnimport-trivial that just snarfed a \nsingle URL without tags or branches.\n\nI have to deal with a few repos with bizarre directory \nstructures but _no_ branches or tags, and I found a work-\naround that may be good enough.  Mirroring the repos using\nsvm (or svn-mirror, from SVN::Mirror) then importing the\nmirrors works, but it gives an extraneous first commit.\nExample derived from the svn-mirror/svm man page:\n  env SVMREPOS=${HOME}/svm svn-mirror init mirror/demi \\\n        svn://svn.debian.org/demi\n  env SVMREPOS=${HOME}/svm svn-mirror sync mirror/demi\n  git-svnimport -v -T mirror/demi file://${HOME}/svm\n\nThat may spew messages about unrecognized paths if you \nmirror a few repos, but it should work.  Syncing and re-\nrunning git-svnimport appears to keep things up-to-date, \nbut I haven't had much opportunity to test that.\n\nSVK (same author as SVN::Mirror) might work for creating\na mirror, possibly without the extraneous first commit, \nbut I couldn't figure out the right -T and URL options \nfor git-svnimport.\n\nJason\n"},{"id":"15549","messageId":"46a038f90602031912l1d26b615u563e8a9e9d8c625c@mail.gmail.com","threadId":"3230","inReplyTo":"200602031429.07894.jharrison@linuxbs.org","subject":"Re: git-svnimport","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2006-02-04T03:12:32Z","receivedAt":"2006-02-04T03:12:32Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 2/4/06, Jason Harrison <jharrison@linuxbs.org> wrote:\n> I am trying to import from an svn repository into a git repository using\n> git-svnimport.  So far my attempts have failed.  Here is what I have done so\n> far.\n\nYou always want to be passing the branches and tags parameters\nexplicitly. SVN repos have so many weird layouts that svnimport does a\nbad job without them. Trial and error has worked for me ;-)\n\nSee for instance:\n\n  http://www.gelato.unsw.edu.au/archives/git/0512/14069.html\n\nregards,\n\n\nmartin\n"},{"id":"15550","messageId":"46a038f90602031916x6cfb9e6bg7dfa0fb1cc237dac@mail.gmail.com","threadId":"3230","inReplyTo":"16255.1139021263@lotus.CS.Berkeley.EDU","subject":"Re: git-svnimport","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2006-02-04T03:16:22Z","receivedAt":"2006-02-04T03:16:22Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 2/4/06, Jason Riedy <ejr@eecs.berkeley.edu> wrote:\n> Looking through the git-svnimport source makes it appear\n> difficult to just snarf just one directory (maybe /) out\n> of a svn repository.  Actually, it makes everything svn-\n> related appear difficult.  Why should I worry about\n> memory management by default in Perl?!?\n\nI think that the SVN internals are so yucky that we're lucky to get\naway with \"just\" that bit of memory-handling crud.\n\n>  It'd be nice if\n> there were an git-svnimport-trivial that just snarfed a\n> single URL without tags or branches.\n\nWe're definitely needing some updates to the doco for svnimport to\nmake it easier. Maybe some examples of real life scenarios with\ndifferent repo layouts\n\n> I have to deal with a few repos with bizarre directory\n> structures...\n\nlooks like you're the man for the job ;-)\n\ncheers,\n\n\nmartin\n"}]}