0

This question answers how you could create multiple SVN environments and also projects that reside in the same environment in Bitnami stack: How can I create new project in Trac?

The latest Bitnami Trac stack allows you to create an initial SVN or Git project when you install the software. My question is that how we can create a Git project if we have created an SVN project at installation time.

The documentation says initenv command should be used like this:

trac-admin <targetdir> initenv [<projectname> <db> [<repostype> <repospath>]]

How do we instruct the trac-admin to create a Git or SVN project? I ran the following command:

trac-admin.exe E:\programming\TracStack\projects\Project3 initenv Project3 sqlite:db/trac.db git E:\programming\TracStack\gitrepos-p3\.git

But I receive the following error:

Warning: couldn't index the default repository.

This can happen for a variety of reasons: wrong repository type, 
no appropriate third party library for this repository type, 
no actual repository at the specified repository path...

You can nevertheless start using your Trac environment, but
you'll need to check again your trac.ini file and the [trac]
repository_type and repository_path settings.

I am not sure what is the problem.

Community
  • 1
  • 1
wmac
  • 1,023
  • 1
  • 16
  • 34

2 Answers2

1

You don't want to use trac-admin initenv unless you are creating a new Trac environment. trac-admin initenv does allow you to specify an existing SVN or Git repository in order to initialize the Trac configuration. However, it sounds like you already have a Trac environment created, so you just want to create and add a SVN or Git repository to the existing Trac environment.

trac-admin does not create SVN or Git projects. First you need to create an SVN project using svnadmin create, or a create a Git project using git init. You can then add the SVN or Git repository to Trac. You can add the repository in the [repositories] section of trac.ini, but don't use the [trac] repository_dir option because it is deprecated. If you already have a [trac] repository_dir setting, move it to the [repositories] section. Alternative to editing the [repositories] section you can add a repository to the database using trac-admin $env repository add. Both methods are outline in the Trac Repository Admin documentation.

RjOllos
  • 2,900
  • 1
  • 19
  • 29
  • Thank you very much. I prefer separate projects because I need the timelines and updates of different projects to appear separately (I use separate teams and I want to monitor and evaluate their activities separately). Indeed the terminology of Trac is quite confusing (Environment, repository and project). – wmac Apr 19 '16 at 18:37
  • Agreed that it can be confusing. The caveats are documented on the [TracEnvironment page](https://trac.edgewall.org/wiki/TracEnvironment). Check out the [useful tips](https://trac.edgewall.org/wiki/TracEnvironment#UsefulTips). – RjOllos Apr 19 '16 at 18:48
-1

My question is that how we can create a Git project if we have created an SVN project at installation time.

Git has build in wrappers for svn (git supports svn as well)

You work as usual but when you have a svn repo which you wish to use it as GIT repo you simply use the git svn

https://git-scm.com/docs/git-svn

CodeWizard
  • 128,036
  • 21
  • 144
  • 167