# HG changeset patch # User Sylvain Thénault # Date 1396608395 -7200 # Node ID 5ef5494b6b0be680ada1b28a3719619595ec3ff5 # Parent f512d72a1dc4e9d4b3b321a2da77fd991df2e3e9 [repository] complete argument is no more needed since we have no more 'true' multisource. It is always false. diff -r f512d72a1dc4 -r 5ef5494b6b0b server/repository.py --- a/server/repository.py Fri Apr 04 12:39:59 2014 +0200 +++ b/server/repository.py Fri Apr 04 12:46:35 2014 +0200 @@ -1021,7 +1021,7 @@ return tuple(cachekey) def extid2eid(self, source, extid, etype, session, insert=True, - complete=True, commit=True, sourceparams=None): + commit=True, sourceparams=None): """Return eid from a local id. If the eid is a negative integer, that means the entity is known but has been copied back to the system source hence should be ignored. @@ -1076,7 +1076,7 @@ # see below pending_operations = session.pending_operations[:] self.hm.call_hooks('before_add_entity', session, entity=entity) - self.add_info(session, entity, source, extid, complete=complete) + self.add_info(session, entity, source, extid) source.after_entity_insertion(session, extid, entity, sourceparams) if source.should_call_hooks: self.hm.call_hooks('after_add_entity', session, entity=entity) @@ -1098,13 +1098,13 @@ session._cnx.pending_operations = pending_operations raise - def add_info(self, session, entity, source, extid=None, complete=True): + def add_info(self, session, entity, source, extid=None): """add type and source info for an eid into the system table, and index the entity with the full text index """ # begin by inserting eid/type/source/extid into the entities table hook.CleanupNewEidsCacheOp.get_instance(session).add_data(entity.eid) - self.system_source.add_info(session, entity, source, extid, complete) + self.system_source.add_info(session, entity, source, extid) def delete_info(self, session, entity, sourceuri): """called by external source when some entity known by the system source @@ -1222,7 +1222,7 @@ userhdlr = cnx.vreg['adapters'].select( 'IUserFriendlyError', cnx, entity=entity, exc=exc) userhdlr.raise_user_exception() - self.add_info(cnx, entity, source, extid, complete=False) + self.add_info(cnx, entity, source, extid) edited.saved = entity._cw_is_saved = True # trigger after_add_entity after after_add_relation self.hm.call_hooks('after_add_entity', cnx, entity=entity) diff -r f512d72a1dc4 -r 5ef5494b6b0b server/sources/datafeed.py --- a/server/sources/datafeed.py Fri Apr 04 12:39:59 2014 +0200 +++ b/server/sources/datafeed.py Fri Apr 04 12:46:35 2014 +0200 @@ -322,7 +322,7 @@ uri = uri.encode('utf-8') try: eid = session.repo.extid2eid(source, str(uri), etype, session, - complete=False, commit=False, + commit=False, sourceparams=sourceparams) except ValidationError as ex: # XXX use critical so they are seen during tests. Should consider diff -r f512d72a1dc4 -r 5ef5494b6b0b server/sources/native.py --- a/server/sources/native.py Fri Apr 04 12:39:59 2014 +0200 +++ b/server/sources/native.py Fri Apr 04 12:46:35 2014 +0200 @@ -886,7 +886,7 @@ _handle_insert_entity_sql = doexec _handle_is_instance_of_sql = _handle_source_relation_sql = _handle_is_relation_sql - def add_info(self, cnx, entity, source, extid, complete): + def add_info(self, cnx, entity, source, extid): """add type and source info for an eid into the system table""" with cnx.ensure_cnx_set: # begin by inserting eid/type/source/extid into the entities table @@ -913,8 +913,6 @@ (entity.eid, source.eid)) # now we can update the full text index if self.do_fti and self.need_fti_indexation(entity.cw_etype): - if complete: - entity.complete(entity.e_schema.indexable_attributes()) self.index_entity(cnx, entity=entity) def update_info(self, cnx, entity, need_fti_update): @@ -1181,7 +1179,7 @@ sql = self.sqlgen.insert(SQL_PREFIX + etype, action.changes) self.doexec(cnx, sql, action.changes) # restore record in entities (will update fti if needed) - self.add_info(cnx, entity, self, None, True) + self.add_info(cnx, entity, self, None) self.repo.hm.call_hooks('after_add_entity', cnx, entity=entity) return errors