Commits

seccanj  committed 7749e40

Release 1.3.10. Fixed Ticket #8154 (Track-Hacks): LookupError: unknown encoding: cp0

  • Participants
  • Parent commits 5913873

Comments (0)

Files changed (7)

 
 (Refer to the tickets on trac-hacks or SourceForge for complete descriptions.)
 
-Release 1.3.8 (2010-11-23):
+Release 1.3.10 (2010-11-28):
+  o Fixed Ticket #8154 (Track-Hacks): LookupError: unknown encoding: cp0
+
+Release 1.3.9 (2010-11-23):
+  o Fixed Ticket #8144 (Track-Hacks): Test statistical charts don't show successful and failed figures.
+
+Release 1.3.8 (2010-11-22):
   o Fixed Ticket #8121 (Track-Hacks): Catalog Wiki Page not added
   o Fixed Ticket #8123 (Track-Hacks): Can't move testcase more than one time into different catalog
   o Fixed Ticket #8124 (Track-Hacks): AttributeError: 'NoneType' object has no attribute 'splitlines'

File sqlexecutor/trunk/setup.py

 
 setup(
     name='SQLExecutor',
-    version='1.0.2',
+    version='1.0.3',
     packages=['sqlexecutor'],
     package_data={'sqlexecutor' : ['*.txt', 'templates/*.html', 'htdocs/*.*', 'htdocs/js/*.js', 'htdocs/css/*.css', 'htdocs/images/*.*']},
     author = 'Roberto Longobardi',

File sqlexecutor/trunk/sqlexecutor/sql.py

         sql = req.args.get('sql')
         self.env.log.debug(sql)
 
+        strdata = """
+            <html>
+              <body>
+                <p>Result:</p>
+                <br />
+                <div id="response">
+                    <table><tbody>
+            """
+    
         try:
             db = self.env.get_db_cnx()
             cursor = db.cursor()
             cursor.execute(sql)
             
-            result = ''
             for row in cursor:
+                strdata += '<tr>'
                 for i in row:
+                    strdata += '<td>'
                     if isinstance(i, basestring):
-                        result += i + u', '
+                        strdata += i.encode('utf-8')
+                    elif isinstance(i, long):
+                        strdata += from_any_timestamp(i).isoformat() + ' (' + str(i) + ')'
                     else:
-                        result += str(i) + u', '
-                result += CRLF
+                        strdata += str(i).encode('utf-8')
+                    strdata += '<td>'
+
+                strdata += '<tr>'
 
             db.commit()
             
-            self.env.log.debug(result)
+            self.env.log.debug(strdata)
         except:
-            result = formatExceptionInfo()
+            strdata = formatExceptionInfo()
             db.rollback()
             self.env.log.debug("SqlExecutor - Exception: ")
-            self.env.log.debug(result)
+            self.env.log.debug(strdata)
+
+        strdata += """
+                    </tbody></table>
+                </div>
+              </body>
+            </html>
+            """
         
-        return 'result.html', {'result': result}, None
+        req.send_header("Content-Length", len(strdata))
+        req.write(strdata)
+        
+        #return 'result.html', {'result': result}, None
+        return
 
 
     # ITemplateProvider methods

File testman4trac/trunk/setup.py

 
 setup(
     name='TestManager',
-    version='1.3.8',
+    version='1.3.10',
     packages=['testmanager'],
     package_data={'testmanager' : ['*.txt', 'templates/*.html', 'htdocs/js/*.js', 'htdocs/css/*.css', 'htdocs/images/*.*']},
     author = 'Roberto Longobardi',

File testman4trac/trunk/testmanager/README.txt

 
 (Refer to the tickets on trac-hacks or SourceForge for complete descriptions.)
 
-Release 1.3.8 (2010-11-23):
+Release 1.3.10 (2010-11-28):
+  o Fixed Ticket #8154 (Track-Hacks): LookupError: unknown encoding: cp0
+
+Release 1.3.9 (2010-11-23):
+  o Fixed Ticket #8144 (Track-Hacks): Test statistical charts don't show successful and failed figures.
+
+Release 1.3.8 (2010-11-22):
   o Fixed Ticket #8121 (Track-Hacks): Catalog Wiki Page not added
   o Fixed Ticket #8123 (Track-Hacks): Can't move testcase more than one time into different catalog
   o Fixed Ticket #8124 (Track-Hacks): AttributeError: 'NoneType' object has no attribute 'splitlines'

File testman4trac/trunk/testmanager/macros.py

     text += _render_breadcrumb(breadcrumb, planid, mode, fulldetails)
     text +='</div>'
 
-    print text
-
     return text    
             
 
                 text += _get_custom_fields_columns(tcip, custom_ctx['testcaseinplan'][1])
 
         if fulldetails:
-            print(tc.description)
             wikidom = WikiParser(env).parse(tc.description)
             out = StringIO()
             f = Formatter(env, context)

File testman4trac/trunk/testmanager/stats.py

 
 from datetime import date, datetime, time, timedelta
 from time import strptime
-from trac.util.datefmt import utc, to_timestamp
+from trac.util.datefmt import utc
 
 from tracgenericclass.util import *
 
         db = self.env.get_db_cnx()
         cursor = db.cursor()
 
-        cursor.execute("SELECT COUNT(*) from testcasehistory WHERE status = '%s' AND time > %s AND time <= %s %s" % (status, to_timestamp(from_date), to_timestamp(at_date), testplan_filter))
+        #self.log.debug("From %s to %s, status=%s, plan=%s" % (from_date.isoformat(), at_date.isoformat(), status, testplan))
+        #self.log.debug("SELECT COUNT(*) from testcasehistory WHERE status = '%s' AND time > %s AND time <= %s %s" % (status, to_any_timestamp(from_date), to_any_timestamp(at_date), testplan_filter))
+        cursor.execute("SELECT COUNT(*) from testcasehistory WHERE status = '%s' AND time > %s AND time <= %s %s" % (status, to_any_timestamp(from_date), to_any_timestamp(at_date), testplan_filter))
 
         row = cursor.fetchone()