Perl 6 - the future is here, just unevenly distributed

IRC log for #darcs, 2014-08-19

| Channels | #darcs index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:47 ilbot3 joined #darcs
01:47 Topic for #darcs is now http://darcs.net/ | logs: http://irclog.perlgeek.de/darcs/ | darcs 2.8.4 is out http://darcs.net/Releases/2.8
01:49 mizu_no_oto joined #darcs
01:56 mizu_no_oto joined #darcs
04:51 sm_ joined #darcs
06:14 stepcut joined #darcs
08:19 lelit joined #darcs
09:30 bishboria joined #darcs
10:55 mizu_no_oto joined #darcs
11:11 mizu_no_oto joined #darcs
11:57 mizu_no_oto joined #darcs
12:16 gh_ joined #darcs
12:23 mizu_no_oto joined #darcs
14:06 mizu_no_oto joined #darcs
15:09 lelix joined #darcs
15:18 lelit joined #darcs
15:23 dolio joined #darcs
15:58 gh_ joined #darcs
16:05 gh_ hi
18:11 stulli joined #darcs
18:35 byorgey_ joined #darcs
19:20 gh_ joined #darcs
19:32 Heffalump hi
21:47 mdiaz joined #darcs
21:48 mdiaz hi
21:49 mdiaz Heffalump, are you there?
21:57 Heffalump yes
21:59 mdiaz I have a  question about undo in revert.
22:00 mdiaz this command doesn't call the function finalizeRepositoryChanges...
22:01 Heffalump but it does apply changes to the working directory, right
22:01 Heffalump ?
22:01 Heffalump those are the two things we need to capture in undo - repository changes and working directory changes. Either should create an undo state (but of course if both happen in one command, that's still just one undo state)
22:02 mdiaz Yes, so I should call handleUndoFiles instead right?
22:02 Heffalump how do you handle it now when a command both does things to the working directory and to the repository?
22:02 mdiaz I mind, I should move handleUndoFIles outside finalize...
22:03 mdiaz I'm passing a null patch to handleUndoFiles...
22:03 mdiaz Or that is what I think, NilFL is the type.
22:03 Heffalump not sure I follow
22:04 Heffalump btw, if you keep your work in progress in a repo on hub.darcs.net, it's easy to point to specific bits of code with direct links
22:04 Heffalump NilFL is a null patch, yes
22:05 mdiaz http://hub.darcs.net/mdiaz/darcs-screened/patch/20140817050250-7e567
22:05 Heffalump but what I'm trying to understand is how you ensure that both the repository changes and the working directory changes end up in a single undo state (so they'll both be undone together)
22:05 Heffalump thanks
22:06 Heffalump ah, I see, you pass a patch in to finalizeRepositoryChanges too?
22:06 mdiaz yes
22:07 Heffalump yes, in that case I guess you need to directly call handleUndoFiles if not
22:07 mdiaz But keeping the call inside finalizeRepositoryChanges, right?
22:08 Heffalump yes, so handleUndoFiles is called directly only in the cases where finalizeRepositoryChanges isn't, and is called indirectly otherwise
22:08 mdiaz Ok.
22:09 mdiaz In theory we can move the patch inside the Undoable type like we did with the command name right?
22:09 Heffalump yes, I think that makes sense
22:09 mdiaz Hmm, ok, I'll try again.
22:10 Heffalump I'm now wondering about an alternate design where we wrap the entire command execution in an "undoable" combinator that sets up some state somewhere and then have finalizeRepositoryChanges and applyToWorking both detect that state. But it has downsides too and it's probably not worth switching at this point.
22:11 mdiaz Ok.
22:11 mdiaz And what would be the commands that can't be undone now?
22:12 Heffalump you mean now that you're tracking changes to working too?
22:12 Heffalump presumably garbage collection can't be undone :-)
22:13 mdiaz haha
22:14 mdiaz We'll need garbage collection for the undo states?
22:16 Heffalump generally I'd guess that convert commands can't be undone if they change the repo in-place (I think this was discussed before) and perhaps some optimize commands
22:16 Heffalump I guess that garbage collecton should just clean out the undo states
22:19 mdiaz Yes, it's only remove a directory with the current implementation.
22:56 gh_ joined #darcs
22:59 mizu_no_oto joined #darcs
23:15 mizu_no__ joined #darcs

| Channels | #darcs index | Today | | Search | Google Search | Plain-Text | summary