Hello,

I'm using git p4 rebase cronjob for cloning a p4 repo and accessing from 
trac via git

As I did not find any usable git hook for CommitTicketUpdater I tried to 
integrate that into the 5-minutly cronjob doing the rebase:

#!/usr/bin/env bash

this_basename="${0##*/}"

source /etc/profile.d/my_perforce.sh
PATH="/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin"
cd /mnt/data/userspace/project
git p4 rebase
# Using the cron interval for checking new revs:
while read rev; do
    echo "$(date '+%Y%m%d'): Parsed new git rev: $rev" >> /tmp/${
this_basename}.log
    sudo -u trac trac-admin /mnt/data/trac/project/ changeset added project 
$rev
done < <(git reflog --since="9 minutes ago" --no-decorate |cut -d " " -f 1 
|sort 
-u)

This is working somehow but still not getting all changes in the 
meanwhile.. still working on it.

Some minor question: How do I change the formatting of the ticket comment, 
that is by default bold and green? Some template?

Best regards.

-- 
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 [email protected].
To post to this group, send email to [email protected].
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