# HG changeset patch # User Sylvain Thénault # Date 1272038161 -7200 # Node ID b9e1abe1bdfe822eaa37093629f2df3575484a9f # Parent cdbf823450aa092eb5b25beade6cd68d89b16d9b [repo] cleanup diff -r cdbf823450aa -r b9e1abe1bdfe server/repository.py --- a/server/repository.py Fri Apr 23 17:55:46 2010 +0200 +++ b/server/repository.py Fri Apr 23 17:56:01 2010 +0200 @@ -875,6 +875,7 @@ if eid is not None: self._extid_cache[cachekey] = eid self._type_source_cache[eid] = (etype, source.uri, extid) + # XXX used with extlite (eg vcsfile), probably not needed anymore if recreate: entity = source.before_entity_insertion(session, extid, etype, eid) entity._cw_recreating = True @@ -903,10 +904,8 @@ self._extid_cache[cachekey] = eid self._type_source_cache[eid] = (etype, source.uri, extid) entity = source.before_entity_insertion(session, extid, etype, eid) - if not hasattr(entity, 'edited_attributes'): - entity.edited_attributes = set() + entity.edited_attributes = set(entity) if source.should_call_hooks: - entity.edited_attributes = set(entity) self.hm.call_hooks('before_add_entity', session, entity=entity) # XXX call add_info with complete=False ? self.add_info(session, entity, source, extid) diff -r cdbf823450aa -r b9e1abe1bdfe server/sources/storages.py --- a/server/sources/storages.py Fri Apr 23 17:55:46 2010 +0200 +++ b/server/sources/storages.py Fri Apr 23 17:56:01 2010 +0200 @@ -75,6 +75,7 @@ return path return None + class BytesFileSystemStorage(Storage): """store Bytes attribute value on the file system""" def __init__(self, defaultdir, fsencoding='utf-8'):