[damned-lies] Add undo action when the state is Ready for submission
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Add undo action when the state is Ready for submission
- Date: Mon, 24 Mar 2014 16:01:57 +0000 (UTC)
commit 713d7ce51609f248fcedab6d1cf019403ea5351c
Author: Claude Paroz <claude 2xlibre net>
Date: Mon Mar 24 17:00:05 2014 +0100
Add undo action when the state is Ready for submission
Fixes bug #726933. Thanks Rafael Ferreira for the report.
vertimus/models.py | 2 +-
vertimus/tests/tests.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vertimus/models.py b/vertimus/models.py
index a6b6def..415cf1a 100644
--- a/vertimus/models.py
+++ b/vertimus/models.py
@@ -251,7 +251,7 @@ class StateToCommit(State):
def get_available_actions(self, person):
if person.is_committer(self.language.team):
- action_names = ['RC', 'TR']
+ action_names = ['RC', 'TR', 'UNDO']
if not self.branch.is_vcs_readonly() and self.get_latest_po_file_action() is not None:
action_names.insert(1, 'CI')
else:
diff --git a/vertimus/tests/tests.py b/vertimus/tests/tests.py
index a6d0b3f..0438ac9 100644
--- a/vertimus/tests/tests.py
+++ b/vertimus/tests/tests.py
@@ -166,7 +166,7 @@ class VertimusTest(TeamsAndRolesTests):
for p in (self.pc, self.pcoo):
action_names = [a.name for a in state.get_available_actions(p)]
- self.assertEqual(action_names, ['RC', 'TR', 'WC', None, 'IC', 'AA'])
+ self.assertEqual(action_names, ['RC', 'TR', 'UNDO', 'WC', None, 'IC', 'AA'])
def test_state_committing(self):
state = StateCommitting(branch=self.b, domain=self.d, language=self.l, person=self.pc)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]