threads / discuss / 13857

git-svn: multiple branches directories

Subject: git-svn: multiple branches directories

## tl;dr

4 messages between Jun 8, 2008 and Jun 8, 2008.

replies: 3people: 3as markdown or json

Tzafrir Cohen· Jun 8, 2008, 00:23 UTC · lore
Hi

Does git-svn support a repository layout where branches may reside under more than one root?

/trunk
/branches
  branch1
  branch2
  branch3
/somedir
  branch4
  branch5
  branch6
/tags
  ...
-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen@xorcom.com
+972-50-7952406           mailto:tzafrir.cohen@xorcom.com
http://www.xorcom.com  iax:guest@local.xorcom.com/tzafrir
Steven Walter· Jun 8, 2008, 16:00 UTC · re: Tzafrir Cohen · lore

Re: git-svn: multiple branches directories

On Sat, Jun 7, 2008 at 8:23 PM, Tzafrir Cohen <tzafrir.cohen@xorcom.com> wrote:
Show 16 quoted lines
> Hi
>
> Does git-svn support a repository layout where branches may reside under
> more than one root?
>
> /trunk
> /branches
>  branch1
>  branch2
>  branch3
> /somedir
>  branch4
>  branch5
>  branch6
> /tags
>  ...

git-svn does support it. The way that I interact with repositories like this is to have the main git-svn remote track only the trunk (fetch = /trunk:...), and then to add addititonal remotes for each branch that I want to track. There may be a nicer way to do it, but git-svn certainly supports the method just described.

-- 
-Steven Walter <stevenrwalter@gmail.com>
"A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects."
 -Robert Heinlein
Tzafrir Cohen· Jun 8, 2008, 18:37 UTC · re: Steven Walter · lore

Re: git-svn: multiple branches directories

On Sun, Jun 08, 2008 at 12:00:58PM -0400, Steven Walter wrote:
Show 23 quoted lines
> On Sat, Jun 7, 2008 at 8:23 PM, Tzafrir Cohen <tzafrir.cohen@xorcom.com> wrote:
> > Hi
> >
> > Does git-svn support a repository layout where branches may reside under
> > more than one root?
> >
> > /trunk
> > /branches
> >  branch1
> >  branch2
> >  branch3
> > /somedir
> >  branch4
> >  branch5
> >  branch6
> > /tags
> >  ...
> 
> git-svn does support it.  The way that I interact with repositories
> like this is to have the main git-svn remote track only the trunk
> (fetch = /trunk:...), and then to add addititonal remotes for each
> branch that I want to track.  There may be a nicer way to do it, but
> git-svn certainly supports the method just described.
Thanks for your answer,
I'm afraid I don't follow you. Where do I have to write that and where?
-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen@xorcom.com
+972-50-7952406           mailto:tzafrir.cohen@xorcom.com
http://www.xorcom.com  iax:guest@local.xorcom.com/tzafrir
Björn Steinbrink· Jun 8, 2008, 18:51 UTC · re: Tzafrir Cohen · lore

Re: git-svn: multiple branches directories

On 2008.06.08 21:37:42 +0300, Tzafrir Cohen wrote:
Show 28 quoted lines
> On Sun, Jun 08, 2008 at 12:00:58PM -0400, Steven Walter wrote:
> > On Sat, Jun 7, 2008 at 8:23 PM, Tzafrir Cohen <tzafrir.cohen@xorcom.com> wrote:
> > > Hi
> > >
> > > Does git-svn support a repository layout where branches may reside under
> > > more than one root?
> > >
> > > /trunk
> > > /branches
> > >  branch1
> > >  branch2
> > >  branch3
> > > /somedir
> > >  branch4
> > >  branch5
> > >  branch6
> > > /tags
> > >  ...
> > 
> > git-svn does support it.  The way that I interact with repositories
> > like this is to have the main git-svn remote track only the trunk
> > (fetch = /trunk:...), and then to add addititonal remotes for each
> > branch that I want to track.  There may be a nicer way to do it, but
> > git-svn certainly supports the method just described.
> 
> Thanks for your answer,
> 
> I'm afraid I don't follow you. Where do I have to write that and where?

You can just add more svn-remote to a single git repo with "git svn init". So you could do:

git svn clone -s svn://host/some/repo cd repo git svn init --branches somedir svn://host/some/repo/ svn2 git svn fetch svn2

To fetch all new stuff at once, you would then later use "git svn fetch --all".

Björn

← back to recent threads