One thing that you can do is use 'svn look' to look at the paths being
committed.  You can use that to figure out which Trac project is the
relevant one.

Depending on your requirements,  you could either return a list of which
Trac projects are being used to commit against,  or if each commit needs to
be tied to just one Trac project,  then you can block commits that try to
update files that belong to different Trac projects.  You'd get the Trac
project from the first path in the commit,  then raise an error if any
additional paths did not belong to the same project.


On Tue, Apr 27, 2010 at 8:16 AM, Marjory L. Mackes
<[email protected]>wrote:

>   Hi Trac/SVN Users!
>
> I am using Trac 0.11.0 and our group recently added a couple of new
> projects.
>
> Right now we have one Subversion with directories for each project
> Project
>      branches
>      tags
>      trunk
>
> We have 3 Trac (I want to say instances) that are sharing the
> authentication file
>
> My question revolves around the /apps/trac/var/svn/hooks/pre-commit.plhook 
> which requires
> the user to enter the Trac ID number to check in the source to associate
> the change set with the ticket.
>
> Originally when it was just one project, one trac this worked fine, but now
> I need to customize this to be sure I point to the correct repository
> ($repos).  It is just not clear to me what that value is that is passed in
> from trac so that I can create the if construct to handle it.   I already
> figured out the part that points to SQLDB
>
> If $repos = Project A then use the path to Project A Trac
>   elseif Project B then use the path to Project B Trac
>   elseif Project C then use the path to Project C Trac.
>
> I do understand that version 0.12.0 is in beta test and is supposed to
> handle multiple projects.
>
> The workflow works with the exception of this check in.
>
> Right now it lets me get around it for all projects by using either
> CM,comment or Maint,comment for the check in comment since that is generic
>
> Thanks!
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<trac-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/trac-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to