Perl 6 - the future is here, just unevenly distributed

IRC log for #darcs, 2017-01-12

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

All times shown according to UTC.

Time Nick Message
01:55 mizu_no_oto joined #darcs
02:37 7IZAAB0MW joined #darcs
02:39 drostie_ joined #darcs
02:46 drostie joined #darcs
02:47 ilbot3 joined #darcs
02:47 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:46 mizu_no_oto joined #darcs
03:59 mizu_no_oto joined #darcs
04:17 mizu_no_oto joined #darcs
08:08 lthms joined #darcs
08:19 maerwald joined #darcs
09:30 Weltraumschaf joined #darcs
10:51 Weltraumschaf joined #darcs
13:54 Weltraumschaf joined #darcs
14:12 mizu_no_oto joined #darcs
14:48 gh_ joined #darcs
15:01 Riastradh joined #darcs
17:44 Weltraumschaf joined #darcs
21:18 ph88^ joined #darcs
21:18 ph88^ hi guys
21:19 ph88^ could anyone answer a few questions about darcs?
21:19 ph88^ i would like to know if it matches my use case
21:22 ph88^ hi dolio, do you know if darcs support single file version control ?
21:22 dolio What does that mean?
21:23 ph88^ that you have a version per file
21:23 ph88^ with git it's not possible or difficult because usually you put a bunch of files in 1 repository
21:23 ph88^ then you put the repo on some version and all the files change
21:24 ph88^ but i would like to manage files on individual basis in 1 directory
21:24 dolio Oh I see. You want like multiple 'repositories' in a single directory, one for each file?
21:25 dolio Just keep track of the history of each file independently of all the others.
21:25 dolio darcs is pretty much like git in that respect, I'd say.
21:26 Heffalump well, cherry-picking in darcs means you can easily separate the patches if they only ever touch individual files
21:26 Heffalump so you can record lots of changes to different files in one repo, and then pull just the changes to a single file into another repo
21:27 dolio Yeah, as long as you didn't accidentally commit changes to multiple files in a single patch, you could do something similar to single file version control.
21:28 dolio I don't know how annoying it'd be to have to exclude the files you aren't interested in all the time.
21:28 dolio So it's better than git, that's true.
21:31 dolio I guess if you used a naming scheme for your commit messages, you could pull with a regex to only select the patches to the file you want.
21:32 dolio Or would there already be information in the patch metadata that would be usable for that purpose?
21:33 Heffalump you can use --match 'touch foo'
21:34 Heffalump or something along those lines
21:35 ph88^ Heffalump, how can i pull one file from a repo into a new repo and still keep the connection with the old repo ?
21:36 Heffalump ph88^: darcs repos are just collections of patches, so the connection is implicit
21:36 Heffalump if you pull just the patches touching one file into a new repo, make further changes to that one file, you can still pull those patches back into the old repo
21:36 ph88^ when you changed a bunch of files in a directory how do you make sure you make a version of each one and not all the changed ones at the same time?
21:37 Heffalump ph88^: you'd need to script the record command to help with that, by default the UI will guide you to make a single patch for all the changes
21:37 lelit never used, but the question reminds me http://www.catb.org/~esr/src/FAQ.html
21:37 ph88^ so with a few scripts on top this is actually doable ?
21:38 Heffalump but if you do that, the end result will be better than git, because with git each commit will depend on the previous one whether or not they are touching the same file
21:38 Heffalump ph88^: if I've understood what you want correctly, yes
21:38 ph88^ cool
21:38 Heffalump you don't even need the script if you are discipline (just always use 'darcs record <file>' rather than 'darcs record')
21:39 ph88^ when i made a new version of a file i want to calculate a new semantic version, can i add the semver number to the patch?
21:40 ph88^ Heffalump, just to make sure   when i have a repo and i start with file A and B then: i change file A & record, change file B & record, change file A & record  it's possible to get the latest version of file A without that change in file B ?
21:40 Heffalump I guess so, the patch name is just documentation
21:40 Heffalump ph88^: that's correct
21:41 Heffalump the interactive UI to the darcs pull command will let you choose the two changes to A and not the one to B (give it a go)
21:41 ph88^ cool
21:41 Heffalump or you can use command-line options (I think --match 'touch A') to select them directly
21:41 ph88^ does darcs use a good delta algorithm with compression ?
21:43 Heffalump is this for binaries?
21:43 ph88^ no
21:43 ph88^ source files
21:43 Heffalump it uses patience diff and gzips the result
21:43 Heffalump (if this was for binaries, I'd have told you not to use darcs, it records the diffs in a really horrible way)
21:44 ph88^ what i would like have (either directly or scripted) is a command to update all the files in a directory to their highest minor version like 4.1.2 to 4.1.12. So i would have to iterate on all the files and find all the patches that are within the same major range as the current patch and then apply all the patches
21:45 Heffalump that sounds doable, you'd probably want to impose some naming convention on your patches then
21:46 ph88^ what is normal to use for names as patches ?
21:46 ph88^ is that like a commit message in git ?
21:46 Heffalump yes
21:46 ph88^ maybe the patch name can start with the semver <space> and then the rest of the description ..
21:46 Heffalump right
21:47 Heffalump I think you can use regexps to match on patch names, too, so you might just be able to match on 4.1.* (expressed as a regexp)
21:47 ph88^ yeah nice
21:47 Heffalump oh, but that wouldn't catch 4.0.*
21:47 Heffalump so maybe not that simple
21:48 ph88^ what i need 4.0.* for ?
21:48 Heffalump oh, you would always be starting with the same major version, right
21:48 ph88^ yes either that or  4.*.*
21:48 Heffalump I was thinking if you want to start from some arbitrary lower version and get to a specific major version
21:49 ph88^ after all the patches have been found they still need to be sorted because i want to apply the latest one of course
21:49 Heffalump you'd need to apply all of them up to the one you want, wouldn't you?
21:49 Heffalump for a specific file
21:49 ph88^ yes
21:49 ph88^ but i would need to know which is the latest one
21:50 ph88^ a regex wont tell me this :P
21:50 Heffalump if you pull all the ones that are 4.1.*, then you will implicitly have the latest one of 4.1.*
21:50 Heffalump maybe I'm missing something about your requirements
21:50 ph88^ oh ok
21:50 ph88^ no no it makes sense
21:51 ph88^ does darcs also have some access rights or locking mechanism ?
21:51 Heffalump you might or might not automatically get earlier ones though, it would depend on the patch dependencies
21:51 Heffalump it has locking to stop concurrent writes to the same repo
21:51 Heffalump it doesn't have any access rights control, it's all filesystem based
21:51 ph88^ say one user uses a file from repo A in his own repo B, then makes a changes to that file, then the user who made the file in repo A should be notified to review the change and then the patch should also be applied in repo A
21:52 ph88^ ok so that would have to be scripted on top as well i guess
21:52 Heffalump there's nothing built-in to darcs to handle that, it's just a DVCS - you need to arrange for the second user to tell the first user about it somehow
21:53 Heffalump if you have write access to a repo then you can put anything you want in it
21:53 ph88^ does darcs record author (name, e-mail) like git ?
21:53 Heffalump yes (different UI, same result)
21:54 ph88^ is it also possible to use a file from repo A in repo B without adding it to repo B?
21:55 Heffalump what do you mean by 'use' then?
21:55 ph88^ that the file is in the directory
21:55 Heffalump well, you could copy it, but if you want it under version control you should pull the patch(es)
21:55 Heffalump again, darcs is no different to git in this regard (that I can think of)
21:56 ph88^ i still want to be able to pull new updates from repo A, but i don't want that file to become part of repo b (in some cases)
21:56 ph88^ well git can have submodules
21:56 Heffalump I don't really understand what you mean by "part of" then
21:56 Heffalump having a copy of it and being able to get new copies is what being in a repo means
21:57 ph88^ if you have a submodule (sub repository) in git then you are just pointing to another (single file ?) repository, but the files that are getting checked out are not under version control in the current repository
21:58 Heffalump ok, I sort of see - darcs doesn't have that
21:58 ph88^ that's a vital feature for me to have
21:58 Heffalump but I'd like to understand more about why you actually need that property
21:59 Heffalump can you give an example of something it lets you do (or stops someone from doing that they shouldn't)?
21:59 ph88^ you understand why submodules are used in git ?
21:59 Heffalump to import other people's repositories
21:59 ph88^ yes, so the same here .. just i want to import other people's files
22:00 ph88^ which don't belong in my repo, but i have to use them anyway
22:00 Heffalump but I think you can do that by just pulling their patches directly
22:00 ph88^ ooh ok
22:00 Heffalump if you refrain from editing them, it shouldn't matter that they are directly in your repo, the patches will remain independent of your "local" ones
22:01 Heffalump this is the key feature of darcs that I think works well for what you've been saying - two patches that are independent of each other can be added and removed from a repo in any order
22:01 ph88^ so the local repo keeps track of the patches on a file from an external repo ?
22:01 Heffalump and as long as you never record a patch touching multiple files, the streams of changes to different files will stay independent
22:01 ph88^ sounds wonderful !
22:01 Heffalump it won't really know they are from an external repo, but if you need to know that you can script it (e.g. look at the name/email)
22:01 Heffalump darcs doesn't really care where a patch was recorded
22:02 ph88^ i think the constraints "as long as you ..." could be handled with a layer of scripts
22:02 Heffalump yes, or just training your fingers to be careful
22:02 ph88^ lol
22:02 Heffalump (scripts would be safer, of course!)
22:02 Heffalump you might also be able to use posthooks to validate patches
22:03 ph88^ but hmm in git when you use submodules you can check for updates from the external repo (it's at a git:// address), how are you going to locate that external repo with darcs with only name & e-mail ?
22:03 Heffalump are you looking for some feature where the location of the external repo is stored in version control itself?
22:04 Heffalump in what I've been saying, the external repo is just like any other repo, you can pull from a URL (http, ssh, local filesystem)
22:04 ph88^ yes, the VCS of the local repo should point to the external repo
22:04 dolio I'm not sure there's anything git submodules are used for that scripts can't do.
22:04 Heffalump I see, that might need some scripting then - put the external repo location under version control in the local repo and get your scripts to read it
22:05 ph88^ git keeps track of external repo's in the .gitmodules file. It's basically a mapping from a path to a URI for the repo
22:05 ph88^ ah ok cool
22:06 dolio The only thing I can think of that might be better aboute submodules is due to a git deficiency.
22:07 ph88^ at the moment we are using some proprietary system build on top of the ancient RCS. There are a few problems, but the main problem is that it's just developed by 1 guy who will go into retirement rather sooner than later
22:07 dolio Although I'm no git expert.
22:07 ph88^ also i like more features like semantic versioning i was telling about, we don't have that yet :P
22:08 ph88^ thanks guys
22:10 Heffalump np
22:11 Heffalump feel free to ask any for more help (you might have to wait a bit for a response on here, it's often fairly quiet, or you can use the mailing list)
22:18 ph88^ ok :)
22:18 ph88^ it will be a year at least before i get to this, but i wanted to explore to get some ideas first
22:30 rusua joined #darcs

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