incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1432088 - /incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/env.py
Date Fri, 11 Jan 2013 15:17:56 GMT
Author: jure
Date: Fri Jan 11 15:17:56 2013
New Revision: 1432088

URL: http://svn.apache.org/viewvc?rev=1432088&view=rev
Log:
#115 and #288 integration, make product cursors actually work


Modified:
    incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/env.py

Modified: incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/env.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/env.py?rev=1432088&r1=1432087&r2=1432088&view=diff
==============================================================================
--- incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/env.py
(original)
+++ incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/env.py
Fri Jan 11 15:17:56 2013
@@ -23,7 +23,7 @@ from urlparse import urlsplit
 
 from trac.config import ConfigSection, Option
 from trac.core import Component, ComponentManager, implements
-from trac.db.api import with_transaction
+from trac.db.api import with_transaction, TransactionContextManager, QueryContextManager
 from trac.util import get_pkginfo, lazy
 from trac.util.compat import sha1
 from trac.versioncontrol import RepositoryManager
@@ -328,7 +328,7 @@ class ProductEnvironment(Component, Comp
           `db_transaction`).
         """
         BloodhoundIterableCursor.set_env(self)
-        return self.env.db_query
+        return QueryContextManager(self.env)
 
     @property
     def db_transaction(self):
@@ -364,7 +364,7 @@ class ProductEnvironment(Component, Comp
           (`db_query` or `db_transaction`).
         """
         BloodhoundIterableCursor.set_env(self)
-        return self.env.db_transaction
+        return TransactionContextManager(self.env)
 
     def shutdown(self, tid=None):
         """Close the environment."""



Mime
View raw message