From 12408702eaf89ea338670ba808da9ef49e35c562 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 14 Nov 2011 12:19:17 -0600 Subject: Allow population of signoff specs with SVN commit messages This pulls them from the latest SVN commit on trunk. We don't have a failproof method of getting the exact right commit, but this should be close if it is run on a regular basis via cron (aka hourly). Note that running locally, I needed the development version of South to get the migration included here to apply because of information_schema changes in the current version of MySQL. Signed-off-by: Dan McGee --- packages/views/signoff.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages/views') diff --git a/packages/views/signoff.py b/packages/views/signoff.py index 26b6e710..e57b4d9a 100644 --- a/packages/views/signoff.py +++ b/packages/views/signoff.py @@ -98,7 +98,10 @@ def _signoff_options_all(request, name, repo): pkgver=package.pkgver, pkgrel=package.pkgrel, epoch=package.epoch, arch=package.arch, repo=package.repo) + + if spec.user is None: spec.user = request.user + form = SignoffOptionsForm(request.POST, instance=spec) if form.is_valid(): form.save() @@ -122,6 +125,8 @@ def signoff_options(request, name, repo, arch): spec = SignoffSpecification(pkgbase=package.pkgbase, pkgver=package.pkgver, pkgrel=package.pkgrel, epoch=package.epoch, arch=package.arch, repo=package.repo) + + if spec.user is None: spec.user = request.user if request.POST: -- cgit v1.2.3-54-g00ecf