{"thread":{"id":"18089","subject":"git-svn multiple branches and merging","startedAt":"2009-03-02T12:09:35Z","lastAt":"2009-03-12T09:31:36Z","messageCount":2,"participants":["Igor Lautar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"106694","messageId":"5fdd0830903020409j6e2b5269ubfb3ae6fe8266734@mail.gmail.com","threadId":"18089","inReplyTo":null,"subject":"git-svn multiple branches and merging","fromName":"Igor Lautar","fromEmail":"igor.lautar@gmail.com","sentAt":"2009-03-02T12:09:35Z","receivedAt":"2009-03-02T12:09:35Z","isPatch":false,"sender":{"key":"igor.lautar@gmail.com","avatar":null},"body":"Hi All,\n\nI'm using git-svn to manage quite large svn repository. This\nrepository also does not follow 'general' svn rules about how to name\nbranches.\n\nSo we have something like:\ntrunk -> development\nbranches\\version1 -> version1 maintenance\nbranches\\custom\\version1_fix -> customized version1 with certain fixes\n\netc.\n\nWhen importing, I've only imported trunk and branches I'm interested\nin. Thus, I have multiple remotes for which git-svn does not know they\nare related (or how they branched from each other). Also, I have not\nimported whole history, as its just to much trouble.\n\nNow, I want to start a new branch, lets say branches\\dev1, which is\nbranches from trunk. This will be used for various improvements, which\ndo not go to trunk immediatelly.\nI also want to keep this branch in sync with main trunk.\n\nUp to now, I have been doing this by git-cherry-pick all changes from\ndev1 branch point. Is there a better way to do? Note that branch dev1\nin git-svn does not know about previous commits in trunk (git remote\nref was initialized from branch point for dev1).\n\nJust merging trunk (represented by a remote in git-svn) makes a mess\n(as expected). Basically, what I want to do is tell git-svn that merge\nwas already done up to a certain point from that branch so git-merge\nthen only picks up new changes from that point on (and the ones that\nhave not been cherry-picked).\n\nIs there a way to get out of this mess? I'm fine with cherry-pick, but\nit requires some manual labor (like remembering/finding last\ncherry-picked commit).\n\nThank you,\nIgor\n"},{"id":"107788","messageId":"5fdd0830903120231t2ba2f126of41030161869cd33@mail.gmail.com","threadId":"18089","inReplyTo":"5fdd0830903020409j6e2b5269ubfb3ae6fe8266734@mail.gmail.com","subject":"Re: git-svn multiple branches and merging","fromName":"Igor Lautar","fromEmail":"igor.lautar@gmail.com","sentAt":"2009-03-12T09:31:36Z","receivedAt":"2009-03-12T09:31:36Z","isPatch":false,"sender":{"key":"igor.lautar@gmail.com","avatar":null},"body":"Hi,\n\nFigured out a (little) better way.\n\nSay A is point where last merge was done and B is head of branch we\nwant to cherry-pick from:\n\nfor c in $(git-rev-list --reverse A...B); do git-cherry-pick $c; done\n\nI'm sure for can be replaced with something better, but it works for\nme. However, I still need last merge (cherry-pick) point. It would be\nnice to hear if anybody has a better idea...\n\nRegards,\nIgor\n\nOn Mon, Mar 2, 2009 at 1:09 PM, Igor Lautar <igor.lautar@gmail.com> wrote:\n> Hi All,\n>\n> I'm using git-svn to manage quite large svn repository. This\n> repository also does not follow 'general' svn rules about how to name\n> branches.\n>\n> So we have something like:\n> trunk -> development\n> branches\\version1 -> version1 maintenance\n> branches\\custom\\version1_fix -> customized version1 with certain fixes\n>\n> etc.\n>\n> When importing, I've only imported trunk and branches I'm interested\n> in. Thus, I have multiple remotes for which git-svn does not know they\n> are related (or how they branched from each other). Also, I have not\n> imported whole history, as its just to much trouble.\n>\n> Now, I want to start a new branch, lets say branches\\dev1, which is\n> branches from trunk. This will be used for various improvements, which\n> do not go to trunk immediatelly.\n> I also want to keep this branch in sync with main trunk.\n>\n> Up to now, I have been doing this by git-cherry-pick all changes from\n> dev1 branch point. Is there a better way to do? Note that branch dev1\n> in git-svn does not know about previous commits in trunk (git remote\n> ref was initialized from branch point for dev1).\n>\n> Just merging trunk (represented by a remote in git-svn) makes a mess\n> (as expected). Basically, what I want to do is tell git-svn that merge\n> was already done up to a certain point from that branch so git-merge\n> then only picks up new changes from that point on (and the ones that\n> have not been cherry-picked).\n>\n> Is there a way to get out of this mess? I'm fine with cherry-pick, but\n> it requires some manual labor (like remembering/finding last\n> cherry-picked commit).\n>\n> Thank you,\n> Igor\n>\n"}]}