def do_drop(self, args): print 'Dropping all patches' for o in session.query(PatchSet).all(): print ' - ', o.name session.delete(o) session.commit() print 'Done'
def do_apply(self, args): print 'Applying Patches' # Find all the targetted files: target_files = list(set([p.target_filename for p in session.query(Patch).all()])) target_files.sort() for target_filename in target_files: self._do_apply_filename(target_filename)
def do_list(self, args): print 'Outstanding Patches: (%d)' \ % session.query(PatchSet).count() for patchset in session.query(PatchSet).all(): print patchset