5
0
mirror of https://github.com/odoo/runbot.git synced 2025-03-16 07:55:45 +07:00

[IMP] runbot: perform fetch with one git command

Closes: 
This commit is contained in:
Andreas Perhab 2018-09-06 11:56:58 +02:00 committed by Christophe Monniez
parent 0542b68b92
commit 3915f3d7ae

View File

@ -143,8 +143,7 @@ class runbot_repo(models.Model):
repo.name, int(t0 - fetch_time), int(t0 - dt2time(repo.hook_time)))
return
repo._git(['fetch', '-p', 'origin', '+refs/heads/*:refs/heads/*'])
repo._git(['fetch', '-p', 'origin', '+refs/pull/*/head:refs/pull/*'])
repo._git(['fetch', '-p', 'origin', '+refs/heads/*:refs/heads/*', '+refs/pull/*/head:refs/pull/*'])
fields = ['refname', 'objectname', 'committerdate:iso8601', 'authorname', 'authoremail', 'subject', 'committername', 'committeremail']
fmt = "%00".join(["%(" + field + ")" for field in fields])