{"thread":{"id":"5933","subject":"RE: git-svn and u-boot broken.","startedAt":"2006-10-15T22:09:49Z","lastAt":"2006-10-18T17:22:46Z","messageCount":6,"participants":["Joakim Tjernlund","Eric Wong","Seth Falcon"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"28819","messageId":"012b01c6f0a6$a1a636e0$1267a8c0@Jocke","threadId":"5933","inReplyTo":null,"subject":"RE: git-svn and u-boot broken.","fromName":"Joakim Tjernlund","fromEmail":"joakim.tjernlund@transmode.se","sentAt":"2006-10-15T22:09:49Z","receivedAt":"2006-10-15T22:09:49Z","isPatch":false,"sender":{"key":"joakim.tjernlund@transmode.se","avatar":null},"body":"> > > Any chance you can update it with more examples?\n> > > Especially one that show how one can do one big initial\n> > > commit then merge your own changes on top of that?\n> > \n> > Hmm.. large imports from git to svn can get confusing, and generally\n> > aren't very useful on the svn side since history gets flattened.\n> > So I generally don't recommend importing complete git histories into\n> > svn.\n> \n> Yes, that's what I am trying to avoid below. Basically I want \n> to commit to SVN the\n> whole u-boot tree as one commit up to the point where I \n> started to do my changes.\n> Then I want my changes per commit on top of that. However I \n> don't want to loose the\n> ability to merge/pull in future updates from denx u-boot tree.\n> \n> I just don't know how to do it, the script below fails when \n> it tries to \n> pull the rest of the tree. Any ideas?\n\nI really need some advice here, if you can share some ideas that would be great.\n\n> \n> > \n> > > Something like this\n> > > REPO=\"file:///tmp/SVNuboot\"\n> > > REPO_PATH=\"/tmp/SVNuboot\"\n> > > GIT_REPO=\"/tmp/mygituboot\"\n> > > ORG_REPO=\"/usr/local/src/u-boot\"\n> > > rm -rf \"$REPO_PATH\"\n> > > rm -rf \"$GIT_REPO\"\n> > > svnadmin create \"$REPO_PATH\"\n> > > svn mkdir -m \"initial repo layout\" \"$REPO\"/trunk \n> > \"$REPO\"/branches \"$REPO\"/tags\n> > > mkdir -p \"$GIT_REPO\"\n> > > cd \"$GIT_REPO\"\n> > > git-svn init \"$REPO\"/trunk\n> > > echo  [user] >> .git/config\n> > > echo  name=\"jocke\" >> .git/config\n> > > echo  email=\"Joakim.Tjernlund@transmode.se\" >> .git/config\n> > > git-svn fetch\n> > > git checkout -b svn-branch remotes/git-svn\n> > > git-fetch \"$ORG_REPO\" tmcu2:tmcu\n> > > git-branch initial-uboot f5e0d03970409feb3c77ab0107d5dece6b7d45c9\n> > > git pull . initial-uboot\n> > > # --squash makes one large commit.\n> > > git pull --squash . initial-uboot\n> > > cg-commit -m \"merge up to \n> f5e0d03970409feb3c77ab0107d5dece6b7d45c9\"\n> > > git-svn commit -q remotes/git-svn..svn-branch\n> > > git pull . tmcu # This doesn't work, I get merge conflicts\n> > > git-svn commit -q remotes/git-svn..svn-branch\n> > > \n> > > Anyhow, I am glad to report that after applying your patch all my\n> > > problems with went away, no more Too many open file desc,  memory\n> > > alloc failed or Inappropriate ioctl for device, Thanks a lot.\n> > \n> > Cool, good to know.  It seems like the apply_textdelta \n> returning undef\n> > was a result of memory allocation failures, then.\n> \n> Or possibly the older subversion I used(1.3.2), now I am on 1.4.0 \n> \n"},{"id":"28833","messageId":"20061016034736.GA8782@localdomain","threadId":"5933","inReplyTo":"012b01c6f0a6$a1a636e0$1267a8c0@Jocke","subject":"Re: git-svn and u-boot broken.","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-10-16T03:47:36Z","receivedAt":"2006-10-16T03:47:36Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:\n> > > > Any chance you can update it with more examples?\n> > > > Especially one that show how one can do one big initial\n> > > > commit then merge your own changes on top of that?\n> > > \n> > > Hmm.. large imports from git to svn can get confusing, and generally\n> > > aren't very useful on the svn side since history gets flattened.\n> > > So I generally don't recommend importing complete git histories into\n> > > svn.\n> > \n> > Yes, that's what I am trying to avoid below. Basically I want \n> > to commit to SVN the\n> > whole u-boot tree as one commit up to the point where I \n> > started to do my changes.\n> > Then I want my changes per commit on top of that. However I \n> > don't want to loose the\n> > ability to merge/pull in future updates from denx u-boot tree.\n> > \n> > I just don't know how to do it, the script below fails when \n> > it tries to \n> > pull the rest of the tree. Any ideas?\n> \n> I really need some advice here, if you can share some ideas that would be great.\n> \n> > \n> > > \n> > > > Something like this\n> > > > REPO=\"file:///tmp/SVNuboot\"\n> > > > REPO_PATH=\"/tmp/SVNuboot\"\n> > > > GIT_REPO=\"/tmp/mygituboot\"\n> > > > ORG_REPO=\"/usr/local/src/u-boot\"\n> > > > rm -rf \"$REPO_PATH\"\n> > > > rm -rf \"$GIT_REPO\"\n> > > > svnadmin create \"$REPO_PATH\"\n> > > > svn mkdir -m \"initial repo layout\" \"$REPO\"/trunk \n> > > \"$REPO\"/branches \"$REPO\"/tags\n> > > > mkdir -p \"$GIT_REPO\"\n> > > > cd \"$GIT_REPO\"\n> > > > git-svn init \"$REPO\"/trunk\n> > > > echo  [user] >> .git/config\n> > > > echo  name=\"jocke\" >> .git/config\n> > > > echo  email=\"Joakim.Tjernlund@transmode.se\" >> .git/config\n> > > > git-svn fetch\n> > > > git checkout -b svn-branch remotes/git-svn\n> > > > git-fetch \"$ORG_REPO\" tmcu2:tmcu\n\nI assume the tmcu* branch is private as I don't see it in the u-boot\nrepo.\n\n> > > > git-branch initial-uboot f5e0d03970409feb3c77ab0107d5dece6b7d45c9\n> > > > git pull . initial-uboot\n> > > > # --squash makes one large commit.\n> > > > git pull --squash . initial-uboot\n> > > > cg-commit -m \"merge up to \n> > f5e0d03970409feb3c77ab0107d5dece6b7d45c9\"\n> > > > git-svn commit -q remotes/git-svn..svn-branch\n> > > > git pull . tmcu # This doesn't work, I get merge conflicts\n> > > > git-svn commit -q remotes/git-svn..svn-branch\n\nUsing -q suppresses potentially useful information.  I wouldn't use\nit if you're not sure about what you're doing.\n\nI would do something like this:\n\n... (same stuff as above before with svn setup...)\ngit clone $ORG_REPO $GIT_REPO\ncd $GIT_REPO\ngit-svn init \"$REPO\"/trunk\ngit-svn fetch\n\n# sync the SVN repo with initial-uboot\n# this will just commit a snapshot, without history, which I assume\n# is what you want.\ngit-branch initial-uboot f5e0d03970409feb3c77ab0107d5dece6b7d45c9\ngit-svn commit initial-uboot\ngit checkout -b svn-branch remotes/git-svn\ngit-pull . tmcu2\n\n# this should work assuming the path from initial-uboot..tmcu2 is linear\n# use gitk initial-uboot..tmcu2 to check\ngit-svn dcommit\n\nAlso, git-svn is really designed for individual developers who prefer to\nuse git, but need to interact with project that already uses SVN.\nu-boot already uses git, so I don't see why you'd need git-svn :)\n\n-- \nEric Wong\n"},{"id":"28839","messageId":"453359A2.5090704@transmode.se","threadId":"5933","inReplyTo":"20061016034736.GA8782@localdomain","subject":"Re: git-svn and u-boot broken.","fromName":"Joakim Tjernlund","fromEmail":"joakim.tjernlund@transmode.se","sentAt":"2006-10-16T10:06:26Z","receivedAt":"2006-10-16T10:06:26Z","isPatch":false,"sender":{"key":"joakim.tjernlund@transmode.se","avatar":null},"body":"Eric Wong wrote:\n[SNIP]\n> \n> Using -q suppresses potentially useful information.  I wouldn't use\n> it if you're not sure about what you're doing.\n\nOK.\n\n> \n> I would do something like this:\n> \n> ... (same stuff as above before with svn setup...)\n> git clone $ORG_REPO $GIT_REPO\n> cd $GIT_REPO\n> git-svn init \"$REPO\"/trunk\n> git-svn fetch\n> \n> # sync the SVN repo with initial-uboot\n> # this will just commit a snapshot, without history, which I assume\n> # is what you want.\n> git-branch initial-uboot f5e0d03970409feb3c77ab0107d5dece6b7d45c9\n> git-svn commit initial-uboot\n> git checkout -b svn-branch remotes/git-svn\n> git-pull . tmcu2\n> \n> # this should work assuming the path from initial-uboot..tmcu2 is linear\n> # use gitk initial-uboot..tmcu2 to check\n> git-svn dcommit\n\nGreat! This was exactly what I wanted, thanks. I never realized that one should\ndo git-svn commit initial-uboot to get that single commit.\nI also replaced git-svn dcommit with git-svn commit remotes/git-svn..svn-branch\nas I don't have that version yet.\n\nYou should add this as an example I think.\n\nCan I ask for an example that used multi-init and multi-fetch? I tried, but\ncould not make it work.\n\n> \n> Also, git-svn is really designed for individual developers who prefer to\n> use git, but need to interact with project that already uses SVN.\n> u-boot already uses git, so I don't see why you'd need git-svn :)\n\nYes, but the thing is that the rest of our product is svn based including\nthe build env. So I have to supply a SVN tree for build purposes and if someone\nelse has to do a minor fix I can't ask him to learn git first :(\n\n jcoke\n"},{"id":"28866","messageId":"20061016183101.GL27128@hand.yhbt.net","threadId":"5933","inReplyTo":"453359A2.5090704@transmode.se","subject":"[RFH] git-svn documentation [was Re: git-svn and u-boot broken]","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-10-16T18:31:02Z","receivedAt":"2006-10-16T18:31:02Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote:\n> Eric Wong wrote:\n> > I would do something like this:\n> > \n> > ... (same stuff as above before with svn setup...)\n> > git clone $ORG_REPO $GIT_REPO\n> > cd $GIT_REPO\n> > git-svn init \"$REPO\"/trunk\n> > git-svn fetch\n> > \n> > # sync the SVN repo with initial-uboot\n> > # this will just commit a snapshot, without history, which I assume\n> > # is what you want.\n> > git-branch initial-uboot f5e0d03970409feb3c77ab0107d5dece6b7d45c9\n> > git-svn commit initial-uboot\n> > git checkout -b svn-branch remotes/git-svn\n> > git-pull . tmcu2\n> > \n> > # this should work assuming the path from initial-uboot..tmcu2 is linear\n> > # use gitk initial-uboot..tmcu2 to check\n> > git-svn dcommit\n> \n> Great! This was exactly what I wanted, thanks. I never realized that one should\n> do git-svn commit initial-uboot to get that single commit.\n> I also replaced git-svn dcommit with git-svn commit remotes/git-svn..svn-branch\n> as I don't have that version yet.\n> \n> You should add this as an example I think.\n> \n> Can I ask for an example that used multi-init and multi-fetch? I tried, but\n> could not make it work.\n\ngit-svn multi-init https://svn.musicpd.org/mpd -T trunk -t tags -b branches\ngit-svn multi-fetch\n\nIn the latest git-svn (should be in 1.4.3), you can re-run 'git-svn\nmulti-init' with no arguments to discover new tags+branches.\n\nAnybody willing to supply patches for better documentation?  I'll be\nquite busy with other projects the next two weeks, asciidoc is quite\nslow for me; but I'd like to have better docs for git-svn in 1.4.3.\n\n-- \nEric Wong\n"},{"id":"28872","messageId":"015f01c6f16c$4a447440$1267a8c0@Jocke","threadId":"5933","inReplyTo":"20061016183101.GL27128@hand.yhbt.net","subject":"RE: [RFH] git-svn documentation [was Re: git-svn and u-boot broken]","fromName":"Joakim Tjernlund","fromEmail":"joakim.tjernlund@transmode.se","sentAt":"2006-10-16T21:44:42Z","receivedAt":"2006-10-16T21:44:42Z","isPatch":false,"sender":{"key":"joakim.tjernlund@transmode.se","avatar":null},"body":"> Joakim Tjernlund <Joakim.Tjernlund@transmode.se> wrote:\n> > Eric Wong wrote:\n> > > I would do something like this:\n> > > \n> > > ... (same stuff as above before with svn setup...)\n> > > git clone $ORG_REPO $GIT_REPO\n> > > cd $GIT_REPO\n> > > git-svn init \"$REPO\"/trunk\n> > > git-svn fetch\n> > > \n> > > # sync the SVN repo with initial-uboot\n> > > # this will just commit a snapshot, without history, \n> which I assume\n> > > # is what you want.\n> > > git-branch initial-uboot f5e0d03970409feb3c77ab0107d5dece6b7d45c9\n> > > git-svn commit initial-uboot\n> > > git checkout -b svn-branch remotes/git-svn\n> > > git-pull . tmcu2\n> > > \n> > > # this should work assuming the path from \n> initial-uboot..tmcu2 is linear\n> > > # use gitk initial-uboot..tmcu2 to check\n> > > git-svn dcommit\n> > \n> > Great! This was exactly what I wanted, thanks. I never \n> realized that one should\n> > do git-svn commit initial-uboot to get that single commit.\n> > I also replaced git-svn dcommit with git-svn commit \n> remotes/git-svn..svn-branch\n> > as I don't have that version yet.\n> > \n> > You should add this as an example I think.\n> > \n> > Can I ask for an example that used multi-init and \n> multi-fetch? I tried, but\n> > could not make it work.\n> \n> git-svn multi-init https://svn.musicpd.org/mpd -T trunk -t tags -b branches\n> git-svn multi-fetch\n\nThis is how far I got too(sorry for beeing unclear). It is the \nremaing bits that I got stuck on. How would the remaining git-svn\ncommands look like in the above example?\n\n> \n> In the latest git-svn (should be in 1.4.3), you can re-run 'git-svn\n> multi-init' with no arguments to discover new tags+branches.\n> \n> Anybody willing to supply patches for better documentation?  I'll be\n> quite busy with other projects the next two weeks, asciidoc is quite\n> slow for me; but I'd like to have better docs for git-svn in 1.4.3.\n\nThat would be great, I am still very much in the dark.\n\n Jocke\n"},{"id":"29131","messageId":"m2mz7tr121.fsf@ziti.local","threadId":"5933","inReplyTo":"20061016183101.GL27128@hand.yhbt.net","subject":"Re: [RFH] git-svn documentation","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2006-10-18T17:22:46Z","receivedAt":"2006-10-18T17:22:46Z","isPatch":false,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n> Anybody willing to supply patches for better documentation?  I'll be\n> quite busy with other projects the next two weeks, asciidoc is quite\n> slow for me; but I'd like to have better docs for git-svn in 1.4.3.\n\nI'm starting to use git-svn more and would be willing to attempt to\ncontribute some additional docs.  What I have in mind is a howto use\ngit-svn sort of document (unless that isn't seen as useful)\n\n... unfortunately, as I use git-svn more I'm encountering some\nquestions which will need resolution before I can have much confidence\nin my howto :-\\\n\nWill post some howto and questions separately.\n\n+ seth\n"}]}