/srv/irclogs.ubuntu.com/2014/08/30/#juju-dev.txt

=== mup_ is now known as mup
=== StoneTable is now known as aisrael
=== bodie__ is now known as bodie_
=== bodie_ is now known as Guest39866
=== jcsackett_ is now known as jcsackett
=== meetingology` is now known as meetingology
=== ev_ is now known as ev
=== Guest39866 is now known as bodie_
bogdanteleagahello, could I get another review for https://github.com/juju/testing/pull/29 ?15:33
bodie_bogdanteleaga, the PathChecker is only for checking that the paths are the same, right?  it shouldn't matter whether there is a file there17:15
bodie_I guess the problem is that "C:/Program Files" and "C:/Programming" have a name collision and could be C:/PROGRA~1 and C:/PROGRA~217:16
bodie_but can those really be considered the same *path*17:16
bodie_it's possible that there is a problem with my concept of "path"17:17
bogdanteleagaUmm, it uses os.samefile to check17:18
bogdanteleagaSo it would actually work17:18
bogdanteleagaIt's kind of a workaround for symlinks17:18
bogdanteleagaBecause they don't work on windows17:18
bogdanteleagaAnd yeah it doesn't matter if there's a file there17:18
bogdanteleagaIt's multipurpose17:18
bogdanteleagaIf the path doesn't match it checks if it points to the same file17:19
bodie_no, I know it would work in that case, the question is more whether the files should have to exist for the path to check correctly17:20
bodie_i.e., maybe C:/PROGRA~1 matches both C:/Program Files and C:/Programming17:21
bogdanteleagaIt wouldn't17:22
bodie_well it's not a one-to-one mapping, no, rather a many-to-many, so the concept of comparing those paths is intrinsically problematic unless you compare the underlying files17:22
bodie_my thought is only that perhaps if you're comparing paths, you don't want the actual files to have to exist17:23
bodie_but, it's just a thought :)17:23
bogdanteleagathey don't have to17:24
bogdanteleagaif they don't exist it exits17:24
bogdanteleagaif you follow the logic it first looks at the strings themselves17:25
bogdanteleagaand if they don't match then it looks if both of them point to actual files17:25
bodie_I'm specifically looking at your comment on line 20517:25
bogdanteleagaand only after that if checks whether the files are actually the same file17:25
bodie_thus, the files don't have to exist _unless_ x17:26
bodie_but, I'm saying C:/Programming could a match for C:/PROGRA~1 even if neither file exists17:26
bodie_or PROGRA~217:27
bodie_there's really no way of knowing17:27
bodie_since it's many-to-many name mapping17:27
bodie_I just don't know if the user will expect the files to have to exist in that case17:27
bogdanteleagathey would not match because if they don't exist it would throw that specific error17:27
bogdanteleagathe only case in which you would expect 2 paths to be the same if they contain different strings is the case in which they point to the same file17:28
bogdanteleagaI don't understand exactly what you're getting at here17:28
bogdanteleagathink of specific use cases17:28
bodie_well what you're testing is whether the files match in those cases, not whether the paths match17:29
bodie_and if the files don't exist, and the user is trying to check something about paths, maybe that could be problematic17:29
bodie_however, I'm not truly certain about your intent, so I thought I would just mention it here instead of holding back your review17:29
bodie_as I said -- just a thought :)17:30
bogdanteleagayeah I got that it's just a thought but I wanted to clarify it for you17:30
bogdanteleagathe issue is that if the paths are not the same string-wise the only other possible case is a symlink or hardlink17:31
bodie_hmm, okay17:31
bogdanteleagait's probably only going to get used inside windows tests, but it's also *nix compatible17:32
bogdanteleagathanks for the review, i'll fix that in a bit17:44
bogdanteleagaactually I had a test for that already17:49
bogdanteleagacommented on github17:49

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!