{"thread":{"id":"13834","subject":"Getting git-svn to recognize branchpoints?","startedAt":"2008-06-06T19:07:30Z","lastAt":"2008-06-07T17:13:56Z","messageCount":3,"participants":["davetron5000","Steven Walter"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"78940","messageId":"a12182cd-2cd3-42a6-b3b4-f99907576741@d77g2000hsb.googlegroups.com","threadId":"13834","inReplyTo":null,"subject":"Getting git-svn to recognize branchpoints?","fromName":"davetron5000","fromEmail":"davetron5000@gmail.com","sentAt":"2008-06-06T19:07:30Z","receivedAt":"2008-06-06T19:07:30Z","isPatch":false,"sender":{"key":"davetron5000@gmail.com","avatar":"https://gravatar.com/avatar/9ec09086e36c4e609dfc23a4582d2c7adf7dc2fb1796f74492d52727efa6ba86?d=mp&s=160"},"body":"I was given a branch in an SVN repo to work on.  My plan is to merge\nit with trunk in Git to indicate how much easier it would be to use\nGit.\n\nUnfortunately, Git doesn't seem to realize that my branch is a branch\nfrom SVN's trunk.  For example, I have made no changes to file foo.c\n\nThe main trunk has changes to foo.c\n\nWhen I merge, those changes show up as conflicts.\n\ngitk doesn't show any branch points, and I'm thinking that Git just\ndoesn't see the branches as they are in SVN.\n\nThe sha-1 of the branch commit from SVN shows up in gitk when I've\nchecked out my branch, but not if I have the trunk checked out (though\na git log DOES show it).\n\nHere's what I did to initially set this up (I'm working on $SVNROOT/\nbranches/FOO):\n\ngit-svn init ssh://www.theirrepo.com/svnroot\ngit-checkout -b local-trunk trunk\ngit-branch local-foo FOO\ngit-checkout local-foo\n\ngit-svn dcommit on local-foo sends changes to FOO, if on local-trunk,\nthey are sent to trunk in SVN\ngit-svn rebase gets changes from FOO or trunk, as appropriate\n\nHere's my .git/config:\n\n[core]\n    repositoryformatversion = 0\n    filemode = true\n    bare = false\n    logallrefupdates = true\n[svn-remote \"svn\"]\n    url = svn+ssh://davec@svn.theirrepo.com/svnroot\n    fetch = trunk:refs/remotes/trunk\n    branches = branches/*:refs/remotes/*\n    tags = tags/*:refs/remotes/tags/*\n\nAny ideas?\n"},{"id":"79048","messageId":"e06498070806070836m4c3ffd93ye4e4d7ddd149a5a7@mail.gmail.com","threadId":"13834","inReplyTo":"a12182cd-2cd3-42a6-b3b4-f99907576741@d77g2000hsb.googlegroups.com","subject":"Re: Getting git-svn to recognize branchpoints?","fromName":"Steven Walter","fromEmail":"stevenrwalter@gmail.com","sentAt":"2008-06-07T15:36:36Z","receivedAt":"2008-06-07T15:36:36Z","isPatch":false,"sender":{"key":"stevenrwalter@gmail.com","avatar":"https://avatars.githubusercontent.com/u/79127?v=4"},"body":"On Fri, Jun 6, 2008 at 3:07 PM, davetron5000 <davetron5000@gmail.com> wrote:\n> I was given a branch in an SVN repo to work on.  My plan is to merge\n> it with trunk in Git to indicate how much easier it would be to use\n> Git.\n>\n> Unfortunately, Git doesn't seem to realize that my branch is a branch\n> from SVN's trunk.  For example, I have made no changes to file foo.c\n>\n> The main trunk has changes to foo.c\n>\n> When I merge, those changes show up as conflicts.\n>\n> gitk doesn't show any branch points, and I'm thinking that Git just\n> doesn't see the branches as they are in SVN.\n\nHow much history did you fetch from subversion?  If you didn't fetch\nat least to the branch point, then that could explain what you're\nseeing.  If the SVN repository isn't too large, it is probably worth\nthe time to fetch the entire history (from r1 forward).\n\n> The sha-1 of the branch commit from SVN shows up in gitk when I've\n> checked out my branch, but not if I have the trunk checked out (though\n> a git log DOES show it).\n\nThat's expected; it sounds like you want \"gitk --all\"\n-- \n-Steven Walter <stevenrwalter@gmail.com>\n\"A human being should be able to change a diaper, plan an invasion,\nbutcher a hog, conn a ship, design a building, write a sonnet, balance\naccounts, build a wall, set a bone, comfort the dying, take orders,\ngive orders, cooperate, act alone, solve equations, analyze a new\nproblem, pitch manure, program a computer, cook a tasty meal, fight\nefficiently, die gallantly. Specialization is for insects.\"\n -Robert Heinlein\n"},{"id":"79058","messageId":"0fbb1aa1-fb40-4474-aa48-82505dd198d2@2g2000hsn.googlegroups.com","threadId":"13834","inReplyTo":"e06498070806070836m4c3ffd93ye4e4d7ddd149a5a7@mail.gmail.com","subject":"Re: Getting git-svn to recognize branchpoints?","fromName":"davetron5000","fromEmail":"davetron5000@gmail.com","sentAt":"2008-06-07T17:13:56Z","receivedAt":"2008-06-07T17:13:56Z","isPatch":false,"sender":{"key":"davetron5000@gmail.com","avatar":"https://gravatar.com/avatar/9ec09086e36c4e609dfc23a4582d2c7adf7dc2fb1796f74492d52727efa6ba86?d=mp&s=160"},"body":"OK, gitk is now showing it using the --all.\n\nI did get the entire history.  It seems like when I merge, every file\nthat was changed on trunk since the branch shows up as a conflict,\nincluding files that I have not changed on my branch.\n\nFor one particular file, the history is:\n\n6/4/07 - File Created\n8/9/07 - File modified\n12/3/07 - File modified\n4/24/08 - Branch created\n\nThe diffs of the conflict make no sense, e.g.\n\n<< From Trunk\nsome_stuff();\nthat_was_added();\n====\n>> From My Branch\n\nI've tried all the merge strategies, and nothing makes a difference...\n\nOn Jun 7, 11:36 am, \"Steven Walter\" <stevenrwal...@gmail.com> wrote:\n> On Fri, Jun 6, 2008 at 3:07 PM, davetron5000 <davetron5...@gmail.com> wrote:\n> > I was given a branch in an SVN repo to work on.  My plan is to merge\n> > it with trunk in Git to indicate how much easier it would be to use\n> > Git.\n>\n> > Unfortunately, Git doesn't seem to realize that my branch is a branch\n> > from SVN's trunk.  For example, I have made no changes to file foo.c\n>\n> > The main trunk has changes to foo.c\n>\n> > When I merge, those changes show up as conflicts.\n>\n> > gitk doesn't show any branch points, and I'm thinking that Git just\n> > doesn't see the branches as they are in SVN.\n>\n> How much history did you fetch from subversion?  If you didn't fetch\n> at least to the branch point, then that could explain what you're\n> seeing.  If the SVN repository isn't too large, it is probably worth\n> the time to fetch the entire history (from r1 forward).\n>\n> > The sha-1 of the branch commit from SVN shows up in gitk when I've\n> > checked out my branch, but not if I have the trunk checked out (though\n> > a git log DOES show it).\n>\n> That's expected; it sounds like you want \"gitk --all\"\n> --\n> -Steven Walter <stevenrwal...@gmail.com>\n> \"A human being should be able to change a diaper, plan an invasion,\n> butcher a hog, conn a ship, design a building, write a sonnet, balance\n> accounts, build a wall, set a bone, comfort the dying, take orders,\n> give orders, cooperate, act alone, solve equations, analyze a new\n> problem, pitch manure, program a computer, cook a tasty meal, fight\n> efficiently, die gallantly. Specialization is for insects.\"\n>  -Robert Heinlein\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majord...@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}