Permalink
Browse files

depickling of older sourcestamps including sourcestampsetid and codebase

  • Loading branch information...
1 parent 677b654 commit 0cf668ea02789d2567438da67fdfbd7ec8ae19e5 @hborkhuis committed Feb 27, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 master/buildbot/sourcestamp.py
@@ -59,7 +59,7 @@ class SourceStamp(util.ComparableMixin, styles.Versioned):
@ivar repository: repository URL
"""
- persistenceVersion = 2
+ persistenceVersion = 3
persistenceForgets = ( 'wasUpgraded', )
# all seven of these are publicly visible attributes
@@ -275,8 +275,13 @@ def upgradeToVersion2(self):
self.wasUpgraded = True
def upgradeToVersion3(self):
+ #In version 2 sourcestamps where not part of a set
+ #The database has been upgraded where all existing sourcestamps got an
+ #setid equal to its ssid
+ self.sourcestampsetid = self.ssid
#version 2 did not have codebase; set to ''
self.codebase = ''
+ self.wasUpgraded = True
@util.deferredLocked('_getSourceStampSetId_lock')
def getSourceStampSetId(self, master):

0 comments on commit 0cf668e

Please sign in to comment.