Author: russellm
Date: 2010-10-28 07:16:04 -0500 (Thu, 28 Oct 2010)
New Revision: 14384

Modified:
   django/branches/releases/1.2.X/django/core/management/base.py
Log:
[1.2.X] Fixed the ugly spacing of 'BEGIN;' and 'COMMIT;' in the output of the 
sql/sqlall commands. They're no longer smooshed with the rest of the SQL.

Backport of r13993 from trunk.

Modified: django/branches/releases/1.2.X/django/core/management/base.py
===================================================================
--- django/branches/releases/1.2.X/django/core/management/base.py       
2010-10-28 12:15:46 UTC (rev 14383)
+++ django/branches/releases/1.2.X/django/core/management/base.py       
2010-10-28 12:16:04 UTC (rev 14384)
@@ -225,10 +225,10 @@
                     from django.db import connections, DEFAULT_DB_ALIAS
                     connection = connections[options.get('database', 
DEFAULT_DB_ALIAS)]
                     if connection.ops.start_transaction_sql():
-                        
self.stdout.write(self.style.SQL_KEYWORD(connection.ops.start_transaction_sql()))
+                        
self.stdout.write(self.style.SQL_KEYWORD(connection.ops.start_transaction_sql())
 + '\n')
                 self.stdout.write(output)
                 if self.output_transaction:
-                    self.stdout.write(self.style.SQL_KEYWORD("COMMIT;") + '\n')
+                    self.stdout.write('\n' + self.style.SQL_KEYWORD("COMMIT;") 
+ '\n')
         except CommandError, e:
             self.stderr.write(smart_str(self.style.ERROR('Error: %s\n' % e)))
             sys.exit(1)

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to