[darcs-users] change missed in patch

David Roundy droundy at jdj5.mit.edu
Mon Dec 8 12:05:28 UTC 2003


On Sun, Dec 07, 2003 at 02:09:05PM +1100, Tim Barbour wrote:
> I accidentally missed a change when recording a patch, so now I have a
> patch that adds a line in a new location without removing the old
> one. Since the line contains a curly bracket, the patch causes unbalanced
> brackets. I have recorded a new patch that fixes this, but I really
> should arrange for the earlier patch to depend on the new one. How can I
> do this ?
> 
> I have looked at the patch format, and it seems that the dependencies are
> listed between "< >" in the patch header. Perhaps I should edit the
> patch. Is there any more civilised way to add a dependency after
> recording ?

I don't think it's a good idea ever to modify a patch once recorded.  The
only time it's really safe to modify the patch is if you know that the old
version doesn't exist in any other repositories, or that you will unpull it
from all other repositories, so it gets replaced with the fixed version.
However, if those conditions are met, you can safely unrecord the patch and
then record a single patch that is fixed (i.e. includes the missed change
involving the curly brace).

If the first patch is already out "in the wild", then you can make the bug
fix depend on the patch it's fixing.  It'll still leave the possibility of
people not getting the bug fix, but if its name clearly indicates it's a
bug fix, this shouldn't be too much of a problem, and making it depend on
the patch it's fixing keeps them from grabbing the fix patch without the
other one, which would also cause an unbalanced brace.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list