{"thread":{"id":"24166","subject":"git svn relocate [SCRIPT]","startedAt":"2010-06-22T09:40:43Z","lastAt":"2010-06-23T09:53:03Z","messageCount":4,"participants":["Christian Stimming","Jakub Narebski","Ævar Arnfjörð Bjarmason","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"144028","messageId":"20100622114043.1419733jtkx6m0co@webmail.tu-harburg.de","threadId":"24166","inReplyTo":null,"subject":"git svn relocate [SCRIPT]","fromName":"Christian Stimming","fromEmail":"christian@cstimming.de","sentAt":"2010-06-22T09:40:43Z","receivedAt":"2010-06-22T09:40:43Z","isPatch":false,"sender":{"key":"christian@cstimming.de","avatar":"https://avatars.githubusercontent.com/u/227778?v=4"},"body":"Dear all,\n\nI haven't found an easy solution for when a git-svn SVN server changes  \nits address, but I think the attached patch implements a solution  \nuseful for others as well.\n\nIn plain svn this is the \"svn switch --relocate URL1 URL2\" command to  \nchange the URL of a working copy from URL1 to URL2. In git-svn, there  \ndidn't seem to be a suitable command available. What I found were the  \ninstructions here  \nhttp://translate.org.za/blogs/wynand/en/content/changing-your-svn-repository-address-git-svn-setup and some other google hits related to this one. The instructions from the wynand blog uses git-filter-branch, and the instructions were complete enough so that an all-in-one shell script wasn't too difficult to write. So the attached script implements this: Just call \"git-svn-relocate URL1 URL2\" and all the rest should happen  \nautomatically.\n\nHope this helps.\n\nRegards,\n\nChristian Stimming\n"},{"id":"144039","messageId":"m3r5jznr9z.fsf@localhost.localdomain","threadId":"24166","inReplyTo":"20100622114043.1419733jtkx6m0co@webmail.tu-harburg.de","subject":"Re: git svn relocate [SCRIPT]","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-06-22T13:15:06Z","receivedAt":"2010-06-22T13:15:06Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Christian Stimming <christian@cstimming.de> writes:\n\n> Dear all,\n> \n> I haven't found an easy solution for when a git-svn SVN server changes\n> its address, but I think the attached patch implements a solution\n> useful for others as well.\n> \n> In plain svn this is the \"svn switch --relocate URL1 URL2\" command to\n> change the URL of a working copy from URL1 to URL2. In git-svn, there\n> didn't seem to be a suitable command available. What I found were the\n> instructions here\n> http://translate.org.za/blogs/wynand/en/content/changing-your-svn-repository-address-git-svn-setup\n> and some other google hits related to this one. The instructions from\n> the wynand blog uses git-filter-branch, and the instructions were\n> complete enough so that an all-in-one shell script wasn't too\n> difficult to write. So the attached script implements this: Just call\n> \"git-svn-relocate URL1 URL2\" and all the rest should happen\n> automatically.\n\nIf you can put this script somewhere (e.g. GitHub, or repo.or.cz), could you\nplease add information about it to InterfacesFriontendsAndTools page on Git\nWiki (http://git.wiki.kernel.org)?\n\nAlternatively, perhaps you could send it as a patch adding it to somwehere\nin the contrib/\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"144041","messageId":"AANLkTil6VEPqJxp4wiE7f25zmrnZ9vS1M-f4tFuV4pMO@mail.gmail.com","threadId":"24166","inReplyTo":"m3r5jznr9z.fsf@localhost.localdomain","subject":"Re: git svn relocate [SCRIPT]","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-06-22T15:11:15Z","receivedAt":"2010-06-22T15:11:15Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Jun 22, 2010 at 13:15, Jakub Narebski <jnareb@gmail.com> wrote:\n> If you can put this script somewhere (e.g. GitHub, or repo.or.cz), could you\n> please add information about it to InterfacesFriontendsAndTools page on Git\n> Wiki (http://git.wiki.kernel.org)?\n>\n> Alternatively, perhaps you could send it as a patch adding it to somwehere\n> in the contrib/\n\nThis is part of the \"Reconstructing git-svn metadata after a git\nclone\"[1] problem for which there's an open thread. You have to\nrewrite history using git-filter-branch to fix the branch references\nif you need to change the SVN URL.\n\nIt would be nice if you could specify that sed replacement in some\ngit-svn config file if you needed to change e.g. someone's http://\nclone to a svn+ssh:// clone without rewriting the whole thing.\n\nWould that sort of thing be possible? Eric?\n\nhttp://kerneltrap.org/mailarchive/git/2010/5/8/30062\n"},{"id":"144059","messageId":"20100623095303.GA19651@dcvr.yhbt.net","threadId":"24166","inReplyTo":"AANLkTil6VEPqJxp4wiE7f25zmrnZ9vS1M-f4tFuV4pMO@mail.gmail.com","subject":"Re: git svn relocate [SCRIPT]","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2010-06-23T09:53:03Z","receivedAt":"2010-06-23T09:53:03Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:\n> On Tue, Jun 22, 2010 at 13:15, Jakub Narebski <jnareb@gmail.com> wrote:\n> > If you can put this script somewhere (e.g. GitHub, or repo.or.cz), could you\n> > please add information about it to InterfacesFriontendsAndTools page on Git\n> > Wiki (http://git.wiki.kernel.org)?\n> >\n> > Alternatively, perhaps you could send it as a patch adding it to somwehere\n> > in the contrib/\n> \n> This is part of the \"Reconstructing git-svn metadata after a git\n> clone\"[1] problem for which there's an open thread. You have to\n> rewrite history using git-filter-branch to fix the branch references\n> if you need to change the SVN URL.\n> \n> It would be nice if you could specify that sed replacement in some\n> git-svn config file if you needed to change e.g. someone's http://\n> clone to a svn+ssh:// clone without rewriting the whole thing.\n> \n> Would that sort of thing be possible? Eric?\n> \n> http://kerneltrap.org/mailarchive/git/2010/5/8/30062\n\nDoes the existing rewriteRoot configuration option work for this?\n(I had almost forgotten about it myself :x)\n\n-- \nEric Wong\n"}]}