Perl 6 - the future is here, just unevenly distributed

IRC log for #darcs, 2017-04-14

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

All times shown according to UTC.

Time Nick Message
00:34 stef204 joined #darcs
01:48 ilbot3 joined #darcs
01:48 Topic for #darcs is now http://darcs.net/ | logs: http://irclog.perlgeek.de/darcs/ | darcs 2.12.5 is out http://darcs.net/Releases/2.12
03:30 siel joined #darcs
03:42 mizu_no_oto joined #darcs
03:53 siel joined #darcs
03:53 siel joined #darcs
09:49 jeltsch joined #darcs
10:51 Mysterious_Ligh1 joined #darcs
12:04 florent_ joined #darcs
12:23 stef204 joined #darcs
12:43 stef204 hi, i am so used to zsh completions that sometimes I instinctively tru to use it on files with darcs command, which causes darc to get stuck/crash
12:44 stef204 completion works on darcs commands themselves like: darcs wh<tab> will complete as "darcs whatsnew" for example. nice
12:46 stef204 but darcs add <tab> gives me "darcs add darcs: .: getDirectoryContents: permission denied (Permission denied) darcs" and gets stuck
12:47 stef204 i have to ctrl+c out of it at that point
12:48 stef204 am i doing something wrong, or should i just get out of the tab completion habit? the latter is going to be virtually impossible ;) it's an incurable disease. ;)
12:52 stef204 hi, running 5.3.1 I am looking for the completion file called "_darcs.zsh"--is this available anywhere? already part of zsh? I cannot find it on my system, yet I do have /some/ level of completionwith darcs  but not enough
12:53 stef204 sorry disregard last bit about the zsh faile, that was supposed to be posted in #zsh
13:07 Heffalump I'm fairly sure I use tab completion with darcs add, but I don't use zsh
13:07 Heffalump bfrk (not online at the moment) was looking at improving tab completion
13:30 stef204 Heffalump: so on your box, you CAN do "darcs add myf<tab> and it will give you: "darcs add myfile.txt". This is what you are saying, correct?
13:32 stef204 also, which shell do you use?
13:34 stef204 fyi, i am getting the exact same error on the tab completion with Bash as in Zsh
13:49 mizu_no_oto joined #darcs
14:36 Mysterious_Light joined #darcs
15:27 Mysterious_Light stef204, I had no autocompletion when installed darcs first. I just wrote a simple script in /etc/bash_completion.d/darcs based on other scripts in the directory.
15:27 stef204 Mysterious_Light: ok, are oyu able to share that file so I can take a peep and get some ideas?
15:28 Mysterious_Light every darcs command (like `darcs add` or `darcs show dependencies`) has --list-opionts that just lists all available commands
15:28 Mysterious_Light however, darcs itself has no --list-options and I do not know why
15:28 stef204 I AM getting some autocompletion in zsh as I see a "_darcs"  autocompletion file on my box,  The problem is not there, but I guess but autompleting arguments
15:29 Mysterious_Light try to call `darcs add --list-options`
15:29 Mysterious_Light do you have an error?
15:29 stef204 again, my problem is autocompleting on arguments to "darcs install <tab>" whch breaks everyhting
15:30 stef204 i think that at that point, I need to find a way to go back to shell's own autocompletion
15:30 stef204 just an idea
15:31 stef204 darcs add --list-options breaks it
15:31 stef204 it's really a pita
15:33 stef204 on this "darcs add --list-options breaks it" darcs just breaks and starts to "rev up" like an engine gone wild and cpu % just starts increasing
15:34 stef204 trying to autocomplete, I mean. not on using the option itself without autocomplete, that works fine obviously
15:44 stef204 to be more precise, the example I just quoted is incorrect. correct is: autocomplete of "darcs <tab>" works and gives list of options. Any attemps to autocomplete past something like "darcs add <tab>" breaks.... Hope this is more understandable
16:03 Mysterious_Light my script for autocomplation: https://pastebin.com/TVf4DXBj
16:03 Mysterious_Light /etc/bash_autocomplation.d/darcs
16:04 stef204 tx for that btw
16:12 stef204 just a quick correction--again--to my ramblings above.  The argument completion *works* when in a directory which has the _darcs and the tracked files--so I guess properly initiated.  It seems it breaks if I have initiated repo in dir1 (which contains _darcs) and it is tracking dir1/dir2/* (files in dir1/dir2)
16:13 stef204 perhaps i am not going at this the write way: i want to track a repo called dir1 which has for example 100 dirs in it each with a package build
16:13 stef204 and then push various builds out to remote repo
16:15 stef204 I wanted to avoid initiating 100 repos, and instead just initiating one in dir1 and darcs add dir1 dir 2 , etc.
16:15 stef204 probably not doing this properly
16:23 jeltsch joined #darcs
16:51 Mysterious_Light joined #darcs
16:57 lelit stef204: a quick test, using bash, gives the expected result here
16:57 lelit that is, while at the top level, "darcs add TAB" shows me the list of subdirs
16:58 stef204 lelit: ok. I think it possibly it is something I do which is incorrect, given the constraints and limitations of the combo darcs+zsh?
16:58 stef204 let me ask
16:58 lelit in one of the subdirs, "darcs add TAB" gives me the list of files
16:59 stef204 lelit: sounds like you've got it working perfectly.
16:59 lelit at the top level, "darcs d4TAB" gives me something like "d4/a   d4/aa  d4/ab  d4/ac  d4/b   d4/c"
17:02 stef204 let me ask: is i ok for me to use darcs like I described? IOW, dir1 is initiated and has the "_darcs" dir; dir1 has lots of subdirs like this dir1/dir2 dir1/dir3 , etc., each of the subdirs is a project I want to versions control. I don't want to initiate 100 repos, but just the one dir1 repo and then add whichever subdir I need (e.g. dir1/dir5) AND its files so dir1/dir5/*
17:02 stef204 s/i/it
17:04 stef204 the otehr way would be to initiate a darcs repo for each of the subdirs inside the subdirs themselves
17:04 stef204 but that seems tedious and uneccesary
17:04 stef204 this is a different question then autocomplete
17:05 lelit you can surely do that, but obviously then you cannot checkout just one single project
17:05 stef204 somewhat related as auto complete seems to work best when "_darcs" in inside the sme dir which has the files being tracked
17:05 stef204 lelit: i am not saying I am correct, here.
17:06 stef204 quite the opposite really, I am fairly new at this
17:06 lelit are those projects related to each other in some way or not?
17:06 lelit how big are they gonna be in the future?
17:06 stef204 I want to push each or some of the projects to one single remote repo called "project1" for example
17:07 lelit yes, that I understand
17:07 stef204 the projects at the moment are all package builds like "emerge" which are customized
17:07 stef204 for me
17:08 stef204 so so far, I started to vcs only one
17:08 stef204 and pushed it successfully
17:08 lelit so, are they "mostly" configurations files, or do they contain the whole source tree?
17:09 stef204 if I build them , then contain source + binary which I do NOT want to vcs, only the scripts related to the build
17:09 stef204 so each subdir has a number of files, a subset of which I want to vcs and push
17:09 stef204 iow, push the bash scripts files and other config files, exclude source and binaries
17:10 stef204 my first thought was to initiate a repo for each subdir
17:10 lelit ok, so it should not be a big problem if in the future, say one year, you checkout that repo just to fix a problem in "project42" and push that back
17:11 stef204 well I would only want to checkout project 42 if there is a problem there. or edit it locally and push it back
17:11 stef204 instead of the whole thing
17:12 lelit no, you cannot checkout a single subdirectory of a darcs repo, like you could do with CVS or subversion for example
17:12 stef204 so I am donig this wrong then
17:12 stef204 I should really initiate one repo per project
17:13 stef204 even if I have 100 projects
17:13 stef204 and push them all to same repo on darcshub for example? Is that possible?
17:14 stef204 I have created a repo called "projects" on hub.darcs.net
17:14 stef204 I want to push many of the subdirs or projects to this one "projects" repo on hub.darcs.ne
17:15 lelit there are several tools that could help you, applying the same operation (push, for example) to a batch of repos
17:15 stef204 each have their own directory, below top level
17:15 stef204 sure.
17:15 stef204 but is my design flawed?
17:16 stef204 iow should I be initiating a repo for each of the projects?
17:16 lelit but you have to decide the layout, either a single monolithic repo, or a forest of smaller repos
17:17 stef204 can the forst of small repos can be pushed to the same remote repo? iow, can projects foo1 foo2 foo3 be pushed to single foo repo remotely?
17:17 Mysterious_Light joined #darcs
17:18 lelit no, there's one-to-one relation
17:20 stef204 ok, so i need to stick to the single monolithic repo
17:20 stef204 which is what I setup, i guess
17:21 stef204 darcs initialize dir1 and then darcs add dir1/dir2/foo1 dir1/dir2/foo2 dir1/dir2/foo3
17:22 stef204 which is why I was trying to get the autocomplete going I guess so it would help me choose the files in the surdirs
18:46 mizu_no_oto joined #darcs
19:54 Heffalump stef204: I confirm darcs add myf<tab> works fine for me. But actually I might not be using any autocompletion script at all.
19:54 stef204 Heffalump: ok, which shell do you use?
19:56 stef204 also it works fine for me to when in the directory which is the repo, so has the _darcs AND the tracked files.  But not if tracked files are in a subdir
19:56 stef204 i do love darcs though ;)
20:02 stef204 s/to/too
20:08 Heffalump stef204: bash
20:09 Heffalump stef204: hangon then, let me re-check what I'm testing
20:15 sm stef204: no, one darcs hub repo == one filesystem repo
20:15 Heffalump stef204: seems to work for me with subfolders too
20:24 stef204 Heffalump: ok. something wrong on my box perhaps then. i think i must be hitting some typeof edge case
20:24 stef204 the way things are setup here. idk
20:24 stef204 sm: can you explain your last comment please?
20:26 sm stef204: sorry, I was repeating what lelit already said (one-to-one relation)
20:27 stef204 sm: no worries. My understanding after back and forth with lelit was it was correct to initiate dir1 as repo (and only dir1) and then add and push the subdirs (each containing a project) to that darcs hub repo
20:27 stef204 because all of those projects are related
20:28 stef204 and are package builds
20:28 stef204 on totally different projects, create new repo
20:29 sm sounds fine
20:29 sm if you ever want to split the repo up into multiple ones, it's easy unless you have commits spanning multiple subdirectories
20:30 stef204 sm: ok, and again, I could be totally wrong, not a problem. totally open to a better way
20:30 stef204 it's a bit like guys tracking their dotfiles
20:31 stef204 you can't realy create a repo for each application your use.  one repo for bashrc one repo fo rzshrc one for tmux, whatever. YOu create one single repo called "dotfiles" and push all those files to it, even if some are inside subdirs
20:31 stef204 at least, that;s how I understand it, for better or for worse
20:32 stef204 again, if that is wrong, especially with darcs, please correct me.
20:33 sm I think you are right. git can keep the .git/ directory somewhere else, but darcs assumes _darcs is in the working copy
20:38 Riastradh joined #darcs
20:39 stef204 sm: oj i missed your comments about splitting it later on. Not sure what you mean by spnning multiple dirs.  Each of the commits are specific to each project. I make and record them that way. There will be lots of commits for lots of those subdirs.
20:40 stef204 all under the dir1 local repo. Perhaps that's what you mean by spanning multiple subdirs?
20:41 stef204 or do you mean 1 commit would apply to several subdirs at once?
20:41 sm yes, if you ever changed two suprojects and recorded that as a single commit, that would make it harder to split up the repo in future
20:41 stef204 right ok, makes sense
20:42 stef204 well I have no plans on not splitting the commits by subdirs/project, although I may make some mistakes in the future and forget thie caveat
20:42 sm yes, that can happen
20:43 sm it maybe still possible to split, just not as easy
20:43 sm since darcs has a rebase command now
20:43 stef204 I think i'll be oK. prob the best thing for me is to do a few of these projects with current setup and it should become apparent to me if I am going down the wrong path
20:43 sm yup! +1
20:44 stef204 I will be able to redo with mutiple repos in that case, with minimal effort
20:53 stef204 Heffalump: this is what I am talking about http://codepad.org/tpgBTQ8o
20:53 stef204 a real mess here
20:54 stef204 i just did darcs add<tab> and the above is th result
20:54 stef204 *the
20:54 sm stef204: have you been using multiple users ? eg doing some things as root ?
20:55 stef204 sm: no
20:55 sm interesting!
20:55 stef204 although in that entire tree structure, there are files with root permissions as built in fakeroot
20:56 stef204 but Iam not tracking these files at all
20:56 stef204 like some of the binaries which the scripts (which I AM tracking) build
20:56 sm you could replicate the entire tree with simple mono-ownership and read permissions and see if the problem goes away
20:57 sm I mean, it seems the cause must be something of this kind
20:57 lelit with "I'm not tracking" do you mean that you configured .boring so that they are excluded, or simply that you are not going to include them?
20:57 sm if you can figure out what darcs command the autocompleter is running, that'd be easier to troubleshoot of course
20:58 stef204 lelit: not inclusing them "manually" meaning will not track them
20:58 lelit because by its nature the "add" command will look for thing /not already/ tracked
20:58 stef204 I can't figure out how to use --boring properly on this type of tree
20:58 stef204 lelit: yes, I think that sm has got a very god point
20:59 stef204 let me put it to the test and replicate the tree structure with only 600 perms and my ownership only
20:59 stef204 i bet you problem will go away
20:59 * lelit nods
21:00 stef204 3.8 GB's tho, crap
21:02 sm haha, no. Just find out what the completer is running so you can do that
21:02 sm watch top or something
21:02 lelit wrt the boring file, you can either use the per repo "local" configuration or create a versioned text file, say "/.boring" and then "darcs setpref boringfile .boring"
21:03 lelit the content is a regexp per line, things matched will be ignored
21:03 stef204 lelit: nice
21:03 lelit the defaults is under _darcs/prefs
21:03 sm (and if you're not doing autocompletion right now, ignore me; I saw you talking about it earlier)
21:09 stef204 i dt think not the perms
21:09 stef204 i mean those don't hep if set to 600 with ownership root, obviously
21:09 stef204 but i just tried this
21:09 stef204 i replicated the tree partially
21:10 stef204 and made sure all files owned by me:user and 755
21:10 stef204 i cd'ed into a subdir
21:10 stef204 like ttf-font/
21:10 stef204 darcs add<tab> crashes with the message  i sent to pastebin above
21:11 stef204 then in same subdir I did: darcs init
21:11 stef204 and then darcs add<tab> works
21:11 sm stef204: that suggests the problem is an unreadable _darcs in a parent directory
21:12 stef204 it showsm all the files AND subdirs of the subdir which is the small repo I just created
21:12 stef204 well usually I use it the other way where I will be in dir1 which has been initialized as the repo
21:13 stef204 then darcs add dir1/subdir2
21:13 stef204 then darcs add<tab> this crashes
21:13 stef204 so I am in the dir which is the repo with the _darcs dir in it
21:13 stef204 this is confusing
21:13 sm man, I shouldn't be armchair debugging
21:14 stef204 the other way also crashes
21:14 sm sometimes you're in a directory with no _darcs and forgot there's a _darcs somewhere higher up, which darcs will use. But probably that's not your problem
21:14 stef204 meaning, i am in dir1/subdir2 with no _darcs, and atucomplete crashes there
21:15 stef204 I should be more methodical in trouble shooting
21:15 stef204 i am all over the place now
21:15 stef204 and prob not makeing much sense
21:15 stef204 tired
21:15 sm lelit: do you know what's going on ?
21:16 sm stef204: what command does darcs add<tab> run ?
21:16 stef204 as i said, i may be hitting an edge case because of the way i do things (incorreclty perhaps) in relation to the one repo only or each projects with its own repo
21:17 stef204 sm: not sure, I mean it should just run that literally
21:17 stef204 how do I check?
21:17 sm did you do some setup to make autocompletion work ?
21:18 stef204 sm: no, it is already enabled via zsh config by default
21:18 stef204 but the problem is present also with Bash
21:18 sm what does zsh do to find completions for "darcs add" ?
21:19 stef204 let me look at file
21:19 * sm reads http://zsh.sourceforge.net/FAQ/zshfaq04.html
21:20 stef204 https://ptpb.pw/hIiN
21:20 sm great
21:22 sm so in the directory where it's failing, do "darcs --commands" and "darcs add --list-option" work ?
21:22 stef204 checking
21:22 lelit uhm
21:23 lelit does it make any difference if you do "darcs add ./<TAB>"?
21:24 sm wow, darcs add --list option prints a lot of junk
21:24 stef204 darcs: .: getDirectoryContents: permission denied (Permission denied)
21:24 stef204 on the --list-options
21:25 sm darcs add --listoption seems proken
21:25 sm mkdir a; cd a; darcs add --list-option -> "missing _darcs directory"
21:26 lelit if you have no upper repo you mean?
21:26 stef204 lelit: yes, with the./<tab> it works
21:26 sm --list-options should work even if not in an initialised repo
21:26 stef204 that becomes zsh autocompletion
21:27 lelit good, that's what that config is looking for indeed
21:27 lelit it does not "understand" plain foo/ just ./foo/
21:27 stef204 apparently
21:28 stef204 which config are you refering to? darcs or the zsh autocompletion file?
21:28 lelit the zsh completion script you posted
21:28 sm the problem is the last case in https://ptpb.pw/hIiN, where it calls --list-option (short for --list-options). This flag (a) fails if you're not in a darcs repo and (b) if you are, seems to walk all directories recursively and fail if any are unreadable
21:28 lelit sm, well, *one* problem ... :)
21:29 sm and (c) it prints all those recursive subdirs as "options"
21:29 lelit (c) is right IMHO, if you are "adding", isn't it?
21:30 Heffalump if anyone cares, darcs doesn't build with GHC 8.2.1-rc1 because of https://ghc.haskell.org/trac/ghc/ticket/13528, looks like that'll be fixed in the next RC. All the dependencies were fine with just --allow-newer=base though
21:31 lelit evenif it should probably be better to limit the depth to one level more than what's already versioned
21:31 sm the --help for --list-options says it lists options and commands
21:32 lelit dunno the intention, but it seems right for autocompletion needs
21:32 sm I don't think so.. we're completing a command name here
21:32 lelit doing "darcs add TAB" I would like to see either "add options" or "potentially addable files"
21:32 sm the case above that one is for completing file paths, and zsh doesn't need darcs' help with that
21:33 lelit not what I seem to understand from that script
21:33 lelit the command is already completed in the last case
21:34 stef204 as soon as i use the ./ it reverts to zsh normal autocompletion
21:34 lelit that is, you hit the TAB after a space after the command
21:34 stef204 this is no longer the darcs autocompletion
21:34 lelit ie "darcs add TAB"
21:34 stef204 i am fairly sure of it
21:34 sm ok, I might be wrong on that. But anecdotally, shells have no trouble completing file paths and don't need darcs to be helping with that (especially if it breaks)
21:34 lelit yes, that's the second last case
21:34 stef204 if I hit a space after add and then tab, crashes
21:36 lelit I think we are mis-comunicating here :)
21:37 lelit what I mean is that if I hit "TAB" after "darcs add " I want/expect to see the list of possible options + the list of possibly addable files
21:38 lelit and that's what the last case in that script should be doing, using "darcs add --list-options"
21:38 stef204 i understand.
21:39 lelit that would give darcs the chance to omit boring stuff, otherwise zsh should learn about that to do the right thing
21:39 sm in any case, we can probably agree that it shouldn't die due to unreadable files ?
21:39 lelit oh, that for sure :)
21:39 sm and it shouldn't require that you're in a darcs repo
21:40 stef204 like this? http://codepad.org/csRPzFsZ
21:40 sm and it shouldn't recurse without limit, or in stef204's huge tree it appears to hang
21:40 stef204 this ONLY work in a darcs repo
21:40 lelit yes: that happens to me too, if I try that in say /tmp
21:40 stef204 lelit: the crash/error message?
21:41 sm stef204: yeah, I gave a one-liner reproducing it above
21:41 lelit sm, nods again on that too
21:42 sm perhaps options plus non-added non-ignored files in the current directory is appropriate
21:42 sm ie no recursing
21:43 stef204 well, would be nice to recurse thru subdirs if there are non-added files there as well
21:43 stef204 but not sure
21:43 lelit or more general, just reach a depth+1 relatively to current versioned dir
21:43 stef204 again, my experience is limited
21:43 stef204 or maybe be able to set the depth?
21:43 sm stef204: is that level of completion supported with other vcs's ?
21:43 lelit so, if "subdir" is already versioned, it should list a new file "subdir/newfile.txt"
21:44 stef204 i am not sure, i hate git (TM)  and I don't use anthing else at the moment
21:44 stef204 I should start a hashtag #ihategit on twitter
21:44 sm I wouldn't expect that to work, but I might be behind the times on these smart autocompleters
21:44 stef204 i wonder how popular it would be
21:45 sm anyway, at least it's no longer a mystery, and you could file a bug report if you like
21:45 stef204 sm: I think I will.
21:46 stef204 thanks to you guys for feedback
21:47 lelit a quick test with git: "git add TAB" outside a repo gives nothing, while within a repo it expand one single level of the hierarchy
21:48 sm np stef204, later all
21:53 stef204 lelit: interesting
21:54 stef204 joined #darcs
21:58 stef204 have to run, later.
21:58 Cthulhux hmm.. openbsd 6.1 comes with darcs 2.10 :< oh my.
22:01 Mysterious_Ligh1 joined #darcs
22:02 lelit cd
22:35 Mysterious_Ligh1 \quit
22:35 Mysterious_Ligh1 left #darcs

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