quilt/new.py
def create(self, patchname):
        """ Adds a new patch with patchname to the queue

        The new patch will be added as the topmost applied patch.
        """
        patch = Patch(patchname)
        if self.series.is_patch(patch):
            raise PatchAlreadyExists(self.series, patchname)

        patch_dir = self.quilt_patches
        patch_dir.create()
        patchfile = patch_dir + File(patchname)
        patchfile.touch()

        pc_dir = self.quilt_pc + patchname
        if pc_dir.exists():
            # be sure that the directory is clear
            pc_dir.delete()

        # create empty .pc/<patchname> directory as quilt does too
        pc_dir.create()

        top = self.db.top_patch()
        # add new patch after the current topmost applied patch
        self.series.add_patches([patch], top)
        # "apply" patch
        self.db.add_patch(patch)

        # create patches/series files
        self.series.save()
        # create .pc/.version and .pc/applied-patches files
        self.db.save()

        self.patch_created(patch)
def create(self, patchname):
        patch = Patch(patchname)
        if self.series.is_patch(patch):
            raise PatchAlreadyExists(self.series, patchname)

        patch_dir = self.quilt_patches
        patch_dir.create()
        patchfile = patch_dir + File(patchname)
        patchfile.touch()

        pc_dir = self.quilt_pc + patchname
        if pc_dir.exists():
            # be sure that the directory is clear
            pc_dir.delete()

        # create empty .pc/<patchname> directory as quilt does too
        pc_dir.create()

        top = self.db.top_patch()
        # add new patch after the current topmost applied patch
        self.series.add_patches([patch], top)
        # "apply" patch
        self.db.add_patch(patch)

        # create patches/series files
        self.series.save()
        # create .pc/.version and .pc/applied-patches files
        self.db.save()

        self.patch_created(patch)
def create ( self , patchname ) : patch = Patch ( patchname ) if self . series . is_patch ( patch ) : raise PatchAlreadyExists ( self . series , patchname ) patch_dir = self . quilt_patches patch_dir . create ( ) patchfile = patch_dir + File ( patchname ) patchfile . touch ( ) pc_dir = self . quilt_pc + patchname if pc_dir . exists ( ) : # be sure that the directory is clear pc_dir . delete ( ) # create empty .pc/<patchname> directory as quilt does too pc_dir . create ( ) top = self . db . top_patch ( ) # add new patch after the current topmost applied patch self . series . add_patches ( [ patch ] , top ) # "apply" patch self . db . add_patch ( patch ) # create patches/series files self . series . save ( ) # create .pc/.version and .pc/applied-patches files self . db . save ( ) self . patch_created ( patch )
Adds a new patch with patchname to the queue

        The new patch will be added as the topmost applied patch.
Adds a new patch with patchname to the queue