quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] dropping a patch


From: Jean Delvare
Subject: Re: [Quilt-dev] dropping a patch
Date: Wed, 12 Apr 2006 08:36:44 +0200

Hi Randy, Gary,

[Randy Dunlap]
> > Am I missing some shortcut to drop a patch (that may contain
> > patches to multiple files)?
> > 
> > Do I actually have to go thru:
> > 
> >   quilt push # make sure that it is applied since 'remove' seems to
> >             # work only on applied patches
> >   quilt files # list all of them since I forgot what they are
> >   quilt remove file1 file2 file3 file4 file5...
> >   quilt delete drop-this.patch # top patch filename

I doubt this would work. "quilt remove" restores the files as they were
at the time they were added to the patch, so the above sequence doesn't
actually do anything (besides deleting the patch itself.)

> > I suppose I could just do:
> > 
> >   rm patch/drop-this.patch
> >   edit patch/series
> >   edit .pc/applied-patches
> > 
> > Does that work?

Yes, it does, even though it's a hack. We can't recommend that in the
user manual ;) You should also delete the .pc/drop-this.patch directory
after editing .pc/applied-patches.

[Gary V. Vaughan]
> Assuming that dropped patches are always at the bottom of the stack,
> I've always simply done this to commit such patches to CVS and take
> them out of quilt:
> 
>     quilt pop -a -f
> 
>     foreach patch to be moved to version control
>     do
>       quilt push
>       cvs commit ...
>       edit patch/series
>       rm -rf .pc
>     done

Yup, that's not so different from what Randy proposes.

I use a different method:

  quilt pop -a
  patch -p1 < patches/$(quilt next)
  quilt delete -rn

The nice benefit is that it doesn't rely on the quilt internals. It
assumes that patches are -p1 though (which works for me).

Of course, it would be better to have a true "quilt drop" command as
Josh Boyer had been proposing some times ago, but this command would
have to make additional checks to make sure users won't screw up their
working repository. The fundamental check here would be that only the
bottom-most patch can be dropped.

-- 
Jean Delvare




reply via email to

[Prev in Thread] Current Thread [Next in Thread]