quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] New function: Shift bottom patch to subversion


From: Hugo Mills
Subject: Re: [Quilt-dev] New function: Shift bottom patch to subversion
Date: Wed, 25 Nov 2009 21:03:08 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Nov 25, 2009 at 09:12:50PM +0100, Andreas Gruenbacher wrote:
> On Wednesday 25 November 2009 18:46:40 Hugo Mills wrote:
> > On Wed, Nov 25, 2009 at 05:11:48PM +0100, Andreas Gruenbacher wrote:
> > > On Tuesday 24 November 2009 17:05:50 Hugo Mills wrote:
> > > >    If I'm doing development with quilt, I usually come to the point
> > > > where I want to commit the changes to subversion, and find the process
> > > > a bit awkward. So I wrote a quilt module to shift the bottom patch of
> > > > the stack into svn, taking the patch header as the commit message.
> > > 
> > > This seems quite useful to me. Some comments:
> > 
> > >  * I'd like the command to be able to just forget about a patch (or 
> > > several
> > >    patches) without actually committing them anywhere.
> > 
> >    Well, there's "quilt delete", which has slightly different
> > semantics. However, committing the changes to a null VCS would
> > effectively leave the changes sitting in the source tree but
> > unattached to any quilt patch.
> 
> This is also what happens when you commit a patch with your svn script
> except that the patch ends up in svn, no?

   Yes, but in that case, it's actually recorded somewhere as a
coherent patch. If you forget a patch from the stack, the changes
simply end up floating around in the base code, uncategorised and
unmanaged.

> > I don't think it's hard to provide the function, but I don't see a use
> > case for it off-hand.
> 
> Maybe it's not very useful by itself after all.

   It's trivial to implement, so I've done so. It won't ever get used
without explicit approval from the user, so it's effectively harmless.
I can always take it out if anyone thinks it's going to be confusing
or actively dangerous.

[snip]
> > >  * Is it possible to commit an applied patch to svn (or cvs)
> > >  even when other patches are applied on top?  Quilt can compute
> > >  what to commit under which filenames, but is svn add flexible
> > >  enough to let quilt tell it what to do?  (Git definitely is.)
> >
> >    svn can do commits on a per-file basis, so in the case where no
> > other applied patches modify the files that this one does, yes, we can
> > do that.
> 
> That's not always the case though.

   Yes. However, I can warn/halt in the cases where it's not possible
to commit a patch cleanly. For example, consider:

patch-1: modifies foo.c
patch-2: modifies bar.c
patch-3: modifies foo.c again
patch-4: modifies bar.c again

   It simply isn't possible to maintain the stack order and commit
patch-3, regardless of which patches are applied/not. However, it is
possible to commit patch-2, provided that patch-4 is not applied. It's
relatively simple to identify both of those cases and stop before any
damage is done.

> Also, you want to commit an entire patch, not just a single file.
> Is there a way to pass svn a list of (filename, actual file) tuples
> to commit or similar?

   Err, yes, that's what I meant. You pass svn a list of files and it
will commit those (provided they're added to svn's working copy). When
I said "per-file", I meant to imply "no smaller unit of work", rather
than "no larger unit of work".

[snip]
> > > >         # Remove the patch from the patch stack
> > > >         if remove_from_series "$patch"
> > > 
> > > Can the patch be commented out in the series file instead of removing it?
> > 
> >    That should be possible. Is there an existing function to do that,
> > or should I simply duplicate and modify remove_from_series (or
> > rename_in_series)?
> 
> Not sure if an existing function can be abused for that ...

   I've not found one that looks particularly plausible.

   I should have a new version of the patch finished and tested some
time tomorrow.

   Hugo.

-- 
=== Hugo Mills: address@hidden carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
      --- Eighth Army Push Bottles Up Germans -- WWII newspaper ---      
                     headline (possibly apocryphal)                      

Attachment: signature.asc
Description: Digital signature


reply via email to

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