I recently noticed that my Trac installation wasn't storing the revision
table, also using git.  (I noticed this while trying to search against
commits.)  For the GitPlugin to store revisions in the Trac database, you
need to have the following configuration set:

    [git]
    cached_repository = true

You should then run

    trac-admin <site> repository resync "*"

to collect past revisions and store them in the database.

Future revisions should also start to appear as they occur.  Though, I
can't tell you for sure if this will work with the old repository hooks.

On Sat, Mar 3, 2012 at 12:09 AM, Tim Gallagher <[email protected]>wrote:

> Hi,
>
> I'm trying to set up the TracMetrixPlugin and the commits per day plot is
> empty. Digging through the code, there is the following SQL statements:
>
> cursor.execute("SELECT rev, time, author FROM revision "
>               "WHERE time >= %s AND time < %s ORDER BY time",
>               (to_timestamp(start_date), to_timestamp(stop_date)))
>
> which is not returning any commits. I changed it to get rid of the time
> restrictions (so it's just SELECT rev, time, author FROM revision) and
> there's only a handful of commits from 3 years ago and nothing else. The
> number of rows in the table is only 161 but we've had thousands of commits.
>
> Is the revision table actually updated when changesets are added? We have
> the git post-receive hook enabled, but it's an older one,
> trac-post-commit-hook. We're using Trac 0.12. Something seems to be missing
> here; the repository browser shows everything correctly and we get our
> tickets updated upon commits.
>
> Thanks for any help you can offer,
>
> Tim
>
> --
> 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.
>
>

-- 
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