[mythtv] writing patches that build on not yet committed patches.

Stuart Auchterlonie stuarta at squashedfrog.net
Mon May 22 23:14:38 UTC 2006


On Tue, May 23, 2006 at 12:59:21AM +0200, Lucas Meijer wrote:
> Hey,
> 
> I'm hoping someone has some advice on how to do this:
> I wrote some commflag reorganisation stuff that is pending review.
> I'd like to continue working on the commflagger. However, it would make 
> sense
> to supply my new work as patches ontop of the still pending patch.
> Does anybody know the most comfortable way to achieve this? if I just
> keep on working, and do "svn diff", the result of that includes both the 
> old patch
> and my new stuff. Is there an easy way to get a diff for something that 
> is not in svn yet
> and what I have now?

quilt.

developed initially by akm of linux kernel fame for the sole purpose
of managing patches.

basically you create a series of patches (a quilt) which apply in a
sequence to provide the functionality you want. You can submit the
patches to upstream and continue working on new patches.

As upstream catches up you merely remove patches from your quilt and
keep going. It's very easy to keep patches in sync when upstream
code changes cause the patches to no longer apply cleanly.

My workflow for an update goes like this.

1. quilt pop -a (remove all my patches)
2. svn update
3. quilt push (apply the next patch in the series.
4. if patch doesn't apply cleanly, rework and do quilt refresh
   (updates current patch)
5. goto 3 while patches remaining
6. build as normal.


each time you want to work on a new feature on top of your existing
work, you simply go 

1. quilt new patch-to-implement-feature-x.diff
2. quilt add file.cpp
3. modify file.cpp
4. quilt refresh

job done.


Stuart

> 
> So far the only thing I've thought of is setting up a svn server myself, 
> and commiting my
> patch to that server, and then doing a svn diff, but something tells me 
> there must be an
> easier way :)
> 
> Thanks, Lucas
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


More information about the mythtv-dev mailing list