Perl 6 - the future is here, just unevenly distributed

IRC log for #darcs, 2016-10-15

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

All times shown according to UTC.

Time Nick Message
01:25 ng0_ joined #darcs
03:28 mizu_no_oto joined #darcs
08:37 peb` joined #darcs
08:51 kaol joined #darcs
08:51 jorey joined #darcs
08:51 diskie_ joined #darcs
08:51 notdan joined #darcs
09:18 tg joined #darcs
09:30 diskie joined #darcs
09:32 kaol_ joined #darcs
09:38 jorey joined #darcs
09:39 notdan joined #darcs
11:14 Riastradh joined #darcs
12:59 ng0 joined #darcs
14:43 stef204 joined #darcs
14:47 stef204 hi, have a question re. behavior of darcs (2.12.4). Just have started using darcs, so still a lot to learn. I noticed that if I create file1 in dir1, then darcs add file1 and then darcs revert, it actually deletes the file--behavior I have to question. Should it not just revert the darcs add command, i.e. remove file from being watched by darcs but leave file in dir1.  It does the same for directories.
14:50 stef204 IOW, in case above, I "think" that darcs revert should actually execute darcs remove as opposed to completely deleting the file from directory.  Would appreciate any comments re, above.
14:51 stef204 Also please let me know if this is better off directed to darcs-users@darcs.net
14:52 drostie joined #darcs
14:57 Heffalump I remember someone else mentioning this as a problem a few weeks/months ago
14:58 Heffalump I'm not sure what the right behaviour is. The thing about darcs revert doing what it does, is that it makes darcs unrecord; darcs revert equivalent to darcs obliterate, w
14:58 Heffalump and IMO it's nice to have simple properties like that
14:59 Heffalump but maybe the user surprise here outweighs that
14:59 Heffalump also, 'darcs revert' is interactive by default, so you should realise it's doing it
15:06 stef204 Heffalump: hi, thanks for your comments. Actually, the "interactive' bit is not completely correct. Nowhere does it make you aware it will "completely delete" file from system
15:06 stef204 addfile ./file_ad_rm.txt Shall I revert this change? (1/2)  [ynW...], or ? for more options:
15:07 stef204 so form above line, it seems it will revert 'darcs add' which is 'darcs remove' as opposed to deleting file
15:07 stef204 IMHO, that is dangerous
15:09 stef204 at least, I can say that, I almost got into a rather annoying clusterf.ck by darcs removing an entire tree form my system *hard removing* meaning completely deleting. I was able to recover somehow but it made me ponder about the "proper" behavior of 'darcs revert' in the above context
15:10 stef204 I guess I consider that that the reverse of "darcs add" should be "darcs remove" not "rm" the file or directory
15:12 stef204 and btw, great works on darcs, generally, I love it (except for bit above :) ) and MUCH more user friendly than "git"
15:12 stef204 s/works/work
15:13 mizu_no_oto joined #darcs
15:36 Heffalump yes, good point about interactive, once you revert the add, the content removal is implicit
15:36 Heffalump darcs revert in general isn't just inverting darcs commands, e.g. if you edited a file
15:59 stef204 understood. And surely, my objection to behavior in above context is probably due to my lack of familiarity with darcs, as I just started using it recently.  But still, I found the one specific case or context above "dangerous" and not "foolproof".  darcs is not meant for fools in any event, but wanted at least to share the above issue I experienced in relation to the "darcs add" and then using "darcs revert"
15:59 stef204 thanks
16:03 sm I think stef204 is right, it's too easy to darcs add, then change your mind, reach for darcs revert and blow away the file(s)
16:04 sm what if there was an obvious, safer, darcs unadd command ?
16:04 sm or is the command list getting too out of control
16:15 mizu_no_oto joined #darcs
16:20 Heffalump well, that's 'darcs remove', but 'revert' is what people would instinctively reach for
16:20 Heffalump one worry I have about changing revert is how do you get a clean workspace if not with revert
16:23 sm revert could be renamed, to something less easy to mistake as a generally safe undo command
16:26 burp joined #darcs
16:45 Heffalump actually, stef204, did you know about "darcs unrevert" and if you did, did it fail you here?
16:46 Heffalump sm: the thing is that it isn't really safe, it throws changes away, like obliterate
16:49 sm Heffalump: yeah, I meant that it's currently easy to think it's a safe undo command, when it isn't
16:49 sm "revert" sounds like "undo", or at least something safe-ish
16:49 Heffalump well, I guess git uses "reset"
16:49 sm it doesn't sound like "possibly recursively delete everything"
16:50 sm yeah, and git reset doesn't delete stuff unless you do reset --hard, which is good
16:51 Heffalump I don't see much difference in principle between deleting the hundred lines of code you just added to an existing file, and the hundred lines of code you put in a new file
16:52 Heffalump OTOH offering to revert the "track this file" operation *first* and then implicitly deleting the whole contents, that sounds like a concrete and bad difference
16:54 sm slightly lost now.. sorry
17:00 Heffalump (a) you're noting that revert can possibly recursively delete everything, and I'm saying it's not that different to just deleting a set of changes to an existing file
17:00 mizu_no_oto joined #darcs
17:01 Heffalump and (b) I think the behaviour stef204 described of it offering to revert the 'add' operation first, and then implicitly deleting the file contents as a result, is particularly bad and is a real difference between the "set of changes to an existing file" and "new file" cases
17:08 drostie joined #darcs
17:31 Heffalump a couple of simple UI changes I can think of: summarise the changes being reverted before the "last regrets" prompt, and also after the prompt say "you can undo with darcs unrevert"
17:31 Heffalump a slightly more intrusive change would be to offer the hunk addition in a new file before the 'addfile' not after it
18:24 mizu_no_oto joined #darcs
19:48 mizu_no_oto joined #darcs
20:19 stef204 was out just came back. I agree with being more explicit with UI changes, perhaps that is all that is needed.
20:21 stef204 I think the "issue" I described is only relevant to the context above. "darcs add". I am assuming--perhaps incorrectly--that reverse really means or should mean the reciprocal of the operation just performed previously
20:22 stef204 which is why I assumed that darc revert should be contextual and in case previous command is "darcs add" the reciprocal of it would be "darc remove"--not "dark remove && rm file"
20:23 stef204 but that is only my own opinion, based in the very simple context above
20:23 stef204 a/in/on
20:23 stef204 ooops s/in/on
20:25 stef204 Heffalump: and I did use "darcs unrevert" which sort of got me out of the mess.... in the above described case with tree
20:28 stef204 but it basically recreated the deleted tree as "tree.\~0\~/" which I then had to cp to just "tree" to recover
20:28 stef204 simple enough, thank god, but a bit .... well....not ideal
20:29 stef204 but again, this only occurred because my knowledge of darcs is limited, and I was sort "playing around: with it and a tree I should not have used for that. Should have used a test tree
20:33 stef204 and this won't happen again, obviously, but based on experience.  Anyway, just food for thought as to whether the "darcs revert" issued after "darcs add" should in fact do "rm file" as opposed to just "darcs remove".... Not mission critical, to be sure.
20:33 stef204 sorry for the typos above
20:36 Heffalump stef204: just to clear up one thing - it's not the reciprocal of the operation just performed previously, it's about restoring your repo to the recorded state
20:36 Heffalump so if you do 10 file edits, then darcs revert will undo all of those
20:37 stef204 yes, I understand....
20:37 Heffalump I see, you previously though it would be like an undo command?
20:37 stef204 which is why my example is only relevant in a very limited way, the context above
20:38 stef204 and may not be worth touching except perhaps a bit more info in UI, as you suggested
20:38 stef204 Heffalump: yes, a bit, it would "undo" the past unrecorded changes
20:39 sm revert has a similar meaning to undo in english. Also it's different from git revert. At this point I think it's badly named
20:40 stef204 but where you have a bunch of changes and patches and use "revert" is one case and where you only have a single action of "add" and the "revert" is another case which probably is not very relevant because most users will never do that or use it in that way
20:41 stef204 I think it is just a matter of understanding the "danger" that in some cases, it may "rm" files and dirs in addition to reverting code changes
20:42 sm newcomers won't understand that, I have forgotten it a few times myself
20:43 stef204 making the interactive message a bit more explicit in the above case might be all that is needed, I don't know.  I just found it disconcerting that it actually "rm"ed my tree from file system.... VEne if I realy am not supposed to use "darcs revert" in that way.
20:43 stef204 s/VEne/even
20:45 stef204 look It's just food for though, I don't want to make a big deal out of this at all.  I basically should learn more about darcs and how it behaves and I am doing just that by going through the enire manual and using a test directory and files.  I just wanted to point out the potential "danger" above in the one specific context of "darcs add".
20:46 stef204 s/though/thought
20:46 Heffalump yeah, thanks. As I said it's come up at least once recently, so definitely something to think about.
21:27 drostie joined #darcs
21:33 mizu_no_oto joined #darcs
22:13 mizu_no_oto joined #darcs
23:38 mizu_no_oto joined #darcs

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