bodhi/controllers.py | 8 ++++++++
bodhi/tests/test_controllers.py | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
New commits:
commit b12c324072823df7ee1afe7b681f1d0df2f6c97b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Mar 24 15:31:27 2011 -0400
Remove the pending tags from builds that are removed during an edit.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index ea846e9..d6e98e9 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -715,6 +715,14 @@ class Root(controllers.RootController):
if build not in builds:
removed_builds.append(build)
+ # Remove the appropriate pending tags
+ if edited.request == 'stable':
+ koji.untagBuild(edited.release.pending_stable_tag,
+ build, force=True)
+ elif edited.request == 'testing':
+ koji.untagBuild(edited.release.pending_testing_tag,
+ build, force=True)
+
# Comment on the update with details of added/removed builds
if new_builds or removed_builds:
comment = '%s has edited this update. ' %
identity.current.user_name
commit 047fda401924db727406fad1638546722c4f6573
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Mar 24 15:30:36 2011 -0400
Get a broken unit test working
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index b95faba..7a4d868 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -921,7 +921,7 @@ class TestControllers(testutil.DBTest):
self.save_update(newparams, session)
newupdate = PackageUpdate.byTitle(newparams['builds'])
assert newupdate.status == 'pending'
- assert newupdate.notes == ''
+ assert newupdate.notes in ('', None), newupdate.notes
update =
PackageUpdate.byTitle(','.join(params['builds'].split()))
assert update.status == 'testing', update.status
Show replies by date