[darcs-devel] darcs patch: make remove_from_unrevert_context take a... (and 1 more)

'Tommy Pettersson ptp at lysator.liu.se
Thu Mar 3 17:11:18 PST 2005


So, here it goes -- me going heavy haskell.  These two patches
will make unrecord use the with_selected_changes interface.

It is not finished; I have not made the corresponding changes
to unpull, and I sometimes get "Invalid pending".  Well,
at least I haven't been able to trigger a repo corruption
with this latest version of the changes -- yet.

I had a rather hard time understanding the interface to patch
manipulation, and there is much I still don't understand.
This is more a kindly asking for comments on what I have done
so far, wrongs and what-to-do-instead-s.

I expected with_selected_changes to commute the patches in a
way so I can remove them easily.  I does commute them in some
way that I can't figure out.  I wrote commute_to_top that uses
the result from with_selected_changes to rearrange the patches
so I can remove the selected ones.  Is this really necessary?

I don't understand the pending merging bit at all, and that's
where things sometimes go wrong now.

I hit a bug when I test this unrecord on the darcs repo
(and only on the darcs repo -- so far).

  Fail: bug in darcs!  Impossible case at PatchCommute.lhs:281
  compiled 00:20:29 Feb 28 2005

but I don't think this is my fault... or is it?

I have noticed that with an as large repo as darcs and asking
about all patches, with_selected_changes can take pretty
long to handle a response before giving the next question.
One simple compromise would be to only ask about patches
after the last checkpoint.


Anyway, this will be absolutely lovely when it works.  For
example, 'darcs unrecord -p some-old-patch' will automatically
prompt also for exactly those hard-to-guess patches that
depend on some-old-patch and need to be unrecorded as well.




Sun Feb 27 23:45:16 CET 2005  Tommy Pettersson <ptp at lysator.liu.se>
  * make remove_from_unrevert_context take a list of patches
  This will enable unpull and unrecord en masse

Fri Mar  4 00:14:38 CET 2005  Tommy Pettersson <ptp at lysator.liu.se>
  * use with_selected_changes in unrecord

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 13801 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20050303/9897d039/attachment.bin


More information about the darcs-devel mailing list