Georg wrote:
> Hi,
>
> I'm trying to use the trac-post-commit-hook in the trac multirepos branch.
> I expect I will have to adapt some faction of it, e.g.:
>
>   

The following is still OK:

>         try:
>             chgset = repos.get_changeset(rev)
>         except NoSuchChangeset:
>             return # out of scope changesets are not cached
>         self.author = chgset.author
>         self.rev = rev
>         self.msg = "(In [%s]) %s" % (rev, chgset.message)
>         self.now = datetime.now(utc)
>
> What ist the correct API to use in order to find the changeset in the right
> repository?  

What needs to be changed is the way to get the `repos` (Repository) object.
When you do:

  repos = self.env.get_repository()

you only get the default repository. if there's one configured.
With the multirepository support, you need to do something like:

  repos = self.env.get_repository(reponame)

`reponame` should be taken in this case from a new command line argument.

-- Christian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" 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-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to