tags:

views:

45

answers:

1

our svn had so far traditional layout:

 trunk
 branches/
 tags/

i cloned whole the repository long time ago and everything worked perfectly. but few weeks ago someone figured out that particular releases should go to releases/ instead of branches/ so the layout changed to following:

  trunk
  branches/
  releases/
  tags/

is there any way I could start tracking releases/ without cloning whole the repository again (which contains over 15k revisions...)? this is how my config looks like at this moment:

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        autocrlf = false

[svn-remote "svn"]
        url = https://blahblah
        fetch = trunk:refs/remotes/trunk
        branches = branches/*:refs/remotes/*
        tags = tags/*:refs/remotes/tags/*

unfortunately "git svn fetch" for some reason does not fetch anything from releases/ and "git branch -r" does not show any release within this directory.

+1  A: 

According to git help svn, it seems that you can specify multiple branches=... lines in your config file:

When using multiple --branches or --tags, git svn does not automatically handle name collisions (for example, if two branches from different paths have the same name, or if a branch and a tag have the same name). In these cases, use init to set up your git repository then, before your first fetch, edit the .git/config file so that the branches and tags are associated with different name spaces. For example:

branches = stable/*:refs/remotes/svn/stable/*
branches = debug/*:refs/remotes/svn/debug/*

In your case, if you're sure you're not going to have any name collision, I guess you could have the following lines:

branches = branches/*:refs/remotes/*
branches = releases/*:refs/remotes/*
amx
yup. looks like it's working! the only problem is that for some reason I have no history on fetched release (which was branched from trunk). but for me it's a minor problem at this moment. thanks.
Michal