Apologies for the delay! This review is under way. > Wed Oct 14 13:50:45 BST 2009 Florent Becker <[email protected]> > * Remove useless import of Verbose in Darcs.Commands.Unrecord > > Wed Oct 14 14:50:55 BST 2009 Florent Becker <[email protected]> > * Refactor Darcs.Commands.Rollback > > Thu Oct 15 13:36:19 BST 2009 Florent Becker <[email protected]> > * Refactor Darcs.Commands.AmendRecord
Have pushed these three. The general approach is to break up large chunks of code into more manageable top level functions. No more lambda abuse. Seems sensible enough. > Thu Oct 8 16:04:29 BST 2009 Florent Becker <[email protected]> > * Refactor Darcs.Commands.Apply This conflicts, but I think I can fix it myself. > Thu Sep 24 15:13:35 BST 2009 Florent Becker <[email protected]> > * simplify Darcs.Commands.Record.ask_about_depends > Thu Oct 15 09:28:18 BST 2009 Florent Becker <[email protected]> > * Refactor Darcs.Commands.Push > > Thu Oct 15 14:07:43 BST 2009 Florent Becker <[email protected]> > * Refactor Darcs.Commands.Send Will look at these tomorrow. Refactor Darcs.Commands.AmendRecord ----------------------------------- > hunk ./src/Darcs/Commands/AmendRecord.lhs 131 > - NilFL | not edit_metadata -> putStrLn "No changes!" > - _ -> do > - date <- getDate opts If I understand correctly, we can do this getDate at anytime since we're not using --pipe > - with_selected_changes_to_files' "add" (filter (==All) opts) > (Just primSplitter) > - (map toFilePath files) ch $ \ (chs:>_) -> > - if (nullFL chs && not edit_metadata) > + NilFL | not (has_edit_metadata opts) -> putStrLn "No changes!" > + _ -> > + with_selected_changes_to_files' "add" (filter (==All) opts) > (Just primSplitter) > + (map toFilePath files) ch $ addChangesToPatch opts > repository oldp This seems like a nice refactor. Florent has unpacked our big amend-record function into some distinct more manageable phases: with_selected_changes_to_files `- addChangesToPatch `- updatePatchHeader `- warnIfHijacking (in case you're amending someone else's patch) Really just rearranging some whitespace and promoting things to top level functions -- Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> PGP Key ID: 08AC04F9
pgp16pJKtL1Dy.pgp
Description: PGP signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
