diff options
author | alaaosh <alaaosh@54714841-351b-0410-a198-e36a94b762f5> | 2009-12-15 00:21:15 (GMT) |
---|---|---|
committer | Sayamindu Dasgupta <sayamindu@gmail.com> | 2010-01-08 22:37:36 (GMT) |
commit | 2d971a2011ee7d8101f2c9d2d0f8c1373c84a67f (patch) | |
tree | ae094908b1986e127573af93b5669fc814e3e5ff | |
parent | 235bed69ee7b199973adc06bb062de496d4df901 (diff) |
don't display success messages if version control update fails
git-svn-id: https://translate.svn.sourceforge.net/svnroot/translate/src/branches/Pootle-2.0/Pootle@13508 54714841-351b-0410-a198-e36a94b762f5
-rw-r--r-- | Pootle-2.0.0/local_apps/pootle_app/models/translation_project.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Pootle-2.0.0/local_apps/pootle_app/models/translation_project.py b/Pootle-2.0.0/local_apps/pootle_app/models/translation_project.py index 9e83d2a..340718c 100644 --- a/Pootle-2.0.0/local_apps/pootle_app/models/translation_project.py +++ b/Pootle-2.0.0/local_apps/pootle_app/models/translation_project.py @@ -265,16 +265,15 @@ class TranslationProject(models.Model): try: oldstats, remotestats, newstats = self.update_file_from_version_control(store) + request.user.message_set.create(message=unicode(_("Updated file %s from version control", store.file.name))) + request.user.message_set.create(message=stats_message("working copy", oldstats)) + request.user.message_set.create(message=stats_message("remote copy", remotestats)) + request.user.message_set.create(message=stats_message("merged copy", newstats)) + post_vc_update.send(sender=self, oldstats=oldstats, remotestats=remotestats, newstats=newstats) except VersionControlError: request.user.message_set.create(message=unicode(_("Failed to update %s from version control", store.file.name))) - request.user.message_set.create(message=unicode(_("Updated file %s from version control", store.file.name))) - request.user.message_set.create(message=stats_message("working copy", oldstats)) - request.user.message_set.create(message=stats_message("remote copy", remotestats)) - request.user.message_set.create(message=stats_message("merged copy", newstats)) - project_tree.scan_translation_project_files(self) - post_vc_update.send(sender=self, oldstats=oldstats, remotestats=remotestats, newstats=newstats) def commitpofile(self, request, store): """commits an individual PO file to version control""" |