echo "$new_commits" | git rev-list --reverse --stdin | while read commit ; do
set_describe "$commit"
set_describe_tags "$commit"
- "$PYTHON" "$POST_RECEIVE_TRAC" "$TRAC_ENV" "$short_refname" "$describe" "$describe_tags" "$commit"
+ author="$(git rev-list -n 1 $commit --pretty=format:'%cn <%ce>' | grep -v $commit)"
+ message="$(git rev-list -n 1 $commit --pretty=format:'%s%n%b' | grep -v $commit)"
+ "$PYTHON" "$POST_RECEIVE_TRAC" "$TRAC_ENV" "$short_refname" "$describe" "$describe_tags" "$commit" "$author" "$message"
done
done
describe = sys.argv[3]
describe_tags = sys.argv[4]
rev = sys.argv[5]
+author = sys.argv[6]
+message = sys.argv[7]
def refs(ticket):
pass
tickets = {}
env = open_environment(project)
-repos = env.get_repository()
-repos.sync()
-
-changeset = repos.get_changeset(rev)
-
-for command, ticketList in commandPattern.findall(changeset.message):
+for command, ticketList in commandPattern.findall(message):
if commands.has_key(command.lower()):
for ticketId in ticketPattern.findall(ticketList):
tickets.setdefault(ticketId, []).append(commands[command.lower()])
if change['permanent']:
cnum += 1
- username = authorPattern.findall(changeset.author)[0]
+ username = authorPattern.findall(author)[0]
now = datetime.now(utc)
- message = "(On %s [changeset:%s %s]) %s" % (refname, rev, describe_tags, changeset.message)
+ message = "(On %s [changeset:%s %s]) %s" % (refname, rev, describe_tags, message)
ticket['branch'] = refname
ticket.save_changes(username, message, now, db, cnum+1)
db.commit()