Home | History | Annotate | Download | only in contrib

Lines Matching defs:update

59 class Update(object):
60 """Class encapsulating fields of an update to a bug.
82 """Update manager that allows you to revert status updates.
84 This class keeps track of the last update applied and is capable
89 """Initialize update manager.
91 @param autocommit: If False just print out the update instead
104 for issue_id, update in self.history.iteritems():
105 logging.warning('You will have to manually update %s and %s on %s',
108 # Create a new update with just the status.
109 self.update(issue_id, Update(status=update.status))
112 def update(self, old_issue, update):
115 @param old_issue: The issue to update. If an id is specified an
118 @param update: The Update object to apply to the issue.
122 old_update = Update(
125 if not update.status:
126 update.status = old_update.status
127 elif (update.status not in Update.open_statuses and
128 update.status not in Update.closed_statuses):
129 raise ValueError('Unknown status %s' % update.status)
132 logging.warning('Would have applied the following update: '
133 '%s -> %s', old_update, update)
138 issue_id=old_issue.id, comment=update.comment,
139 label_update=update.labels,
140 status=update.status)
141 self.present[old_issue.id] = update
368 """A simple update test, to record usage.
372 updater.update(issue,
373 Update(comment='this is bogus', labels=['bogus'],