damned-lies r1415 - in trunk: . vertimus vertimus/tests



Author: claudep
Date: Fri Jan 30 22:30:50 2009
New Revision: 1415
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1415&view=rev

Log:
2009-01-30  Claude Paroz  <claude 2xlibre net>

	* vertimus/tests/__init__.py:
	* vertimus/views.py: Revert unwanted changes in previous commit.

Modified:
   trunk/ChangeLog
   trunk/vertimus/tests/__init__.py
   trunk/vertimus/views.py

Modified: trunk/vertimus/tests/__init__.py
==============================================================================
--- trunk/vertimus/tests/__init__.py	(original)
+++ trunk/vertimus/tests/__init__.py	Fri Jan 30 22:30:50 2009
@@ -394,16 +394,6 @@
         self.assertEqual(state.name, 'None')
         
         action = ActionAbstract.new_by_name('RT')
-        state = state.apply_action(action, self.pt, "Reserved!")
-        state.save()
-
-        action = ActionAbstract.new_by_name('UNDO')
-        state = state.apply_action(action, self.pt, "Ooops! I don't want to do that. Sorry.")
-        state.save()
-
-        self.assertEqual(state.name, 'None')
-
-        action = ActionAbstract.new_by_name('RT')
         state = state.apply_action(action, self.pt, "Translating")
         state.save()
         

Modified: trunk/vertimus/views.py
==============================================================================
--- trunk/vertimus/views.py	(original)
+++ trunk/vertimus/views.py	Fri Jan 30 22:30:50 2009
@@ -28,7 +28,7 @@
 
 from people.models import Person
 from stats.models import Statistics, Module, Branch, Domain, Language
-from vertimus.models import StateDb, ActionDb, ActionAbstract, ActionBA, StateToCommit, StateCommitted
+from vertimus.models import StateDb, ActionDb, ActionAbstract
 from vertimus.forms import ActionForm
 
 def vertimus_by_stats_id(request, stats_id, lang_id):
@@ -87,15 +87,6 @@
                 action = ActionAbstract.new_by_name(action)
                 new_state = state.apply_action(action, person, comment, request.FILES.get('file', None))
                 new_state.save()
-                if isinstance(new_state, StateToCommit):
-                    try:
-                        action_with_po = action._action_db.get_previous_action_with_po()
-                        branch.commit_po(action_with_po.file.path, domain, language)
-                        action = ActionIC()
-                        new_state = new_state.apply_action(action, person)
-                        new_state.save()
-                    except:
-                        pass # The file cannot be autocommitted
 
                 return HttpResponseRedirect(
                     urlresolvers.reverse('vertimus-names-view', 
@@ -155,7 +146,7 @@
     content2 = [l.decode('utf-8') for l in open(file_path2, 'U').readlines()]
     d = difflib.HtmlDiff()
     diff_content = d.make_table(content2, content1,
-                                descr2, descr1, context=False)
+                                descr2, descr1, context=True)
 
     context = {
         'diff_content': diff_content,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]