Re: [git-users] Re: svn to git question
Hi Tomas, I am feeling ok now with this mechanism, but I forgot to include one small repository from svn so the chain is not yet complete. now in order to insert a bunch of commits in between other commits, is it enough to connect top and bottom via grafts and that's it ? can I do it in one step - line by line in the grafts file or only one after the other in 2 steps ? I tried it it once but some data was lost after it from some reason so had to roll back by deleting the grafts file before running filter-branch. Thanks, Gabby. On Wed, Jul 25, 2012 at 1:53 AM, Gabby Romano omerik...@gmail.com wrote: looks like it's my mistake here. I was looking at my repo with gitk --all so saw also the rewritten history.:-) On Wed, Jul 25, 2012 at 1:43 AM, Gabby Romano omerik...@gmail.com wrote: Hi Tomas - it appears to be working fine with grafting. thanks a lot for that. there is one issue though : seems like I have duplicate commits. these are the latest ones and not the old ones I fetched from the older repository. one part of the commits starts at remote/origin/master, and the other one starts at master. sha1 nums are different ones of course. since I followed the instructions I was wondering how it happened and if should I remove the duplicated ones with rebase -i now. On Saturday, July 21, 2012 12:29:47 AM UTC+3, Gabby Romano wrote: Thanks for the advice. really helps. One more thing if I may - if I want to distinguish the old file versions prior to stitch the data, should I be using tags for it ? is it like a label in other systems and it need to be applied on all files participating in the process. On Fri, Jul 20, 2012 at 10:22 PM, Thomas Ferris Nicolaisen tfn...@gmail.com wrote: On Friday, July 20, 2012 2:36:07 PM UTC+2, Gabby Romano wrote: Thanks Tomas. I have decided to do it the right way now as described in your site. I have cloned svn from an earlier revision and will try to make my way up from there. anything I should be aware of before stitching all together ? I am only ~ month with git so not sure yet about where all the traps may lie. if it's as simple as you describe in your site I might be OK. Well, just try it out and see how it goes. Maybe it will save you some time if you take care and plan exactly which svn revisions you have to stitch together. Also, before you start grafting and filter-branching, make an extra clone of the repository you are working on, in case you have to start over. And note down the commands you are using, in case you want to trace back your steps. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/** msg/git-users/-/VR3rhB5LonEJhttps://groups.google.com/d/msg/git-users/-/VR3rhB5LonEJ . To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscribe@** googlegroups.com git-users%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/** group/git-users?hl=en http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/owyM-LoZsEQJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: svn to git question
Hi Tomas - it appears to be working fine with grafting. thanks a lot for that. there is one issue though : seems like I have duplicate commits. these are the latest ones and not the old ones I fetched from the older repository. one part of the commits starts at remote/origin/master, and the other one starts at master. sha1 nums are different ones of course. since I followed the instructions I was wondering how it happened and if should I remove the duplicated ones with rebase -i now. On Saturday, July 21, 2012 12:29:47 AM UTC+3, Gabby Romano wrote: Thanks for the advice. really helps. One more thing if I may - if I want to distinguish the old file versions prior to stitch the data, should I be using tags for it ? is it like a label in other systems and it need to be applied on all files participating in the process. On Fri, Jul 20, 2012 at 10:22 PM, Thomas Ferris Nicolaisen tfn...@gmail.com wrote: On Friday, July 20, 2012 2:36:07 PM UTC+2, Gabby Romano wrote: Thanks Tomas. I have decided to do it the right way now as described in your site. I have cloned svn from an earlier revision and will try to make my way up from there. anything I should be aware of before stitching all together ? I am only ~ month with git so not sure yet about where all the traps may lie. if it's as simple as you describe in your site I might be OK. Well, just try it out and see how it goes. Maybe it will save you some time if you take care and plan exactly which svn revisions you have to stitch together. Also, before you start grafting and filter-branching, make an extra clone of the repository you are working on, in case you have to start over. And note down the commands you are using, in case you want to trace back your steps. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/VR3rhB5LonEJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/owyM-LoZsEQJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: svn to git question
On Friday, July 20, 2012 2:36:07 PM UTC+2, Gabby Romano wrote: Thanks Tomas. I have decided to do it the right way now as described in your site. I have cloned svn from an earlier revision and will try to make my way up from there. anything I should be aware of before stitching all together ? I am only ~ month with git so not sure yet about where all the traps may lie. if it's as simple as you describe in your site I might be OK. Well, just try it out and see how it goes. Maybe it will save you some time if you take care and plan exactly which svn revisions you have to stitch together. Also, before you start grafting and filter-branching, make an extra clone of the repository you are working on, in case you have to start over. And note down the commands you are using, in case you want to trace back your steps. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/VR3rhB5LonEJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: svn to git question
Thanks for the advice. really helps. One more thing if I may - if I want to distinguish the old file versions prior to stitch the data, should I be using tags for it ? is it like a label in other systems and it need to be applied on all files participating in the process. On Fri, Jul 20, 2012 at 10:22 PM, Thomas Ferris Nicolaisen tfn...@gmail.com wrote: On Friday, July 20, 2012 2:36:07 PM UTC+2, Gabby Romano wrote: Thanks Tomas. I have decided to do it the right way now as described in your site. I have cloned svn from an earlier revision and will try to make my way up from there. anything I should be aware of before stitching all together ? I am only ~ month with git so not sure yet about where all the traps may lie. if it's as simple as you describe in your site I might be OK. Well, just try it out and see how it goes. Maybe it will save you some time if you take care and plan exactly which svn revisions you have to stitch together. Also, before you start grafting and filter-branching, make an extra clone of the repository you are working on, in case you have to start over. And note down the commands you are using, in case you want to trace back your steps. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/VR3rhB5LonEJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: svn to git question
Thanks Tomas. my svn structure is trunk/branches/tags based, although I don't need it like that in git. lets say I am pulling from https://svn.isr.hp.com/rg0202/alm/horizon/trunk(since I need only trunk's history and not all other branches). that gives me history only as far as May 2012, when this branch was created. I would like it to go further back as I see it in svn when I ask to see older revisions. this branch came out from another branch, which came from another and so on. I wanted to to fetch from a certain revision somewhere along this path. what you are saying is that I need to do it in chunks and stitch it together to a one big happy git repository afterward ? isn't any other clever way for this ? is pulling with -s will give me any advantage towards achieving this ? On Thu, Jul 19, 2012 at 8:55 AM, Thomas Ferris Nicolaisen tfn...@gmail.comwrote: Note that git-svn will not follow history outside the paths you specify for it. I believe it is restricted to a trunk and branches in a set location. If at some point, the whole trunk/branches/tags was moved to a different place in the repository, you have to splice together two git-svn clones to acquire the entire history: one clone for history before the move, and another clone for history after the move. I've created a screencast that demonstrates the above splicing, or grafting as it is called in Git terminology, here: http://blog.tfnico.com/2010/10/gitsvn-6-grafting-together-svn-history.html If you don't specify a -r range for git-svn, it will check all revisions (for the given path). Furthermore, it doesn't look like you specified -s or --stdlayout when running git-svn clone, nor did you specify --branches. This means that git-svn will only get history for the path you provided, and ignore any branches or tags adjacent to it. Again, how is the structure of your repository? Is it a standard trunk/branches/tags layout? On Thursday, July 19, 2012 7:26:09 AM UTC+2, Gabby Romano wrote: first I used the regular git svn clone command - git svn clone svn path. then tried with -rrev num:HEAD but that didn't work for me either. probably tried a few more options but to no avail. I am sure git knows how to follow the history despite the branching but didn't find the right way to do it. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/e5c4UDWpdvgJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: svn to git question
On Thursday, July 19, 2012 8:34:50 AM UTC+2, Gabby Romano wrote: Thanks Tomas. my svn structure is trunk/branches/tags based, although I don't need it like that in git. lets say I am pulling from https://svn.isr.hp.com/rg0202/alm/horizon/trunk(since I need only trunk's history and not all other branches). that gives me history only as far as May 2012, when this branch was created. I would like it to go further back as I see it in svn when I ask to see older revisions. this branch came out from another branch, which came from another and so on. I wanted to to fetch from a certain revision somewhere along this path. what you are saying is that I need to do it in chunks and stitch it together to a one big happy git repository afterward ? isn't any other clever way for this ? is pulling with -s will give me any advantage towards achieving this ? Yes, this should track history throughout your different branches. Make sure that you point to the base-path of the layout like this: git svn clone -s https://svn.isr.hp.com/rg0202/alm/horizon/trunk You can delete the other branches afterwards if you don't want to keep them. If they contain history of the trunk, you have to include them if you want the entire history, of course. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/PNvMwnLkKsMJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: svn to git question
On Thursday, July 19, 2012 10:36:20 AM UTC+2, Thomas Ferris Nicolaisen wrote: You can delete the other branches afterwards if you don't want to keep them. If they contain history of the trunk, you have to include them if you want the entire history, of course. Correction: You have to include branches in the initial git svn clone if you want the entire history. Afterwards you can remove them, and trunk should still retain its history. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/uCVEh8jla-gJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: svn to git question
Thanks. Can I run it with -s but still to start at some revision as in -rrev:HEAD ? On Thu, Jul 19, 2012 at 11:36 AM, Thomas Ferris Nicolaisen tfn...@gmail.com wrote: On Thursday, July 19, 2012 8:34:50 AM UTC+2, Gabby Romano wrote: Thanks Tomas. my svn structure is trunk/branches/tags based, although I don't need it like that in git. lets say I am pulling from https://svn.isr.hp.com/** rg0202/alm/horizon/trunkhttps://svn.isr.hp.com/rg0202/alm/horizon/trunk(since I need only trunk's history and not all other branches). that gives me history only as far as May 2012, when this branch was created. I would like it to go further back as I see it in svn when I ask to see older revisions. this branch came out from another branch, which came from another and so on. I wanted to to fetch from a certain revision somewhere along this path. what you are saying is that I need to do it in chunks and stitch it together to a one big happy git repository afterward ? isn't any other clever way for this ? is pulling with -s will give me any advantage towards **achieving this ? Yes, this should track history throughout your different branches. Make sure that you point to the base-path of the layout like this: git svn clone -s https://svn.isr.hp.com/rg0202/alm/horizon/trunk You can delete the other branches afterwards if you don't want to keep them. If they contain history of the trunk, you have to include them if you want the entire history, of course. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/PNvMwnLkKsMJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: svn to git question
On Thursday, July 19, 2012 12:46:16 PM UTC+2, Gabby Romano wrote: Thanks. Can I run it with -s but still to start at some revision as in -rrev:HEAD ? You sure can. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/OHXB4s7BUFgJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: svn to git question
Git-svn cannot trace history outside the given trunk and branches in the standardlayout (trunk and branches). You need to analyze these junctions and figure out where in the SVN tree the history comes from. Then you have to make a new clone for each junction and splice them using grafting, as I described in an earlier post. On Thursday, July 19, 2012 5:30:38 PM UTC+2, Gabby Romano wrote: It doesn't work. it seems there are junctions in the svn tree which git-svn don't know what to do and hence stop. since the follow-parent option is turned on by default according to the docs, I need to search for other options. new ideas are welcomed. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/VVMoMNxDkswJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: svn to git question
first I used the regular git svn clone command - git svn clone svn path. then tried with -rrev num:HEAD but that didn't work for me either. probably tried a few more options but to no avail. I am sure git knows how to follow the history despite the branching but didn't find the right way to do it. On Wed, Jul 18, 2012 at 4:58 PM, Thomas Ferris Nicolaisen tfn...@gmail.comwrote: On Wednesday, July 18, 2012 3:47:14 PM UTC+2, Gabby Romano wrote: Hi - I would like to move from svn to git. i would like to start from a certain branch on svn and look back on trunk 1 year or so and start the import from there. I am using git-svn tool. the thing is that when I did that, I ended up with having only partial history in git and not all the way back. I guess that is because branches were created along time and git-svn doesn't follow the history correctly, or I am not passing the right parameters to the tool. what is the correct way to to this in order to have the history I want in my git repository at the end of the process ? (btw, I don't want to keep the layout of T,B, etc ) Hi, Please tell us exactly what commands you already tried. Also provide us with a description of your svn repo structure, and say which parts/branches/history were successfully imported already. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/FcLF2VentQkJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: svn to git question
Note that git-svn will not follow history outside the paths you specify for it. I believe it is restricted to a trunk and branches in a set location. If at some point, the whole trunk/branches/tags was moved to a different place in the repository, you have to splice together two git-svn clones to acquire the entire history: one clone for history before the move, and another clone for history after the move. I've created a screencast that demonstrates the above splicing, or grafting as it is called in Git terminology, here: http://blog.tfnico.com/2010/10/gitsvn-6-grafting-together-svn-history.html If you don't specify a -r range for git-svn, it will check all revisions (for the given path). Furthermore, it doesn't look like you specified -s or --stdlayout when running git-svn clone, nor did you specify --branches. This means that git-svn will only get history for the path you provided, and ignore any branches or tags adjacent to it. Again, how is the structure of your repository? Is it a standard trunk/branches/tags layout? On Thursday, July 19, 2012 7:26:09 AM UTC+2, Gabby Romano wrote: first I used the regular git svn clone command - git svn clone svn path. then tried with -rrev num:HEAD but that didn't work for me either. probably tried a few more options but to no avail. I am sure git knows how to follow the history despite the branching but didn't find the right way to do it. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/e5c4UDWpdvgJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.