def apply_next_patch(self, force=False, quiet=False):
self._check()<EOL>top = self.db.top_patch()<EOL>if not top:<EOL><INDENT>patch = self.series.first_patch()<EOL><DEDENT>else:<EOL><INDENT>patch = self.series.patch_after(top)<EOL><DEDENT>if not patch:<EOL><INDENT>raise AllPatchesApplied(self.series, top)<EOL><DEDENT>self.applying(patch)<EOL>self._apply_patch(patch, force, quiet)<EOL>self.db.save()<EOL>self.applied(self.db.top_patch())<EOL>
Apply next patch in series file