{"thread":{"id":"7434","subject":"git-svn, remote tracking branch question","startedAt":"2007-03-27T20:26:43Z","lastAt":"2007-03-31T00:32:19Z","messageCount":5,"participants":["Seth Falcon","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"38183","messageId":"m2ps6usa9o.fsf@ziti.fhcrc.org","threadId":"7434","inReplyTo":null,"subject":"git-svn, remote tracking branch question","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2007-03-27T20:26:43Z","receivedAt":"2007-03-27T20:26:43Z","isPatch":false,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"Hi,\n\nI've edited my <repos>/.git/config file so that git-svn is tracking\nthe main devel line as well as a release branch of a project.  This\nseems to work well.\n\nSo I have:\n\n[svn-remote \"svn\"]\n\turl = https://svn.url.com/root\n\tfetch = branches/release-2-5:refs/remotes/2.5\n\tfetch = trunk:refs/remotes/git-svn\n\nI can checkout the 2.5 release branch like this:\n\n   git checkout -b 2.5 remotes/2.5\n\nBut at this point, how do I ask git-svn to update it?  When working on\nthe devel line, I can do 'git svn rebase' and I would like to do the\nsame thing but relative to the branch.\n\nPerhaps there is some config I can add so that I don't have to do:\n\n   git svn fetch\n   git rebase remotes/2.5\n\nThat isn't so bad except for having to remember where you are...\n\nThanks,\n\n+ seth\n\n-- \nSeth Falcon\n"},{"id":"38190","messageId":"20070327220015.GA16344@untitled","threadId":"7434","inReplyTo":"m2ps6usa9o.fsf@ziti.fhcrc.org","subject":"Re: git-svn, remote tracking branch question","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-03-27T22:00:15Z","receivedAt":"2007-03-27T22:00:15Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Seth Falcon <sethfalcon@gmail.com> wrote:\n> Hi,\n> \n> I've edited my <repos>/.git/config file so that git-svn is tracking\n> the main devel line as well as a release branch of a project.  This\n> seems to work well.\n> \n> So I have:\n> \n> [svn-remote \"svn\"]\n> \turl = https://svn.url.com/root\n> \tfetch = branches/release-2-5:refs/remotes/2.5\n> \tfetch = trunk:refs/remotes/git-svn\n> \n> I can checkout the 2.5 release branch like this:\n> \n>    git checkout -b 2.5 remotes/2.5\n> \n> But at this point, how do I ask git-svn to update it?  When working on\n> the devel line, I can do 'git svn rebase' and I would like to do the\n> same thing but relative to the branch.\n> \n> Perhaps there is some config I can add so that I don't have to do:\n> \n>    git svn fetch\n>    git rebase remotes/2.5\n> \n> That isn't so bad except for having to remember where you are...\n\n'git svn rebase' should be capable auto-discovering the remote ref that\nyou last branched from.  I'm not sure if the '2.5' that's common in the\nremote ref and your local branch would cause ambiguity, however...\n\nI'll look into this more when/if I have time tonight.\n\n-- \nEric Wong\n"},{"id":"38255","messageId":"m23b3pqtlq.fsf@ziti.fhcrc.org","threadId":"7434","inReplyTo":"20070327220015.GA16344@untitled","subject":"Re: git-svn, remote tracking branch question","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2007-03-28T15:24:17Z","receivedAt":"2007-03-28T15:24:17Z","isPatch":false,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n> 'git svn rebase' should be capable auto-discovering the remote ref that\n> you last branched from.  I'm not sure if the '2.5' that's common in the\n> remote ref and your local branch would cause ambiguity, however...\n>\n> I'll look into this more when/if I have time tonight.\n\nok.  In the meantime, I renamed my branch to avoid any potential name\nconflict and it seems to be working automagically as you described.\nThat's really useful, thanks.\n\n+ seth\n\n-- \nSeth Falcon\n"},{"id":"38351","messageId":"20070329205824.GA19796@muzzle","threadId":"7434","inReplyTo":"20070327220015.GA16344@untitled","subject":"Re: git-svn, remote tracking branch question","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-03-29T20:58:24Z","receivedAt":"2007-03-29T20:58:24Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Eric Wong <normalperson@yhbt.net> wrote:\n> I'll look into this more when/if I have time tonight.\n\nSorry, I tried to look into it this morning at 1-2am but wasn't\nsuccessful in reproducing it.  I'm glad the workaround I provided\nworked, but I'll take another stab at solving the problem tonight\nor this weekend.\n\n-- \nEric Wong\n"},{"id":"38393","messageId":"20070331003219.GA5145@muzzle","threadId":"7434","inReplyTo":"20070329205824.GA19796@muzzle","subject":"Re: git-svn, remote tracking branch question","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-03-31T00:32:19Z","receivedAt":"2007-03-31T00:32:19Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Eric Wong <normalperson@yhbt.net> wrote:\n> Eric Wong <normalperson@yhbt.net> wrote:\n> > I'll look into this more when/if I have time tonight.\n> \n> Sorry, I tried to look into it this morning at 1-2am but wasn't\n> successful in reproducing it.  I'm glad the workaround I provided\n> worked, but I'll take another stab at solving the problem tonight\n> or this weekend.\n\nAlright, I'm still unable to figure it out.  Here's a patch\nthat should at least cause it to error out and tell you\nwhich URL it was trying to lookup.\n\n>From 4bf0314f4665b612cbd735fdfae45f84c1e21c04 Mon Sep 17 00:00:00 2001\nFrom: Eric Wong <normalperson@yhbt.net>\nDate: Fri, 30 Mar 2007 17:30:30 -0700\nSubject: [PATCH] git-svn: fail on rebase if we are unable to find a ref to rebase against\n\nIf we're on an invalid HEAD, we should detect this and avoid\nattempting to continue.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-svn.perl |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex e0a48c2..adc976c 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -435,6 +435,9 @@ sub cmd_rebase {\n \t}\n \n \tmy $gs = Git::SVN->find_by_url($url);\n+\tunless ($gs) {\n+\t\tdie \"Unable to determine remote information from URL: $url\\n\";\n+\t}\n \tif (command(qw/diff-index HEAD --/)) {\n \t\tprint STDERR \"Cannot rebase with uncommited changes:\\n\";\n \t\tcommand_noisy('status');\n-- \nEric Wong\n"}]}