0

I'm evaluating SubGit, and it looks like it imports fairly well, except that we have both standard and nonstandard branches in our SVN directory:

- trunk
- tags
- branches
  - test
  - JIRA_89
  - JIRA_92
  - user
    - jim
    - bob

There are standard branches like branches/test and branches/JIRA_89, but we also have a few branches branches/user/jim and branches/user/bob.

What's the right way to rename these user branches for a subgit import?

Jason S
  • 184,598
  • 164
  • 608
  • 970

1 Answers1

2

You can use this configuration

trunk = trunk:refs/heads/master
branches = branches/*:refs/heads/*
branches = branches/users/*:refs/heads/users/*
shelves = shelves/*:refs/shelves/*
tags = tags/*:refs/tags/*

or if you want branches/users/jim to be translated to refs/heads/james (and branches/users/bob to refs/heads/robert), use this config

trunk = trunk:refs/heads/master
branches = branches/*:refs/heads/*
branches = branches/users/jim:refs/heads/james
branches = branches/users/bob:refs/heads/robert
branches = branches/users/*:refs/heads/users/*
shelves = shelves/*:refs/shelves/*
tags = tags/*:refs/tags/*

But note that in this case branches/james and branches/robert won't be translated if they exist, because refs/heads/james and refs/heads/robert names are already taken (but you also can add special rules for those branches if you want to translate them).

Dmitry Pavlenko
  • 8,530
  • 3
  • 30
  • 38
  • could you take a look at http://stackoverflow.com/questions/29203392/using-subgit-with-repositories-having-git-directory ? I can't seem to figure out how to specify the configuration if I'm working with the usual `.git` directory, since `subgit import` doesn't allow you to specify a configuration file, and `subgit configure` won't create the files if your directory has a `.git` directory in it. – Jason S Mar 23 '15 at 16:13