[darcs-users] Patches are immutable
mklooster at baan.nl
Tue Nov 2 19:18:17 UTC 2004
Thanks for the illuminating discussion around 'rerecord' and friends.
David Roundy wrote on Tuesday, October 26, 2004 12:24:
> On Sun, Oct 24, 2004 at 10:46:01PM +0200, Juliusz Chroboczek wrote:
> > > I think that rerecord doesn't break immutability of patches. AFAICS,
> > > records the patch again, with a different time, so a different
> > > identity.
> > After checking -- you're right. It looks like rerecord is slightly less
> > evil than I thought.
> I do think that rerecord is a valuable tool--it just needs to *not* be
> when a patch has already been pulled by others, just as unrecord and
> must not be used on patches that have already left home.
Not having used rerecord myself yet, and just to get this off my chest,
Why should rerecord (and unrecord and unpull) not be used for a patch that
has already been pulled? If I understand correctly, this is to prevent
conflicts and confusion.
Here is a proposal, which should work at least for 'rerecord'. Suppose a
patch can not only indicate the patches it 'depends on', but also those it
'conflicts with'. Then we can have 'rerecord' create a patch B that
conflicts with the original patch A. When patch B is pulled by some other
repo which has A, that repo first has to remove A (and any dependent
'unrecord' could simply be 'rerecord', but with patch B being an empty no-op
patch. 'unpull' is similar.
BTW, If the source repo has, e.g., a tag T which depends on patch A,
'rerecord' could offer to automatically rerecord T as well-- that solves
another issue that I think somebody brought up in this discussion.
More information about the darcs-users