hooks/syncsources.py
changeset 9448 3e7cad3967c5
parent 8557 8756f932ca83
child 9619 a4e97a31cc11
--- a/hooks/syncsources.py	Thu Jun 27 08:30:46 2013 +0200
+++ b/hooks/syncsources.py	Tue Jan 21 18:11:30 2014 +0100
@@ -93,10 +93,7 @@
 
     def precommit_event(self):
         source = self.session.repo.sources_by_uri[self.oldname]
-        if source.copy_based_source:
-            sql = 'UPDATE entities SET asource=%(newname)s WHERE asource=%(oldname)s'
-        else:
-            sql = 'UPDATE entities SET source=%(newname)s, asource=%(newname)s WHERE source=%(oldname)s'
+        sql = 'UPDATE entities SET asource=%(newname)s WHERE asource=%(oldname)s'
         self.session.system_sql(sql, {'oldname': self.oldname,
                                       'newname': self.newname})
 
@@ -109,11 +106,6 @@
         repo.sources_by_uri[self.newname] = source
         repo._type_source_cache.clear()
         clear_cache(repo, 'source_defs')
-        if not source.copy_based_source:
-            repo._extid_cache.clear()
-            repo._clear_planning_caches()
-            for cnxset in repo.cnxsets:
-                cnxset.source_cnxs[self.oldname] = cnxset.source_cnxs.pop(self.oldname)
 
 
 class SourceUpdatedHook(SourceHook):