2016-04-16 44 views
0

这个问题回答了你怎么可以创建一个驻留在Bitnami栈同一环境中的多个SVN的环境,也计划:How can I create new project in Trac?在Bitnami堆栈中创建独立的Git和SVN项目

最新Bitnami Trac的堆栈允许你创建一个初始SVN或Git项目,当您安装软件。我的问题是,如果我们在安装时创建了一个SVN项目,我们如何创建一个Git项目。

文档说initenv命令应该这样使用:

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

我们如何指导Trac的管理员创建一个Git或SVN项目?我跑以下命令:

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

但我收到以下错误:

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. 

我不知道是什么问题。

回答

-1

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

Git有建立包装为SVN(GIT支持SVN为好)

你像往常一样工作,但是当你有一个svn的,你想使用它作为GIT回购只需使用git svn

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

1

你不想使用trac-admininitenv,除非你正在创建一个新的Trac的环境trac-admininitenv确实允许您指定现有的SVN或Git存储库以初始化Trac配置。但是,听起来您已经创建了Trac环境,因此您只需创建SVN或Git存储库并将其添加到现有的Trac环境。

trac-admin不会创建SVN或Git项目。首先,您需要使用svnadmin create创建SVN项目,或者使用git init创建Git项目。然后,您可以将SVN或Git存储库添加到Trac。您可以将存储库添加到trac.ini的[repositories]部分,但不要使用[trac]repository_dir选项,因为它已被弃用。如果您已有[trac]repository_dir设置,请将其移至[repositories]部分。替代编辑[repositories]部分,您可以使用trac-admin $env repository add将存储库添加到数据库。两种方法都在Trac Repository Admin documentation中概述。

+0

非常感谢。我更喜欢单独的项目,因为我需要不同项目的时间表和更新单独显示(我使用单独的团队,并且我想分别监视和评估他们的活动)。事实上,Trac的术语是相当混乱的(环境,存储库和项目)。 – wmac

+0

同意这可能会造成混淆。警告记录在[TracEnvironment页面](https://trac.edgewall.org/wiki/TracEnvironment)上。查看[有用提示](https://trac.edgewall.org/wiki/TracEnvironment#UsefulTips)。 – RjOllos