[damned-lies] Ensure that doap data is taken from head branch
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Ensure that doap data is taken from head branch
- Date: Tue, 26 Oct 2010 20:01:11 +0000 (UTC)
commit 77778239a53f8fc884857b051d2ff58d31e42c1d
Author: Claude Paroz <claude 2xlibre net>
Date: Tue Oct 26 22:00:48 2010 +0200
Ensure that doap data is taken from head branch
stats/management/commands/update-from-doap.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/stats/management/commands/update-from-doap.py b/stats/management/commands/update-from-doap.py
index f4f0bb6..c3e84c0 100644
--- a/stats/management/commands/update-from-doap.py
+++ b/stats/management/commands/update-from-doap.py
@@ -1,7 +1,7 @@
import sys
from django.core.management.base import BaseCommand
-from stats.models import Module
+from stats.models import Module, ModuleLock
from stats.doap import update_doap_infos
class Command(BaseCommand):
@@ -19,5 +19,7 @@ class Command(BaseCommand):
except Module.DoesNotExist:
sys.stderr.write("No module named '%s'. Ignoring.\n" % mod_name)
continue
- update_doap_infos(mod)
- sys.stdout.write("Module '%s' updated from its doap file.\n" % mod_name)
+ with ModuleLock(mod):
+ mod.get_head_branch().checkout()
+ update_doap_infos(mod)
+ sys.stdout.write("Module '%s' updated from its doap file.\n" % mod_name)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]