Re: git-svn with non-standard repository layout
- From
- Stephen Bash <bash@genarts.com>
- Date
- Dec 5, 2012, 16:44 UTC
- Message-ID
- <1056577717.281976.1354725880396.JavaMail.root@genarts.com>
- In-Reply-To
- <CAA01Csoam7pXqPKnjvJB46T_sdjcW2S1oXdQT3HbUdfN4TK0kw@mail.gmail.com>
----- Original Message -----
Show 32 quoted lines
> From: "Piotr Krukowiecki" <piotr.krukowiecki@gmail.com> > Sent: Wednesday, December 5, 2012 11:26:54 AM > Subject: Re: git-svn with non-standard repository layout > > On Tue, Dec 4, 2012 at 10:19 PM, Carsten Fuchs > <carsten.fuchs@cafu.de> wrote: > > Hi Piotr, > > > > Am 2012-12-04 18:29, schrieb Piotr Krukowiecki: > > > >> Is there a way to handle svn repository with following layout? > >> > >> repo/trunk > >> repo/branches/branch1 > >> repo/branches/branch2 > >> repo/branches/work/developer1/branch3 > >> repo/branches/work/developer1/branch4 > >> repo/branches/work/developer2/branch5 > > > > see my post at > > http://www.cafu.de/forum/viewtopic.php?f=14&t=1092 > > heading "Branches outside branches/". > > > > You may need something like > > git config --add svn-remote.svn.fetch > > "path.../branchX:refs/remotes/branchX" > > for each of your branches. > > that works :) > > Although not an ideal solution - I have to manually configure all > branches + update them as they are created
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:
repo/7.1/trunk repo/7.1/branches/branchA repo/7.1/branches/branchB repo/7.1/tags/tag1 repo/7.2/trunk repo/7.2/branches/branchC ...
HTH, Stephen