def add_patches(self, patches, after=None):
if after is None:<EOL><INDENT>self.insert_patches(patches)<EOL><DEDENT>else:<EOL><INDENT>self._check_patch(after)<EOL>patchlines = self._patchlines_before(after)<EOL>patchlines.append(self.patch2line[after])<EOL>for patch in patches:<EOL><INDENT>patchline = PatchLine(patch)<EOL>patchlines.append(patchline)<EOL>self.patch2line[patchline.get_patch()] = patchline<EOL><DEDENT>patchlines.extend(self._patchlines_after(after))<EOL>self.patchlines = patchlines<EOL><DEDENT>
Add a list of patches to the patches list