{"thread":{"id":"19291","subject":"git svn : some feedback and wonder...","startedAt":"2009-05-11T15:52:48Z","lastAt":"2009-05-12T11:52:13Z","messageCount":4,"participants":["jean-luc malet","Michael J Gruber","MALET Jean-Luc"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"113549","messageId":"1de9d39c0905110852v65b07bebl47cc9a58046c5288@mail.gmail.com","threadId":"19291","inReplyTo":null,"subject":"git svn : some feedback and wonder...","fromName":"jean-luc malet","fromEmail":"jeanluc.malet@gmail.com","sentAt":"2009-05-11T15:52:48Z","receivedAt":"2009-05-11T15:52:48Z","isPatch":false,"sender":{"key":"jeanluc.malet@gmail.com","avatar":null},"body":"hi\nI'm just toying with git svn....\nso I have an svn repository and I do a git svn clone -s\nhttp://path.to/my/repository\nhere all is fine it checkout my trunk into master branch\n\n1) when I do a git branch -a, it show 2 branches : master and trunk,\nshouldn't it be master and svn/trunk?\n2) when I create a branch using git svn branch it create an empty\ndirectory and not as expected a branch from the current revision of\ntrunk\n3) the branch appears in git branch -a without a remote\ninformation.... not easy to track\n4) you can't do git branch --track newbranch (where new branch is the\nsvn branch), since the branch name isn't prefixed by svn/ you can't\nreuse the same name\n5) why having called dcommit instead of push? it would have been more\nunderstable (more coherent) git svn push would have pushed current\nbranch on corresponding svn branch and git svn push somebranch would\nhave do a git svn branch followed by the commits...\n6) why having called rebase instead of pull? git svn pull would have\nfetched svn/trackedbranch and merged into current branch, git svn pull\nsomebranch would have merged into current branch the svn/somebranch\n(without traking info)\n\nthanks and regards\nJLM\n\n-- \nKISS! (Keep It Simple, Stupid!)\n(garde le simple, imbécile!)\n\"mais qu'est-ce que tu m'as pondu comme usine à gaz? fait des choses\nsimples et qui marchent, espèce d'imbécile!\"\n-----------------------------\n\"Si vous pensez que vous êtes trop petit pour changer quoique ce soit,\nessayez donc de dormir avec un moustique dans votre chambre.\" Betty\nReese\nhttp://www.grainesdechangement.com/citations.htm\n"},{"id":"113551","messageId":"4A08560F.8030800@drmicha.warpmail.net","threadId":"19291","inReplyTo":"1de9d39c0905110852v65b07bebl47cc9a58046c5288@mail.gmail.com","subject":"Re: git svn : some feedback and wonder...","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-05-11T16:45:03Z","receivedAt":"2009-05-11T16:45:03Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"jean-luc malet venit, vidit, dixit 11.05.2009 17:52:\n> hi\n> I'm just toying with git svn....\n> so I have an svn repository and I do a git svn clone -s\n> http://path.to/my/repository\n> here all is fine it checkout my trunk into master branch\n> \n> 1) when I do a git branch -a, it show 2 branches : master and trunk,\n> shouldn't it be master and svn/trunk?\n\nNo. Not unless you said --prefix=svn during clone.\n\n> 2) when I create a branch using git svn branch it create an empty\n> directory and not as expected a branch from the current revision of\n> trunk\n\nI get a branch as you expect. Can you repeat the commands which\ngenerated an unexpected result for you?\n\n> 3) the branch appears in git branch -a without a remote\n> information.... not easy to track\n\nSee 1)\n\n> 4) you can't do git branch --track newbranch (where new branch is the\n> svn branch), since the branch name isn't prefixed by svn/ you can't\n> reuse the same name\n\nYou certainly can create a local branch with the same name. I just did.\nI always do. If b is that name, say\n\ngit branch --track b remotes/b\n\nunless you have used --prefix, of course.\n\n> 5) why having called dcommit instead of push? it would have been more\n> understable (more coherent) git svn push would have pushed current\n> branch on corresponding svn branch and git svn push somebranch would\n> have do a git svn branch followed by the commits...\n\nThe latter would be inconsistent with git push as well.\n\nDcommit may be for historical reasons, but keep in mind that dcommit is\nnot simply pushing. It involves rebasing and a whole git-svn-git\nroundtrip. It really is \"do the commits\" on the svn side.\n\n> 6) why having called rebase instead of pull? git svn pull would have\n> fetched svn/trackedbranch and merged into current branch, git svn pull\n> somebranch would have merged into current branch the svn/somebranch\n> (without traking info)\n\nBecause pull does not rebase by default, it uses merge!\n\nLet me just add that with some more git experience, which includes\nreading man pages and trying things out, there certainly will be more\ninsight into the why's and why not's of git-svn ;)\n\nCheers,\nMichael\n"},{"id":"113597","messageId":"4A08A294.1060100@gmail.com","threadId":"19291","inReplyTo":"4A08560F.8030800@drmicha.warpmail.net","subject":"Re: git svn : some feedback and wonder...","fromName":"MALET Jean-Luc","fromEmail":"jeanluc.malet@gmail.com","sentAt":"2009-05-11T22:11:32Z","receivedAt":"2009-05-11T22:11:32Z","isPatch":false,"sender":{"key":"jeanluc.malet@gmail.com","avatar":null},"body":"Michael J Gruber wrote:\n> jean-luc malet venit, vidit, dixit 11.05.2009 17:52:\n>   \n>> hi\n>> I'm just toying with git svn....\n>> so I have an svn repository and I do a git svn clone -s\n>> http://path.to/my/repository\n>> here all is fine it checkout my trunk into master branch\n>>\n>> 1) when I do a git branch -a, it show 2 branches : master and trunk,\n>> shouldn't it be master and svn/trunk?\n>>     \n>\n> No. Not unless you said --prefix=svn during clone.\n>\n>   \n>> 2) when I create a branch using git svn branch it create an empty\n>> directory and not as expected a branch from the current revision of\n>> trunk\n>>     \n>\n> I get a branch as you expect. Can you repeat the commands which\n> generated an unexpected result for you?\n>\n>   \n>> 3) the branch appears in git branch -a without a remote\n>> information.... not easy to track\n>>     \n>\n> See 1)\n>\n>   \n>> 4) you can't do git branch --track newbranch (where new branch is the\n>> svn branch), since the branch name isn't prefixed by svn/ you can't\n>> reuse the same name\n>>     \n>\n> You certainly can create a local branch with the same name. I just did.\n> I always do. If b is that name, say\n>\n> git branch --track b remotes/b\n>\n> unless you have used --prefix, of course.\n>\n>   \n>> 5) why having called dcommit instead of push? it would have been more\n>> understable (more coherent) git svn push would have pushed current\n>> branch on corresponding svn branch and git svn push somebranch would\n>> have do a git svn branch followed by the commits...\n>>     \n>\n> The latter would be inconsistent with git push as well.\n>\n> Dcommit may be for historical reasons, but keep in mind that dcommit is\n> not simply pushing. It involves rebasing and a whole git-svn-git\n> roundtrip. It really is \"do the commits\" on the svn side.\n>\n>   \n>> 6) why having called rebase instead of pull? git svn pull would have\n>> fetched svn/trackedbranch and merged into current branch, git svn pull\n>> somebranch would have merged into current branch the svn/somebranch\n>> (without traking info)\n>>     \n>\n> Because pull does not rebase by default, it uses merge!\n>\n> Let me just add that with some more git experience, which includes\n> reading man pages and trying things out, there certainly will be more\n> insight into the why's and why not's of git-svn ;)\n>\n> Cheers,\n> Michael\n>   \nhi,\ncan't do it from here, will retry tomorrow\nI'll try 1)  2) and 3) again tomorrow, however why --prefix=svn isn't \nthe default? that's odd behaviour and not really consitent with other \nremote operation I find\nfor 4) I think that push works more like dcommit, the underlying process \nisn't the same because svn and git don't share the same tree, but if we \nlook at the result we have the same : all commit made on host are \nvisible on repository, git do it by transfering the content because all \nblob/tree are sha1 name and then can't conflict, on svn we can't because \nthere are no uniqueness so you have to replay the commits one by ones... \ngit just optimize the process because of the nature of the filetree...\nfor rebase.... well I know that some people prefer it to merge, as well \nas some people prefer that a merge to be fast forward... I prefer to \nkeep the branch information... it's hard to restart a dev from a branch \nthat isn't visible anymore... fast forward merge and rebase sadely do \nlose those branch information... however I agree that in case of svn a \nrebase looks more like an svn update...\nand yes, sorry I forgot that the opposite of push is... fetch ;) so yes \nit's more clear now in my mind....\nthanks\nJLM\n"},{"id":"113629","messageId":"1de9d39c0905120452n167a8de2w378f39140946559d@mail.gmail.com","threadId":"19291","inReplyTo":"4A08A294.1060100@gmail.com","subject":"Re: git svn : some feedback and wonder...","fromName":"jean-luc malet","fromEmail":"jeanluc.malet@gmail.com","sentAt":"2009-05-12T11:52:13Z","receivedAt":"2009-05-12T11:52:13Z","isPatch":false,"sender":{"key":"jeanluc.malet@gmail.com","avatar":null},"body":"ok now I get it... I understand what is happening\n\nhere is what I perform :\n$git svn clone http://myurl/git-svn-test --prefix=svn/ -s\n$git svn branch againnewtest\n\n1) at the end of clone step the local tree is in the same state than\nthe last revision of svn repository\n2) git's master branch isn't linked to the trunk (thus if you do a git\nsvn dcommit at this step after adding / modifying local files the\nresult is unexpected)\n3) the git svn branch againnewtest perform a branch on the lastest\nrevision of svn repository (in my case a work on a branch) and not a\nbranch on the trunk\n\nwhat I would have expected :\neither the master branch created to track svn/trunk, or the master\nbranch to contain no file at all (thus obliging the user to create a\nlocal traking branch on trunk) but not the current state that is\nconfusing (the user do an ls and see that there are file, do a git\nbranch and see that he is on master, then think that he's working on\nthe trunk, and that when do the git svn branch newbranch he think it\nwill branch the trunk, but in fact he branch the lastest revision\nwhich can be anything according to the time the clone was performed\nand the user commits)\n\nbest regards\nJLM\n\n\nOn Tue, May 12, 2009 at 12:11 AM, MALET Jean-Luc\n<jeanluc.malet@gmail.com> wrote:\n> Michael J Gruber wrote:\n>>\n>> jean-luc malet venit, vidit, dixit 11.05.2009 17:52:\n>>\n>>>\n>>> hi\n>>> I'm just toying with git svn....\n>>> so I have an svn repository and I do a git svn clone -s\n>>> http://path.to/my/repository\n>>> here all is fine it checkout my trunk into master branch\n>>>\n>>> 1) when I do a git branch -a, it show 2 branches : master and trunk,\n>>> shouldn't it be master and svn/trunk?\n>>>\n>>\n>> No. Not unless you said --prefix=svn during clone.\n>>\n>>\n>>>\n>>> 2) when I create a branch using git svn branch it create an empty\n>>> directory and not as expected a branch from the current revision of\n>>> trunk\n>>>\n>>\n>> I get a branch as you expect. Can you repeat the commands which\n>> generated an unexpected result for you?\n>>\n>>\n>>>\n>>> 3) the branch appears in git branch -a without a remote\n>>> information.... not easy to track\n>>>\n>>\n>> See 1)\n>>\n>>\n>>>\n>>> 4) you can't do git branch --track newbranch (where new branch is the\n>>> svn branch), since the branch name isn't prefixed by svn/ you can't\n>>> reuse the same name\n>>>\n>>\n>> You certainly can create a local branch with the same name. I just did.\n>> I always do. If b is that name, say\n>>\n>> git branch --track b remotes/b\n>>\n>> unless you have used --prefix, of course.\n>>\n>>\n>>>\n>>> 5) why having called dcommit instead of push? it would have been more\n>>> understable (more coherent) git svn push would have pushed current\n>>> branch on corresponding svn branch and git svn push somebranch would\n>>> have do a git svn branch followed by the commits...\n>>>\n>>\n>> The latter would be inconsistent with git push as well.\n>>\n>> Dcommit may be for historical reasons, but keep in mind that dcommit is\n>> not simply pushing. It involves rebasing and a whole git-svn-git\n>> roundtrip. It really is \"do the commits\" on the svn side.\n>>\n>>\n>>>\n>>> 6) why having called rebase instead of pull? git svn pull would have\n>>> fetched svn/trackedbranch and merged into current branch, git svn pull\n>>> somebranch would have merged into current branch the svn/somebranch\n>>> (without traking info)\n>>>\n>>\n>> Because pull does not rebase by default, it uses merge!\n>>\n>> Let me just add that with some more git experience, which includes\n>> reading man pages and trying things out, there certainly will be more\n>> insight into the why's and why not's of git-svn ;)\n>>\n>> Cheers,\n>> Michael\n>>\n>\n> hi,\n> can't do it from here, will retry tomorrow\n> I'll try 1)  2) and 3) again tomorrow, however why --prefix=svn isn't the\n> default? that's odd behaviour and not really consitent with other remote\n> operation I find\n> for 4) I think that push works more like dcommit, the underlying process\n> isn't the same because svn and git don't share the same tree, but if we look\n> at the result we have the same : all commit made on host are visible on\n> repository, git do it by transfering the content because all blob/tree are\n> sha1 name and then can't conflict, on svn we can't because there are no\n> uniqueness so you have to replay the commits one by ones... git just\n> optimize the process because of the nature of the filetree...\n> for rebase.... well I know that some people prefer it to merge, as well as\n> some people prefer that a merge to be fast forward... I prefer to keep the\n> branch information... it's hard to restart a dev from a branch that isn't\n> visible anymore... fast forward merge and rebase sadely do lose those branch\n> information... however I agree that in case of svn a rebase looks more like\n> an svn update...\n> and yes, sorry I forgot that the opposite of push is... fetch ;) so yes it's\n> more clear now in my mind....\n> thanks\n> JLM\n>\n>\n\n\n\n-- \nKISS! (Keep It Simple, Stupid!)\n(garde le simple, imbécile!)\n\"mais qu'est-ce que tu m'as pondu comme usine à gaz? fait des choses\nsimples et qui marchent, espèce d'imbécile!\"\n-----------------------------\n\"Si vous pensez que vous êtes trop petit pour changer quoique ce soit,\nessayez donc de dormir avec un moustique dans votre chambre.\" Betty\nReese\nhttp://www.grainesdechangement.com/citations.htm\n"}]}