Eric Kow <ko...@darcs.net> writes: > If the exception is not a timeout, we test if the URL is reachable and > whitelist it if so (the whitelist avoids future testing). But why do we > do this? And doesn't that confuse Darcs into thinking it successfully > fetched a file when it did not? Have you tested the actual case where > you get an exception but not a timeout?
I believe that we do this because a 404 could be quite legitimate: the repository could be partially lazy but still have a lot of things we want to use. We don't want to blacklist a source for this reason alone. We also don't want to inspect a source each time it gives a 404, since this is not for free, either. > Also, are there not web server configurations where > http://example.com/foo gives you a 404, but > http://example.com/foo/_darcs/foo gives you a result? What happens in > those cases? In other words, does the test of trying to fetch > http://example.com/foo/ actually make sense? > > Also, why is it important to normalise the URL to have a trailing slash? > Is it just to avoid duplicate entries in the whitelist? I suspect that there are webservers that treat foo/ and foo differently. But I am not saying one is better than the other. Anyway, I think the right thing to look for is foo/_darcs/hashed_inventory (we shouldn't be using caches for non-hashed repositories). I wholeheartedly agree with the indentation issue Eric has pointed out, too. Please try to fit your code in 80-90 columns if possible, although 100 is acceptable and 110 is stretching it but could be forgiven if there's a good reason. : - ) Code that is wider is usually hard to read for almost everyone (or so I guess). Yours, Petr. _______________________________________________ darcs-users mailing list darcs-users@darcs.net http://lists.osuosl.org/mailman/listinfo/darcs-users