- Revision
- 11136
- Author
- vajda
- Date
- 2006-07-12 06:15:32 -0700 (Wed, 12 Jul 2006)
Log Message
- added support for logging UUIDs while they are generated, to replay later
- upgraded build to chandlerdb 0.6-30
- upgraded build to chandlerdb 0.6-30
Modified Paths
Diff
Modified: trunk/chandler/Makefile (11135 => 11136)
--- trunk/chandler/Makefile 2006-07-12 13:06:28 UTC (rev 11135) +++ trunk/chandler/Makefile 2006-07-12 13:15:32 UTC (rev 11136) @@ -66,7 +66,7 @@ # these get installed into release or debug ARCHIVES=$(CHANDLERARCHIVES)/Launchers-$(SNAP)-0.8-$(BP)8.tar.gz \ - $(CHANDLERARCHIVES)/chandlerdb-$(SNAP)-0.6-$(BP)29.tar.gz \ + $(CHANDLERARCHIVES)/chandlerdb-$(SNAP)-0.6-$(BP)30.tar.gz \ $(CHANDLERARCHIVES)/db-$(SNAP)-4.4.20-$(BP)5.tar.gz \ $(CHANDLERARCHIVES)/python-$(SNAP)-2.4.3-$(BP)3.tar.gz \ $(CHANDLERARCHIVES)/epydoc-$(SNAP)-2.1-$(BP)9.tar.gz \
Modified: trunk/chandler/application/Utility.py (11135 => 11136)
--- trunk/chandler/application/Utility.py 2006-07-12 13:06:28 UTC (rev 11135) +++ trunk/chandler/application/Utility.py 2006-07-12 13:15:32 UTC (rev 11136) @@ -21,7 +21,7 @@ import M2Crypto.Rand as Rand, M2Crypto.threading as m2threading from optparse import OptionParser -from chandlerdb.util.c import UUID, useUUIDs +from chandlerdb.util.c import UUID, loadUUIDs from repository.persistence.DBRepository import DBRepository from repository.persistence.RepositoryView import NullRepositoryView from repository.persistence.RepositoryError import \ @@ -367,7 +367,7 @@ if options.uuids: input = file(options.uuids) - useUUIDs([UUID(uuid.strip()) for uuid in input if len(uuid) > 1]) + loadUUIDs([UUID(uuid.strip()) for uuid in input if len(uuid) > 1]) input.close() repository = DBRepository(directory)
Modified: trunk/chandler/repository/tests/TestMerge.py (11135 => 11136)
--- trunk/chandler/repository/tests/TestMerge.py 2006-07-12 13:06:28 UTC (rev 11135) +++ trunk/chandler/repository/tests/TestMerge.py 2006-07-12 13:15:32 UTC (rev 11136) @@ -945,39 +945,58 @@ def testMergeSubIndex(self): - main = self.rep.view - cineguidePack = os.path.join(self.testdir, 'data', 'packs', - 'cineguide.pack') - main.loadPack(cineguidePack) - k = main.findPath('//CineGuide/KHepburn') - k.movies.addIndex('t', 'value', attribute='title', ranges=[(0, 1)]) - m1 = k.movies.first() - m1.director.directed.addIndex('T', 'subindex', - superindex=(k, 'movies', 't')) - main.commit() + from chandlerdb.util.c import saveUUIDs - view = self.rep.createView('view') - main = self.rep.setCurrentView(view) + uuids = [] + saveUUIDs(uuids) + + try: + main = self.rep.view + cineguidePack = os.path.join(self.testdir, 'data', 'packs', + 'cineguide.pack') + main.loadPack(cineguidePack) + k = main.findPath('//CineGuide/KHepburn') + k.movies.addIndex('t', 'value', attribute='title', ranges=[(0, 1)]) + m1 = k.movies.first() + m1.director.directed.addIndex('T', 'subindex', + superindex=(k, 'movies', 't')) + main.commit() - k = view.findPath('//CineGuide/KHepburn') - c = k.itsParent - m1 = k.movies.first() - m1.title = 'Foo' - view.commit() + view = self.rep.createView('view') + main = self.rep.setCurrentView(view) + + k = view.findPath('//CineGuide/KHepburn') + c = k.itsParent + m1 = k.movies.first() + m1.title = 'Foo' + view.commit() - view = self.rep.setCurrentView(main) - k = main.findPath('//CineGuide/KHepburn') - c = k.itsParent - m1 = k.movies.first() - m2 = k.movies.next(m1) - m3 = k.movies.next(m2) - m2.director = m1.director - m3.delete() + view = self.rep.setCurrentView(main) + k = main.findPath('//CineGuide/KHepburn') + c = k.itsParent + m1 = k.movies.first() + m2 = k.movies.next(m1) + m3 = k.movies.next(m2) + m2.director = m1.director + m3.delete() - main.commit() - self.assert_(main.check(), 'main view did not check out') + main.commit() + finally: + saveUUIDs(None) + if not main.check(): + from random import randint + name = "uuids_%0.4x.txt" %(randint(0, 65535)) + outFile = file(name, 'w') + print "Saving uuids to ", name + for uuid in uuids: + print >>outFile, uuid.str64() + outFile.close() + + self.assert_(False, 'main view did not check out') + + if __name__ == "__main__": # import hotshot # profiler = hotshot.Profile('/tmp/TestItems.hotshot')
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
