{"thread":{"id":"21757","subject":"git-svn: dcommit --commiturl rebases against fetch url rather than against commit url","startedAt":"2009-11-26T01:15:16Z","lastAt":"2009-11-26T01:59:19Z","messageCount":2,"participants":["Ingmar Vanhassel","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"128420","messageId":"1259198081-sup-3175@cannonball","threadId":"21757","inReplyTo":null,"subject":"git-svn: dcommit --commiturl rebases against fetch url rather than against commit url","fromName":"Ingmar Vanhassel","fromEmail":"ingmar@exherbo.org","sentAt":"2009-11-26T01:15:16Z","receivedAt":"2009-11-26T01:15:16Z","isPatch":false,"sender":{"key":"ingmar@exherbo.org","avatar":"https://avatars.githubusercontent.com/u/19112?v=4"},"body":"Hi Eric & list,\n\nI'm using a git-svn setup where svn-remote.svn.url is set to use\nanonymouse svn, and svn-remote.svn.commiturl uses my ssh+svn:// login.\n\nI'm using anonymous svn for fetching because this git-svn import is\nshared with a few other developers, who don't have commit access, but\nwho do prefer to use a git-svn import over SVN, for their work. Since I\nuse anonsvn for the import they can continue my import.\n\nWhen I dcommit to svn, git-svn happily commits the first commit. When it\ntries to rebase after that it fetches from the anonsvn url, which is\nsynced only ever 5 or 10 minutes. Thus, it doesn't find my commit, and\nit aborts, meaning I need to wait until anonsvn catches up, before being\nable to do another commit.\n\nAny suggestions on how this could be solved without reimporting with\nthe rewriteRoot option set?\n\n-Ingmar\n-- \nExherbo KDE, X.org maintainer\n"},{"id":"128421","messageId":"20091126015919.GA22762@dcvr.yhbt.net","threadId":"21757","inReplyTo":"1259198081-sup-3175@cannonball","subject":"Re: git-svn: dcommit --commiturl rebases against fetch url rather than against commit url","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-11-26T01:59:19Z","receivedAt":"2009-11-26T01:59:19Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Ingmar Vanhassel <ingmar@exherbo.org> wrote:\n> Hi Eric & list,\n> \n> I'm using a git-svn setup where svn-remote.svn.url is set to use\n> anonymouse svn, and svn-remote.svn.commiturl uses my ssh+svn:// login.\n> \n> I'm using anonymous svn for fetching because this git-svn import is\n> shared with a few other developers, who don't have commit access, but\n> who do prefer to use a git-svn import over SVN, for their work. Since I\n> use anonsvn for the import they can continue my import.\n> \n> When I dcommit to svn, git-svn happily commits the first commit. When it\n> tries to rebase after that it fetches from the anonsvn url, which is\n> synced only ever 5 or 10 minutes. Thus, it doesn't find my commit, and\n> it aborts, meaning I need to wait until anonsvn catches up, before being\n> able to do another commit.\n\nHi Ingmar,\n\nWow, talk about weird corner cases.  Is this the monster KDE SVN repo?\nI suppose the sync delay and multiple servers is necessary for that\nthing.  I wrote commitUrl because I needed to work on a tiny repo :)\n(and it was migrated fully to git shortly after)\n\n> Any suggestions on how this could be solved without reimporting with\n> the rewriteRoot option set?\n\nDepending on how big your imported repo is, I might want to keep two\ncopies since rewriteRoot can be messy.  So keep using the anonymous one\nshared with your developers, and make a full copy of $GIT_DIR for\nyourself to run git filter-branch against.\n\nThat means don't write to the anonymous one at all here, just copy that\nentire $GIT_DIR in case something goes wrong, you can recopy and tweak\nthe procedure (It's been a while since I've tried this :)\n\n * write a git filter-branch script that rewrites the git-svn-id:\n   lines to the svn+ssh:// URL,  I haven't used filter-branch in\n   a while but this should work...\n\n * remove all .rev_map.* files under $GIT_DIR/svn\n\n * change your $GIT_CONFIG file to point to the svn+ssh URL\n   no need to use the commitUrl option anymore, either\n\n * remove $GIT_DIR/svn/.metadata to be safe, too\n\n * run \"git svn fetch\"\n   This last step should rebuild all the .rev_map.* files under\n   $GIT_DIR/svn.\n\nHopefully that works for you, let us know how it goes.\n\n-- \nEric Wong\n"}]}