tags:

views:

446

answers:

1

Sorry for the long title, but I wanted to make clear the distinction between this question and The one asked by CaptainPicard

I have a svn structure like:

  • trunk/
  • branches/*
  • tags/*
  • Release Candidate/*

for all intents and purposes Release Candidates are used exactly like branches. So, I can tell git-svn to use Release Candidates as branches, but then I don't get the branches, or I can tell it to use branches, but don't get the Release Candidates. Can I have both? I would like something like

   [svn-remote "svn"]
      url = svn://server/repo
      fetch = trunk:refs/remotes/trunk
      branches = branches/*:refs/remotes/*
      branches = Release Candidate/*:refs/remotes/*
      tags = tags/*:refs/remotes/tags/*

To work, but it doesn't (as far as I can tell)

Also in the tried-but-it-doesn't-work camp is something like

[svn-remote "svn"]
  url = svn://svnserve/repo
  fetch = trunk:refs/remotes/trunk
  branches = Release Candidate/*:refs/remotes/RCs/*
  tags = tags/*:refs/remotes/tags/*
[svn-remote "svnbranches"]
  url = svn://svnserve/repo
  fetch = <What the heck do I put here???>
  branches = branches/*:refs/remotes/*

But I don't know what to put for the fetch of svnbranches (copying the fetch of svn makes git-svn error, leaving it out or putting in a nonexistant branch makes git error)

How can I have both types of branches pulled into git-svn?

Thanks,

+1  A: 

Right now, I don't have time to investigate why git-svn doesn't handle this. But it appears that you could work around your problem by placing Release_Candidates as a subdirectory of Branches:

trunk/*
branches/
    Release Candidates/*
    other branches
    .
    .
    .
tags/*

Then your answer to CaptainPicard will work and you can recreate your old svn structure with links if your build requires it.

Paul
I may have to do that eventually. I'm still trying to get rid of the space in Release Candidate because its annoying, so might get it moved at the same time. But for now I'm trying out git to see what it's like, and can't really modify upstream without good reason. I think I'll forgo the branches/*.
Greg
Hi Paul, could you check out http://stackoverflow.com/questions/642264/undo-change-in-git-not-rewriting-history ? How would you revert changes for one file from a previous commit (only one file, not the all commit)
VonC