{"thread":{"id":"15684","subject":"Help with merge and git-svn","startedAt":"2008-09-26T16:36:48Z","lastAt":"2008-09-26T18:02:03Z","messageCount":3,"participants":["Craig Tataryn","Björn Steinbrink"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"91706","messageId":"8384c2b90809260936m21c14e0dve5b08b021da4a342@mail.gmail.com","threadId":"15684","inReplyTo":null,"subject":"Help with merge and git-svn","fromName":"Craig Tataryn","fromEmail":"craiger@tataryn.net","sentAt":"2008-09-26T16:36:48Z","receivedAt":"2008-09-26T16:36:48Z","isPatch":false,"sender":{"key":"craiger@tataryn.net","avatar":null},"body":"Hi, first time poster to kernel.org mailing lists, so if I commit a\ntaboo, please be kind to me :)\n\nI have the following scenario:\n\n[remote deveoper]<===>[shared git repo]<===>[me]<===>[client's svn repo]\n\nSo my remote developer and I push and pull to/from the shared git\nrepo, and then I sync changes to and from the client's svn repo using\ngit-svn.\n\nMy problem is, when I am ready to merge changes from my local master\nbranch to trunk-local, if I do a \"git merge master\" and then try to\nissue any git-svn commands I get the following errors:\n======================\n$ git merge master\nUpdating d88106e..77b86ae\nFast forward\n community/pom.xml |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n$ git svn dcommit\nCan't call method \"full_url\" on an undefined value at\n/usr/local/git/libexec/git-core/git-svn line 425.\n\n$ git svn rebase\nUnable to determine upstream SVN information from working tree history\n======================\n\nThe only way I've seem to be able to remedy this is if I add the\n\"subtree\" merge strategy to the merge command:\n\ngit merge -s subtree master\n\nThen git-svn doesn't get confused about it's repo, but when you look\nat the repo using gitk, you see something like:\n\n[trunk-local]--[remotes/trunk]  Merge branch 'master' into trunk-local\n| \\\n|  \\\n|    [master]--[remotes/origin/master]  \"Some commit message from the\nlast master commit\"\n|    |\n|    |\n|  /\n/\n\nWhen I use the normal merge strategy then gitk shows all branches at\nthe same level, but git-svn is of course b0rked.\n\nSo I guess my question is, am I stuck using \"-s subtree\", is this the\nright course of action??  Or can I get this to work with the default\nstrategy?  Is this symptomatic of a messed up or disjoint history\n(i.e. early on I did some --squash merges).\n\nI have full control over the shared repo and I don't mind blowing it\naway and rebuilding it based on what's in SVN if that's what it takes.\n\nThanks!\n\nCraig.\n\n-- \nCraig Tataryn\nsite: http://www.basementcoders.com/\npodcast:http://feeds.feedburner.com/TheBasementCoders\nirc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin\nim: craiger316@hotmail.com, skype: craig.tataryn\n"},{"id":"91707","messageId":"20080926172331.GA7879@atjola.homenet","threadId":"15684","inReplyTo":"8384c2b90809260936m21c14e0dve5b08b021da4a342@mail.gmail.com","subject":"Re: Help with merge and git-svn","fromName":"Björn Steinbrink","fromEmail":"b.steinbrink@gmx.de","sentAt":"2008-09-26T17:23:31Z","receivedAt":"2008-09-26T17:23:31Z","isPatch":false,"sender":{"key":"b.steinbrink@gmx.de","avatar":"https://avatars.githubusercontent.com/u/230962?v=4"},"body":"On 2008.09.26 11:36:48 -0500, Craig Tataryn wrote:\n> Hi, first time poster to kernel.org mailing lists, so if I commit a\n> taboo, please be kind to me :)\n> \n> I have the following scenario:\n> \n> [remote deveoper]<===>[shared git repo]<===>[me]<===>[client's svn repo]\n> \n> So my remote developer and I push and pull to/from the shared git\n> repo, and then I sync changes to and from the client's svn repo using\n> git-svn.\n> \n> My problem is, when I am ready to merge changes from my local master\n> branch to trunk-local, if I do a \"git merge master\" and then try to\n> issue any git-svn commands I get the following errors:\n> ======================\n> $ git merge master\n> Updating d88106e..77b86ae\n> Fast forward\n>  community/pom.xml |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> $ git svn dcommit\n> Can't call method \"full_url\" on an undefined value at\n> /usr/local/git/libexec/git-core/git-svn line 425.\n> \n> $ git svn rebase\n> Unable to determine upstream SVN information from working tree history\n> ======================\n> \n> The only way I've seem to be able to remedy this is if I add the\n> \"subtree\" merge strategy to the merge command:\n> \n> git merge -s subtree master\n> \n> Then git-svn doesn't get confused about it's repo, but when you look\n> at the repo using gitk, you see something like:\n> \n> [trunk-local]--[remotes/trunk]  Merge branch 'master' into trunk-local\n> | \\\n> |  \\\n> |    [master]--[remotes/origin/master]  \"Some commit message from the\n> last master commit\"\n> |    |\n> |    |\n> |  /\n> /\n> \n> When I use the normal merge strategy then gitk shows all branches at\n> the same level, but git-svn is of course b0rked.\n> \n> So I guess my question is, am I stuck using \"-s subtree\", is this the\n> right course of action??  Or can I get this to work with the default\n> strategy?  Is this symptomatic of a messed up or disjoint history\n> (i.e. early on I did some --squash merges).\n> \n> I have full control over the shared repo and I don't mind blowing it\n> away and rebuilding it based on what's in SVN if that's what it takes.\n\nThe original merge you did ended up as a fast-forward, ie. no merge\ncommit was created. I guess that your history is so, that somehow the\nremotes/trunk stuff is reachable through the second parent of some merge\ncommit that exists in your history. But git-svn uses --first-parent to\nfind its upstream, so it cannot find that in your scenario. I guess it's\nbest if you use \"git merge --no-ff master\" to force the creation of a\nmerge commit. Subtree happens to work because it implies --no-ff, but\nI'm not sure whether there might be downsides to using the subtree\nstrategy, so I'd rather go with the explicit --no-ff and the normal\nmerge strategies.\n\nBjörn\n"},{"id":"91709","messageId":"8384c2b90809261102l4cd24be7m6be0afde45ccf15@mail.gmail.com","threadId":"15684","inReplyTo":"20080926172331.GA7879@atjola.homenet","subject":"Re: Help with merge and git-svn","fromName":"Craig Tataryn","fromEmail":"craiger@tataryn.net","sentAt":"2008-09-26T18:02:03Z","receivedAt":"2008-09-26T18:02:03Z","isPatch":false,"sender":{"key":"craiger@tataryn.net","avatar":null},"body":"On Fri, Sep 26, 2008 at 12:23 PM, Björn Steinbrink <B.Steinbrink@gmx.de> wrote:\n> On 2008.09.26 11:36:48 -0500, Craig Tataryn wrote:\n>> Hi, first time poster to kernel.org mailing lists, so if I commit a\n>> taboo, please be kind to me :)\n>>\n>> I have the following scenario:\n>>\n>> [remote deveoper]<===>[shared git repo]<===>[me]<===>[client's svn repo]\n>>\n>> So my remote developer and I push and pull to/from the shared git\n>> repo, and then I sync changes to and from the client's svn repo using\n>> git-svn.\n>>\n>> My problem is, when I am ready to merge changes from my local master\n>> branch to trunk-local, if I do a \"git merge master\" and then try to\n>> issue any git-svn commands I get the following errors:\n>> ======================\n>> $ git merge master\n>> Updating d88106e..77b86ae\n>> Fast forward\n>>  community/pom.xml |    2 +-\n>>  1 files changed, 1 insertions(+), 1 deletions(-)\n>>\n>> $ git svn dcommit\n>> Can't call method \"full_url\" on an undefined value at\n>> /usr/local/git/libexec/git-core/git-svn line 425.\n>>\n>> $ git svn rebase\n>> Unable to determine upstream SVN information from working tree history\n>> ======================\n>>\n>> The only way I've seem to be able to remedy this is if I add the\n>> \"subtree\" merge strategy to the merge command:\n>>\n>> git merge -s subtree master\n>>\n>> Then git-svn doesn't get confused about it's repo, but when you look\n>> at the repo using gitk, you see something like:\n>>\n>> [trunk-local]--[remotes/trunk]  Merge branch 'master' into trunk-local\n>> | \\\n>> |  \\\n>> |    [master]--[remotes/origin/master]  \"Some commit message from the\n>> last master commit\"\n>> |    |\n>> |    |\n>> |  /\n>> /\n>>\n>> When I use the normal merge strategy then gitk shows all branches at\n>> the same level, but git-svn is of course b0rked.\n>>\n>> So I guess my question is, am I stuck using \"-s subtree\", is this the\n>> right course of action??  Or can I get this to work with the default\n>> strategy?  Is this symptomatic of a messed up or disjoint history\n>> (i.e. early on I did some --squash merges).\n>>\n>> I have full control over the shared repo and I don't mind blowing it\n>> away and rebuilding it based on what's in SVN if that's what it takes.\n>\n> The original merge you did ended up as a fast-forward, ie. no merge\n> commit was created. I guess that your history is so, that somehow the\n> remotes/trunk stuff is reachable through the second parent of some merge\n> commit that exists in your history. But git-svn uses --first-parent to\n> find its upstream, so it cannot find that in your scenario. I guess it's\n> best if you use \"git merge --no-ff master\" to force the creation of a\n> merge commit. Subtree happens to work because it implies --no-ff, but\n> I'm not sure whether there might be downsides to using the subtree\n> strategy, so I'd rather go with the explicit --no-ff and the normal\n> merge strategies.\n>\n> Björn\n>\n\nThanks for this tip Bjorn, I'll give it a shot.\n\n-- \nCraig Tataryn\nsite: http://www.basementcoders.com/\npodcast:http://feeds.feedburner.com/TheBasementCoders\nirc: ThaDon on freenode #basementcoders, ##wicket, #papernapkin\nim: craiger316@hotmail.com, skype: craig.tataryn\n"}]}