[darcs-devel] amend-record fails test behavior: bug or feature?
Rob Hoelz
hoelz at wisc.edu
Thu Apr 24 00:31:53 UTC 2008
Hello everyone,
I was doing an amend-record, and the code I added caused the test suite
to fail. After the failure, Darcs behaved as if the patch I was
amending had never existed (I assume amend-record just unrecords, and
re-records with the newly selected changes), so I had to cherry-pick
all of my original changes in the original patch, along with the new
ones I was adding through amend-record. I think it might be a good idea
for Darcs to record the original patch if the test fails; or is the
behavior I'm seeing a feature? To further clarify, here is what I see
amend-record as now:
amend_record = do
patch <- promptUserForPatch
new_changes <- promptUserForChanges
let old_changes = getChanges patch
unrecord patch
record $ old_changes ++ new_changes
And here is what my idea proposes:
amend_record = do
patch <- promptUserForPatch
new_changes <- promptUserForChanges
let old_changes = getChanges patch
unrecord patch
success <- record $ old_changes ++ new_changes
if success
then return ()
else record old_changes
Is the old behavior a bug, or a feature? If the former, I'd happily
fix it and send my changes here.
Also, another quick question: I noticed that the patch resulting from
amend-record is labeled with the current time, instead of the time of
the original patch record. Is this a bug, or is this intentional as
well?
Thanks,
Rob Hoelz
More information about the darcs-devel
mailing list