Changeset 3179
- Timestamp:
- 02/05/08 10:05:21 (1 month ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
timingandestimationplugin/branches/trac0.11/setup.py
r3119 r3179 8 8 description='Plugin to make Trac support time estimation and tracking', 9 9 keywords='trac plugin estimation timetracking', 10 version='0.6. 0',10 version='0.6.1', 11 11 url='http://www.trac-hacks.org/wiki/TimingAndEstimationPlugin', 12 12 license='http://www.opensource.org/licenses/mit-license.php', timingandestimationplugin/branches/trac0.11/timingandestimationplugin/api.py
r3119 r3179 138 138 for report in report_group['reports']: 139 139 db_reports.add((report['uuid'], report['version'])) 140 return len(db_reports.symmetric_difference(py_reports)) > 0 140 #diff = db_reports.symmetric_difference(py_reports) 141 142 # the things in the python reports that are not in the database 143 diff = py_reports.difference(db_reports) 144 for py in diff.copy(): 145 for db in db_reports: 146 #if we have the same report and the db has a higher version 147 # remove it from the difference 148 if db[0] == py[0] && db[1] >= py[1] : 149 diff.remove(py); 150 if len(diff) > 0: 151 self.log.debug ("T&E needs upgrades for the following reports: %s" % diff ) 152 return len(diff) > 0 141 153 142 154 def do_reports_upgrade(self, force=False): timingandestimationplugin/branches/trac0.11/timingandestimationplugin/reportmanager.py
r2823 r3179 102 102 # First check to see if we can load an existing version of this report 103 103 (id, currentversion) = self.get_report_id_and_version(uuid) 104 self.log.error("add_report %s (ver:%s) | id: %s currentversion: %s" % (uuid , version, id, currentversion)) 104 105 try: 105 106 if not id: … … 116 117 self.log.error("CustomReportManager.add_report Exception: %s, %s" % (e,(title, author, uuid, version, 117 118 maingroup, subgroup, force))); 119 self.log.debug("report %s not upgraded (a better version already exists)" % uuid) 118 120 return False 119 121