equal
deleted
inserted
replaced
1064 self._session_timestamp.touch() |
1064 self._session_timestamp.touch() |
1065 self.debug('commit transaction %s done (no db activity)', self.connectionid) |
1065 self.debug('commit transaction %s done (no db activity)', self.connectionid) |
1066 return |
1066 return |
1067 cstate = self.commit_state |
1067 cstate = self.commit_state |
1068 if cstate == 'uncommitable': |
1068 if cstate == 'uncommitable': |
1069 raise QueryError('transaction must be rollbacked') |
1069 raise QueryError('transaction must be rolled back') |
1070 if cstate is not None: |
1070 if cstate is not None: |
1071 return |
1071 return |
1072 # on rollback, an operation should have the following state |
1072 # on rollback, an operation should have the following state |
1073 # information: |
1073 # information: |
1074 # - processed by the precommit/commit event or not |
1074 # - processed by the precommit/commit event or not |
1743 super(InternalSession, self).__init__(InternalManager(), repo, cnxprops, |
1743 super(InternalSession, self).__init__(InternalManager(), repo, cnxprops, |
1744 _id='internal') |
1744 _id='internal') |
1745 self.user._cw = self # XXX remove when "vreg = user._cw.vreg" hack in entity.py is gone |
1745 self.user._cw = self # XXX remove when "vreg = user._cw.vreg" hack in entity.py is gone |
1746 if not safe: |
1746 if not safe: |
1747 self.disable_hook_categories('integrity') |
1747 self.disable_hook_categories('integrity') |
1748 self._tx.ctx_count += 1 |
1748 self._cnx.ctx_count += 1 |
1749 |
1749 |
1750 def __enter__(self): |
1750 def __enter__(self): |
1751 return self |
1751 return self |
1752 |
1752 |
1753 def __exit__(self, exctype, excvalue, tb): |
1753 def __exit__(self, exctype, excvalue, tb): |