On Wed, Jun 11, 2014 at 12:39 PM, Abtin Khatoonabadi <abtin0...@gmail.com>
wrote:

> Hello,
>
>
>
> I am trying to have the following set up.
>
>
>
> Assume that my customer has two different project developments in one SVN
> repository, project A and project B.  Project A and project B are also
> sharing the same Trac repository.  My customer is asking me to do the
> following:
>
>
>
> ·         Both Project A and B are going to share the same SVN repository.
>
> ·         Project A and B need to have their own Trac repository.
>

There's nothing special about having two Trac project and a single
Subversion repository. Just setup two Trac projects and configure each to
connect to the Subversion repository. There are some nuances to how setup
multiple Trac projects, and you can read more about that here:
http://trac.edgewall.org/wiki/TracMultipleProjects

The situation is more complex if you wish to implement access controls so
that each Trac project has limited access to the Subversion repository
(e.g. Project A can only access /projectA in the SVN repository):
http://trac.edgewall.org/wiki/TracMultipleProjectsSVNAccess


> ·         When there is a commit on the project A part of the SVN
> repository, the referenced ticket on the Trac repository A needs to be
> updated.
>
> ·         When there is a commit on the project B part of the SVN
> repository, the referenced ticket on the Trac repository B needs to be
> updated.
>

Setting up the post-commit hook for your scenario will also be a bit more
complex. For the basics of setting up a post-commit hook, start here:
http://trac.edgewall.org/wiki/TracInstall#AutomaticreferencetotheSVNchangesetsinTractickets

Assuming you are calling trac-svn-hook from your post-commit hook, you
could probably use svnlook to inspect the paths that are modified, and use
the modified path to set TRAC_ENV before calling trac-svn-hook.
http://trac.edgewall.org/browser/tags/trac-1.0.1/contrib/trac-svn-hook

If /projectA is associated with Trac project A and /projectB is associated
with Trac project B, you'll have to decide how you want to handle the case
that the user is committing changes to both paths. This might not be an
issue for you depending on how you've configured access controls, or if
your processes dictate that a user would never make a change like that. You
could probably reject such a change in the pre-commit hook.
http://stackoverflow.com/questions/17790484/svn-server-pre-commit-hook-know-the-list-of-files-that-are-being-commited

I looked at *http://trac.edgewall.org/wiki <http://trac.edgewall.org/wiki> *and
> I didn’t find anything about one SVN repositoriy for multiple Trac
> repositories.  I was wondering if this capability exists? If yes, then
> could you provide the link so I can read and learn?
>
>
>
> Thank you for any help you can provide in this situation.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to