{"thread":{"id":"32268","subject":"git-svn with non-standard repository layout","startedAt":"2012-12-04T17:29:30Z","lastAt":"2012-12-11T15:46:43Z","messageCount":6,"participants":["Piotr Krukowiecki","Stephen Bash"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"204496","messageId":"CAA01CspaYewmhTcYCWscsOWoNPvb6a=G1Ak0-=_spJSh6fsdHg@mail.gmail.com","threadId":"32268","inReplyTo":null,"subject":"git-svn with non-standard repository layout","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2012-12-04T17:29:30Z","receivedAt":"2012-12-04T17:29:30Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"Hi,\n\nIs there a way to handle svn repository with following layout?\n\nrepo/trunk\nrepo/branches/branch1\nrepo/branches/branch2\nrepo/branches/work/developer1/branch3\nrepo/branches/work/developer1/branch4\nrepo/branches/work/developer2/branch5\n\nIn default configuration it treats \"work\" dir as a branch. If I\nconfigure it with branches = branches/work/*/* it recognizes them\ncorrectly, but then the \"normal\" branch1, branch2 are lost.\n\nIdeally, I'd have one git repo with trunk, branches/{branch1,branch2},\nwork/developerX/branchY branches...\n\nAny ideas?\n\n--\nPiotr Krukowiecki\n"},{"id":"204530","messageId":"CAA01Csoam7pXqPKnjvJB46T_sdjcW2S1oXdQT3HbUdfN4TK0kw@mail.gmail.com","threadId":"32268","inReplyTo":"50BE68C9.7070100@cafu.de","subject":"Re: git-svn with non-standard repository layout","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2012-12-05T16:26:54Z","receivedAt":"2012-12-05T16:26:54Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"On Tue, Dec 4, 2012 at 10:19 PM, Carsten Fuchs <carsten.fuchs@cafu.de> wrote:\n> Hi Piotr,\n>\n> Am 2012-12-04 18:29, schrieb Piotr Krukowiecki:\n>\n>> Is there a way to handle svn repository with following layout?\n>>\n>> repo/trunk\n>> repo/branches/branch1\n>> repo/branches/branch2\n>> repo/branches/work/developer1/branch3\n>> repo/branches/work/developer1/branch4\n>> repo/branches/work/developer2/branch5\n>\n> see my post at\n>     http://www.cafu.de/forum/viewtopic.php?f=14&t=1092\n> heading \"Branches outside branches/\".\n>\n> You may need something like\n>     git config --add svn-remote.svn.fetch\n> \"path.../branchX:refs/remotes/branchX\"\n> for each of your branches.\n\nThanks,\n\nthat works :)\n\nAlthough not an ideal solution - I have to manually configure all\nbranches + update them as they are created\n\n\n--\nPiotr Krukowiecki\n"},{"id":"204531","messageId":"1056577717.281976.1354725880396.JavaMail.root@genarts.com","threadId":"32268","inReplyTo":"CAA01Csoam7pXqPKnjvJB46T_sdjcW2S1oXdQT3HbUdfN4TK0kw@mail.gmail.com","subject":"Re: git-svn with non-standard repository layout","fromName":"Stephen Bash","fromEmail":"bash@genarts.com","sentAt":"2012-12-05T16:44:40Z","receivedAt":"2012-12-05T16:44:40Z","isPatch":false,"sender":{"key":"bash@genarts.com","avatar":null},"body":"----- Original Message -----\n> From: \"Piotr Krukowiecki\" <piotr.krukowiecki@gmail.com>\n> Sent: Wednesday, December 5, 2012 11:26:54 AM\n> Subject: Re: git-svn with non-standard repository layout\n> \n> On Tue, Dec 4, 2012 at 10:19 PM, Carsten Fuchs\n> <carsten.fuchs@cafu.de> wrote:\n> > Hi Piotr,\n> >\n> > Am 2012-12-04 18:29, schrieb Piotr Krukowiecki:\n> >\n> >> Is there a way to handle svn repository with following layout?\n> >>\n> >> repo/trunk\n> >> repo/branches/branch1\n> >> repo/branches/branch2\n> >> repo/branches/work/developer1/branch3\n> >> repo/branches/work/developer1/branch4\n> >> repo/branches/work/developer2/branch5\n> >\n> > see my post at\n> >     http://www.cafu.de/forum/viewtopic.php?f=14&t=1092\n> > heading \"Branches outside branches/\".\n> >\n> > You may need something like\n> >     git config --add svn-remote.svn.fetch\n> > \"path.../branchX:refs/remotes/branchX\"\n> > for each of your branches.\n> \n> that works :)\n> \n> Although not an ideal solution - I have to manually configure all\n> branches + update them as they are created\n\nIt's not a 100% solution, but you can use a limited glob-like syntax in the branches and tags lines of the svn-remote config block.  You still need to do some manual work (one entry for each developer), but the wildcards eliminate a lot of the grunt work as individual branches are created.  See the very end of the git-svn manpage for examples (section titled CONFIGURATION).  I use that technique to track a subdirectory of the Slimdevices SVN repo [1], which has a similarly complex layout:\n\nrepo/7.1/trunk\nrepo/7.1/branches/branchA\nrepo/7.1/branches/branchB\nrepo/7.1/tags/tag1\nrepo/7.2/trunk\nrepo/7.2/branches/branchC\n...\n\nHTH,\nStephen\n"},{"id":"204541","messageId":"CAA01CsoS6xA-tGPw81tYmi1ETU8sQ08+oyHGg5ou1VGYrwd_SQ@mail.gmail.com","threadId":"32268","inReplyTo":"1056577717.281976.1354725880396.JavaMail.root@genarts.com","subject":"Re: git-svn with non-standard repository layout","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2012-12-05T22:19:44Z","receivedAt":"2012-12-05T22:19:44Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"On Wed, Dec 5, 2012 at 5:44 PM, Stephen Bash <bash@genarts.com> wrote:\n> ----- Original Message -----\n>> From: \"Piotr Krukowiecki\" <piotr.krukowiecki@gmail.com>\n>> Sent: Wednesday, December 5, 2012 11:26:54 AM\n>> Subject: Re: git-svn with non-standard repository layout\n>>\n>> On Tue, Dec 4, 2012 at 10:19 PM, Carsten Fuchs\n>> <carsten.fuchs@cafu.de> wrote:\n>> > Hi Piotr,\n>> >\n>> > Am 2012-12-04 18:29, schrieb Piotr Krukowiecki:\n>> >\n>> >> Is there a way to handle svn repository with following layout?\n>> >>\n>> >> repo/trunk\n>> >> repo/branches/branch1\n>> >> repo/branches/branch2\n>> >> repo/branches/work/developer1/branch3\n>> >> repo/branches/work/developer1/branch4\n>> >> repo/branches/work/developer2/branch5\n>> >\n>> > see my post at\n>> >     http://www.cafu.de/forum/viewtopic.php?f=14&t=1092\n>> > heading \"Branches outside branches/\".\n>> >\n>> > You may need something like\n>> >     git config --add svn-remote.svn.fetch\n>> > \"path.../branchX:refs/remotes/branchX\"\n>> > for each of your branches.\n>>\n>> that works :)\n>>\n>> Although not an ideal solution - I have to manually configure all\n>> branches + update them as they are created\n>\n> It's not a 100% solution, but you can use a limited glob-like syntax in the branches and tags lines of the svn-remote config block.  You still need to do some manual work (one entry for each developer), but the wildcards eliminate a lot of the grunt work as individual branches are created.  See the very end of the git-svn manpage for examples (section titled CONFIGURATION).  I use that technique to track a subdirectory of the Slimdevices SVN repo [1], which has a similarly complex layout:\n>\n> repo/7.1/trunk\n> repo/7.1/branches/branchA\n> repo/7.1/branches/branchB\n> repo/7.1/tags/tag1\n> repo/7.2/trunk\n> repo/7.2/branches/branchC\n\nDo you mean something like\n\n   branches = branches/work/*/*:refs/remotes/work/*\n   branches = branches/{branch1,branch2}:refs/remotes/branches/*\n\ninstead of (currently used)\n\n   branches = branches/work/*/*:refs/remotes/work/*\n   fetch = branches/branch1:refs/remotes/branches/branch1\n   fetch = branches/branch2:refs/remotes/branches/branch2\n\nI will try that tomorrow.\n\nBTW what's the difference between \"fetch\" and \"branches\" keys? I could\nonly find one: \"fetch\" does not support glob arguments and \"branches\"\ndo.\n\n--\nPiotr Krukowiecki\n"},{"id":"204547","messageId":"516524996.289805.1354751683987.JavaMail.root@genarts.com","threadId":"32268","inReplyTo":"CAA01CsoS6xA-tGPw81tYmi1ETU8sQ08+oyHGg5ou1VGYrwd_SQ@mail.gmail.com","subject":"Re: git-svn with non-standard repository layout","fromName":"Stephen Bash","fromEmail":"bash@genarts.com","sentAt":"2012-12-05T23:54:44Z","receivedAt":"2012-12-05T23:54:44Z","isPatch":false,"sender":{"key":"bash@genarts.com","avatar":null},"body":"----- Original Message -----\n> From: \"Piotr Krukowiecki\" <piotr.krukowiecki@gmail.com>\n> Sent: Wednesday, December 5, 2012 5:19:44 PM\n> Subject: Re: git-svn with non-standard repository layout\n> \n> Do you mean something like\n> \n>    branches = branches/work/*/*:refs/remotes/work/*\n>    branches = branches/{branch1,branch2}:refs/remotes/branches/*\n> \n> instead of (currently used)\n> \n>    branches = branches/work/*/*:refs/remotes/work/*\n>    fetch = branches/branch1:refs/remotes/branches/branch1\n>    fetch = branches/branch2:refs/remotes/branches/branch2\n\nEssentially yes.  But I guess since you have branches at the same level as the work directory, you either have to add to the glob for each new branch or add another fetch line...  Doesn't seem like a big win to me.  Jumping on a tangent, I thought there could only be one wildcard on the left side of the ':' (and the '*' on the right).  If your work/*/* is actually working, that's quite interesting.\n \n> BTW what's the difference between \"fetch\" and \"branches\" keys? I could\n> only find one: \"fetch\" does not support glob arguments and \"branches\"\n> do.\n\nThat's the only difference I've discovered, though someone more familiar with the code might be able to say more.\n\nHere's my config for the Slimdevices repo I mentioned:\n\n[svn-remote \"svn\"]\n\turl = http://svn.slimdevices.com/repos/slim\n\n\tfetch = trunk/server:refs/remotes/trunk\n\tfetch = 7.5/trunk/server:refs/remotes/7.5/trunk\n\tfetch = 7.6/trunk/server:refs/remotes/7.6/trunk\n\tfetch = 7.7/trunk/server:refs/remotes/7.7/trunk\n\tfetch = 7.8/trunk/server:refs/remotes/7.8/trunk\n\n\tbranches = branches/*/server:refs/remotes/pre7/*\n\tbranches = 7.5/branches/*/server:refs/remotes/7.5/*\n\tbranches = 7.6/branches/*/server:refs/remotes/7.6/*\n\tbranches = 7.7/branches/*/server:refs/remotes/7.7/*\n\tbranches = 7.8/branches/*/server:refs/remotes/7.8/*\n\n\ttags = 7.5/tags/*/server:refs/remotes/7.5/tags/*\n\ttags = 7.6/tags/*/server:refs/remotes/7.6/tags/*\n\ttags = 7.7/tags/*/server:refs/remotes/7.7/tags/*\n\ttags = 7.8/tags/*/server:refs/remotes/7.8/tags/*\n\nLots of repetition, but now that I look at it this repo doesn't have the branches/work clash yours does, which simplifies the config.\n\nHTH,\nStephen\n"},{"id":"204679","messageId":"CAA01CsqJPw9gNfgg5m6YycAsUct1AR=0v=OBj0hAMqLf6ZaKOw@mail.gmail.com","threadId":"32268","inReplyTo":"516524996.289805.1354751683987.JavaMail.root@genarts.com","subject":"Re: git-svn with non-standard repository layout","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2012-12-11T15:46:43Z","receivedAt":"2012-12-11T15:46:43Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"On Thu, Dec 6, 2012 at 12:54 AM, Stephen Bash <bash@genarts.com> wrote:\n> ----- Original Message -----\n>> From: \"Piotr Krukowiecki\" <piotr.krukowiecki@gmail.com>\n>> Sent: Wednesday, December 5, 2012 5:19:44 PM\n>> Subject: Re: git-svn with non-standard repository layout\n>>\n>> Do you mean something like\n>>\n>>    branches = branches/work/*/*:refs/remotes/work/*\n>>    branches = branches/{branch1,branch2}:refs/remotes/branches/*\n>>\n>> instead of (currently used)\n>>\n>>    branches = branches/work/*/*:refs/remotes/work/*\n>>    fetch = branches/branch1:refs/remotes/branches/branch1\n>>    fetch = branches/branch2:refs/remotes/branches/branch2\n>\n> Essentially yes.  But I guess since you have branches at the same level as the work directory,\n> you either have to add to the glob for each new branch or add another fetch line...  Doesn't seem\n> like a big win to me.  Jumping on a tangent, I thought there could only be one wildcard on the\n> left side of the ':' (and the '*' on the right).  If your work/*/* is actually working, that's quite interesting.\n\nAt first I though it was working, but it seems it does not. I have\nseveral branches, including:\n  remotes/trunk\n  remotes/work/user/xxx (based on remotes/trunk)\n  master (based on remotes/trunk)\n  xxx (based on remotes/work/user/xxx)\n\nIf I do 'git svn rebase -l' on xxx, it rebases commits on xxx (i.e.\nremotes/trunk..remotes/work/user/xxx)\non top of master, so now xxx is based on master  :(\n\nI don't know if this is git-svn bug, or the problem with 'work/*/*'\npattern, or something else...\nI will try explicit branches specification and will see what happens.\n\n\n--\nPiotr Krukowiecki\n"}]}