##// END OF EJS Templates
fixes for issue #731, update-repoinfo sometimes failed to update data when changesets...
marcink -
r3227:99ce5d09 beta
parent child Browse files
Show More
@@ -1003,7 +1003,9 b' class Repository(Base, BaseModel):'
1003 if isinstance(cs_cache, BaseChangeset):
1003 if isinstance(cs_cache, BaseChangeset):
1004 cs_cache = cs_cache.__json__()
1004 cs_cache = cs_cache.__json__()
1005
1005
1006 if cs_cache != self.changeset_cache:
1006 if (cs_cache != self.changeset_cache
1007 or not self.last_change
1008 or not self.changeset_cache):
1007 _default = datetime.datetime.fromtimestamp(0)
1009 _default = datetime.datetime.fromtimestamp(0)
1008 last_change = cs_cache.get('date') or self.last_change or _default
1010 last_change = cs_cache.get('date') or self.last_change or _default
1009 log.debug('updated repo %s with new cs cache %s' % (self, cs_cache))
1011 log.debug('updated repo %s with new cs cache %s' % (self, cs_cache))
@@ -1011,6 +1013,8 b' class Repository(Base, BaseModel):'
1011 self.changeset_cache = cs_cache
1013 self.changeset_cache = cs_cache
1012 Session().add(self)
1014 Session().add(self)
1013 Session().commit()
1015 Session().commit()
1016 else:
1017 log.debug('Skipping repo:%s already with latest changes' % self)
1014
1018
1015 @property
1019 @property
1016 def tip(self):
1020 def tip(self):
General Comments 0
You need to be logged in to leave comments. Login now