{"thread":{"id":"22344","subject":"git-svn question: adding a branch to a local clone of an upstream git-svn clone","startedAt":"2010-01-22T19:15:10Z","lastAt":"2010-01-22T22:43:29Z","messageCount":3,"participants":["Jay Soffian"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"132416","messageId":"76718491001221115r56c1f6e4qbf6cecc30ce4af58@mail.gmail.com","threadId":"22344","inReplyTo":null,"subject":"git-svn question: adding a branch to a local clone of an upstream git-svn clone","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-01-22T19:15:10Z","receivedAt":"2010-01-22T19:15:10Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"I have a clone of a repo that is itself a git-svn clone:\n\ngit://git.chromium.org/chromium.git\n\nSo my .git/config has (obviously):\n\n[remote \"origin\"]\n\turl = git://git.chromium.org/chromium.git\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n\nThe upstream repo has only trunk. I want to use git-svn to add an\nadditional branch:\n\nhttp://src.chromium.org/svn/branches/249/\n\nSo I added this to my .git/config:\n\n[svn-remote \"svn\"]\n\turl = http://src.chromium.org/svn\n\tfetch = branches/249/src:refs/remotes/branches/249\n\nI looked up the branch point for 249 and created a new branch:\n\n$ svn log http://src.chromium.org/svn/branches/249\n------------------------------------------------------------------------\nr32060 | laforge@chromium.org | 2009-11-16 11:34:43 -0500 (Mon, 16 Nov\n2009) | 1 line\n\nBranching for 249 @32041\n------------------------------------------------------------------------\n$ git rev2sha | grep src@32041\nbf6f4ed svn://svn.chromium.org/chrome/trunk/src@32041\n$ git checkout -b 249 bf6f4ed\n\nAnd then attempted a git svn fetch. Which wanted to grab the entire\nsvn history. I then realized that the origin git clone is from a\ndifferent upstream URL (to which I don't have access), so I tried\nadding rewriteRoot:\n\n[svn-remote \"svn\"]\n\turl = http://src.chromium.org/svn\n\tfetch = branches/249/src:refs/remotes/branches/249\n\trewriteRoot = svn://svn.chromium.org/chrome\n\nSame problem. Ah, UUID is also different. Unfortunately, git-svn\ndoesn't have a \"rewriteUUID\" config (I'm working on a patch), but I\ndid try hacking .git/svn/.metadata to look like this:\n\n[svn-remote \"svn\"]\n\treposRoot = http://src.chromium.org/svn\n\tuuid = 4ff67af0-8c30-449e-8e8b-ad334ec8d88c\n\tsvnsync-uuid = 0039d316-1c4b-4281-b951-d872f2087c98\n\tsvnsync-url = svn://svn.chromium.org/chrome\n\nThen changed my .git/config to:\n\n[svn-remote \"svn\"]\n\turl = http://src.chromium.org/svn\n\tfetch = branches/249/src:refs/remotes/branches/249\n\tuseSvnsyncProps = true\n\nI blew away .git/svn/refs and tried again:\n\n$ git svn fetch\nFound possible branch point: http://src.chromium.org/svn/trunk/src =>\nhttp://src.chromium.org/svn/branches/249/src, 32041\nInitializing parent: refs/remotes/branches/249@32041\nr3 = c14d891d44f0afff64e56ed7c9702df1d807b1ee (refs/remotes/branches/249@32041)\n\nSadly, git svn is still trying to fetch the entire history.\n\nHmpfh. Any suggestions? Maybe I should just not worry about trying to\nhave a connected history locally (I'll never be dcomitting) and just\nuse git svn fetch -r 32041:HEAD ?\n\nj.\n"},{"id":"132417","messageId":"76718491001221203y54c3ec5br8fa7a40b5dd7da6a@mail.gmail.com","threadId":"22344","inReplyTo":"76718491001221115r56c1f6e4qbf6cecc30ce4af58@mail.gmail.com","subject":"Re: git-svn question: adding a branch to a local clone of an upstream git-svn clone","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-01-22T20:03:10Z","receivedAt":"2010-01-22T20:03:10Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Fri, Jan 22, 2010 at 2:15 PM, Jay Soffian <jaysoffian@gmail.com> wrote:\n\n> $ git checkout -b 249 bf6f4ed\n> ...\n> [svn-remote \"svn\"]\n>        url = http://src.chromium.org/svn\n>        fetch = branches/249/src:refs/remotes/branches/249\n\nAlso tried this:\n\n$ git update-ref refs/remotes/branches/249 bf6f4ed\n$ git svn fetch\nDone rebuilding\n.git/svn/refs/remotes/branches/249/.rev_map.4ff67af0-8c30-449e-8e8b-ad334ec8d88c\nDone rebuilding\n.git/svn/refs/remotes/branches/249/.rev_map.4ff67af0-8c30-449e-8e8b-ad334ec8d88c\nDone rebuilding\n.git/svn/refs/remotes/branches/249/.rev_map.4ff67af0-8c30-449e-8e8b-ad334ec8d88c\n[... lots of these as it works its way through 30k revisions...]\nFound possible branch point: http://src.chromium.org/svn/trunk/src =>\nhttp://src.chromium.org/svn/branches/249/src, 32041\nInitializing parent: refs/remotes/branches/249@32041\nr3 = c14d891d44f0afff64e56ed7c9702df1d807b1ee (refs/remotes/branches/249@32041)\n...\n\nSo, no help either. :-(\n\nj.\n"},{"id":"132426","messageId":"76718491001221443x655db9ddidb5feb66f289c2cc@mail.gmail.com","threadId":"22344","inReplyTo":"76718491001221203y54c3ec5br8fa7a40b5dd7da6a@mail.gmail.com","subject":"Re: git-svn question: adding a branch to a local clone of an upstream git-svn clone","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-01-22T22:43:29Z","receivedAt":"2010-01-22T22:43:29Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Fri, Jan 22, 2010 at 3:03 PM, Jay Soffian <jaysoffian@gmail.com> wrote:\n> So, no help either. :-(\n\nOkay, got this working with some git-svn hackage. Patch forthcoming.\n\nj.\n"}]}