Commit f054197e authored by Rémi Cardona's avatar Rémi Cardona
Browse files

spelling: rollbacked -> rolled back

--HG--
branch : stable
parent e54171abd3ed
......@@ -52,7 +52,7 @@ class _RenderAndSendNotificationOp(hook.DataOperationMixIn, hook.Operation):
All others Operations end up adding data to this Operation.
The notification are done on ``postcommit_event`` to make sure to prevent
sending notification about rollbacked data.
sending notification about rolled back data.
"""
containercls = list
......
......@@ -95,5 +95,5 @@ if raw_input('Commit ?') in 'yY':
commit()
else:
rollback()
print 'rollbacked'
print 'rolled back'
......@@ -41,7 +41,7 @@ as server startup or shutdown). In a typical application, most of the hooks are
defined over data events.
Also, some :class:`~cubicweb.server.hook.Operation` may be registered by hooks,
which will be fired when the transaction is commited or rollbacked.
which will be fired when the transaction is commited or rolled back.
The purpose of data event hooks is usually to complement the data model as
defined in the schema, which is static by nature and only provide a restricted
......@@ -715,10 +715,10 @@ class Operation(object):
* `rollback`:
the transaction has been either rollbacked either:
the transaction has been either rolled back either:
* intentionaly
* a 'precommit' event failed, in which case all operations are rollbacked
* a 'precommit' event failed, in which case all operations are rolled back
once 'revertprecommit'' has been called
* `postcommit`:
......@@ -780,7 +780,7 @@ class Operation(object):
"""
def rollback_event(self):
"""the observed connections set has been rollbacked
"""the observed connections set has been rolled back
do nothing by default
"""
......@@ -1044,7 +1044,7 @@ class CleanupNewEidsCacheOp(DataOperationMixIn, SingleLastOperation):
type/source cache eids of entities added in that transaction.
NOTE: querier's rqlst/solutions cache may have been polluted too with
queries such as Any X WHERE X eid 32 if 32 has been rollbacked however
queries such as Any X WHERE X eid 32 if 32 has been rolled back however
generated queries are unpredictable and analysing all the cache probably
too expensive. Notice that there is no pb when using args to specify eids
instead of giving them into the rql string.
......@@ -1052,7 +1052,7 @@ class CleanupNewEidsCacheOp(DataOperationMixIn, SingleLastOperation):
data_key = 'neweids'
def rollback_event(self):
"""the observed connections set has been rollbacked,
"""the observed connections set has been rolled back,
remove inserted eid from repository type/source cache
"""
try:
......@@ -1066,7 +1066,7 @@ class CleanupDeletedEidsCacheOp(DataOperationMixIn, SingleLastOperation):
"""
data_key = 'pendingeids'
def postcommit_event(self):
"""the observed connections set has been rollbacked,
"""the observed connections set has been rolled back,
remove inserted eid from repository type/source cache
"""
try:
......
......@@ -632,7 +632,7 @@ class QuerierHelper(object):
results = plan.execute()
except (Unauthorized, ValidationError):
# getting an Unauthorized/ValidationError exception means the
# transaction must been rollbacked
# transaction must be rolled back
#
# notes:
# * we should not reset the connections set here, since we don't want the
......
......@@ -407,7 +407,7 @@ class Repository(object):
return self._cnxsets_pool.get(True, timeout=5)
except Queue.Empty:
raise Exception('no connections set available after 5 secs, probably either a '
'bug in code (too many uncommited/rollbacked '
'bug in code (too many uncommited/rolled back '
'connections) or too much load on the server (in '
'which case you can try to set a bigger '
'connections pool size)')
......@@ -868,7 +868,7 @@ class Repository(object):
"""close the session with the given id"""
session = self._get_session(sessionid, setcnxset=True, txid=txid,
checkshuttingdown=checkshuttingdown)
# operation uncommited before close are rollbacked before hook is called
# operation uncommited before close are rolled back before hook is called
session.rollback(free_cnxset=False)
self.hm.call_hooks('session_close', session)
# commit session at this point in case write operation has been done
......
......@@ -67,7 +67,7 @@ def repairing(cls, req, **kwargs):
class transaction(object):
"""Ensure that the transaction is either commited or rollbacked at exit
"""Ensure that the transaction is either commited or rolled back at exit
Context manager to enter a transaction for a session: when exiting the
`with` block on exception, call `session.rollback()`, else call
......@@ -369,7 +369,7 @@ class Transaction(object):
of None (not yet committing), 'precommit' (calling precommit event on
operations), 'postcommit' (calling postcommit event on operations),
'uncommitable' (some :exc:`ValidationError` or :exc:`Unauthorized` error
has been raised during the transaction and so it must be rollbacked).
has been raised during the transaction and so it must be rolled back).
Hooks controls:
......@@ -786,7 +786,7 @@ class Session(RequestSessionBase):
of None (not yet committing), 'precommit' (calling precommit event on
operations), 'postcommit' (calling postcommit event on operations),
'uncommitable' (some :exc:`ValidationError` or :exc:`Unauthorized` error
has been raised during the transaction and so it must be rollbacked).
has been raised during the transaction and so it must be rolled back).
.. automethod:: cubicweb.server.session.Session.commit
.. automethod:: cubicweb.server.session.Session.rollback
......@@ -1233,7 +1233,7 @@ class Session(RequestSessionBase):
return
cstate = self.commit_state
if cstate == 'uncommitable':
raise QueryError('transaction must be rollbacked')
raise QueryError('transaction must be rolled back')
if cstate is not None:
return
# on rollback, an operation should have the following state
......
......@@ -295,7 +295,7 @@ repository.',
query, args, ex.args[0])
try:
session.cnxset.connection(self.uri).rollback()
self.critical('transaction has been rollbacked')
self.critical('transaction has been rolled back')
except Exception:
pass
raise
......
......@@ -751,7 +751,7 @@ class NativeSQLSource(SQLAdapterMixIn, AbstractSource):
try:
session.cnxset.connection(self.uri).rollback()
if self.repo.config.mode != 'test':
self.critical('transaction has been rollbacked')
self.critical('transaction has been rolled back')
except Exception as ex:
pass
if ex.__class__.__name__ == 'IntegrityError':
......@@ -795,7 +795,7 @@ class NativeSQLSource(SQLAdapterMixIn, AbstractSource):
try:
session.cnxset.connection(self.uri).rollback()
if self.repo.config.mode != 'test':
self.critical('transaction has been rollbacked')
self.critical('transaction has been rolled back')
except Exception:
pass
raise
......
......@@ -378,7 +378,7 @@ sqlite_hooks.append(init_sqlite_connexion)
def init_postgres_connexion(cnx):
cnx.cursor().execute('SET TIME ZONE UTC')
# commit is needed, else setting are lost if the connection is first
# rollbacked
# rolled back
cnx.commit()
postgres_hooks = SQL_CONNECT_HOOKS.setdefault('postgres', [])
......
......@@ -137,7 +137,7 @@ class RepositoryTC(CubicWebTC):
self.assertTrue(self.execute('Any X WHERE X is CWGroup, X name "toto"'))
with self.assertRaises(QueryError) as cm:
self.commit()
self.assertEqual(str(cm.exception), 'transaction must be rollbacked')
self.assertEqual(str(cm.exception), 'transaction must be rolled back')
self.rollback()
self.assertFalse(self.execute('Any X WHERE X is CWGroup, X name "toto"'))
......@@ -154,7 +154,7 @@ class RepositoryTC(CubicWebTC):
self.assertTrue(self.execute('Any X WHERE X is CWGroup, X name "toto"'))
with self.assertRaises(QueryError) as cm:
self.commit()
self.assertEqual(str(cm.exception), 'transaction must be rollbacked')
self.assertEqual(str(cm.exception), 'transaction must be rolled back')
self.rollback()
self.assertFalse(self.execute('Any X WHERE X is CWGroup, X name "toto"'))
......
......@@ -237,7 +237,7 @@ class StorageTC(CubicWebTC):
self.assertEqual(osp.splitext(new_path)[1], '.jpg')
@tag('update', 'extension', 'rollback')
def test_bfss_update_with_different_extension_rollbacked(self):
def test_bfss_update_with_different_extension_rolled_back(self):
# use self.session to use server-side cache
f1 = self.session.create_entity('File', data=Binary('some data'),
data_format=u'text/plain', data_name=u'foo.txt')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment