=== wedgwood is now known as wedgwood_away [00:12] wgrant: http://pastebin.ubuntu.com/1647128/ is that what you meant? [00:15] StevenK: Yeah [00:19] wgrant: https://code.launchpad.net/~stevenk/launchpad/new-branch-search/+merge/147840 is updated [01:27] cjwatson: Not going to take care of soyuz.derived_series_sync.enabled too? [01:28] I tend to do one flag at a time or it gets too tangled for my poor brain, esp on three hours of sleep [01:28] But I guess if you like. When was it enabled everywhere? [01:29] And same question for soyuz.derived_series_upgrade.enabled [01:40] derived_series_upgrade isn't enabled anywhere, I don't think === micahg_ is now known as micahg [01:47] cjwatson: soyuz.derived_series_sync.enabled was enabled on 2011/08/16, but I don't think derived_series_upgrade ever was [01:47] So derived_series_sync can probably be turned on unconditionally [01:47] Yeah, was just digging that out [01:47] Agreed [01:47] Now I remember the QA saga that that was [01:48] And https://lists.ubuntu.com/archives/ubuntu-devel-announce/2011-July/000877.html [02:05] wgrant: Done [02:28] cjwatson: Thanks. [02:28] * wgrant goes on a review sptree [02:47] * StevenK waits for his review to bubble to the top [03:05] wgrant: The field needs to be lowercased too. [03:05] wgrant: Uh? [03:06] wgrant: field is just Branch.name or Branch.unique_name [03:07] wgrant: I dropped the CountableIterator since the only real callsite of search is the branch vocabs, and they wrap what is returned in a CountableIterator [03:10] StevenK: The field needs to be lowercased [03:10] unique_name and name are not lowercase implicitly [03:10] So matching a lowercase value against them will make some things impossible to find [03:10] (and it won't use the index) [03:10] Oh, I can't use field.contains_string ? [03:11] You might be able to use field.lower().contains_string [03:12] Yeah, that looks good [03:13] wgrant: Right, everything addressed with the exception of CountableIterator, since I'm ignoring that [03:13] You addressed that. [03:14] I meant addressed in terms of code changes [03:14] wgrant: http://pastebin.ubuntu.com/1647698/ [03:17] StevenK: s/http/http:/? And what happens if the URI fails to parse? [03:17] eg. http:hahahahhaveanoops [03:18] wgrant: No, I want to deal with http://bazaar.launchpad and https://code.launchpad [03:19] I could use or [03:19] Ah, right [03:19] Still need to handle URI parse failures [03:21] wgrant: I should catch the InvalidURIError and return [] ? [03:22] None, I guess, since only search calls _getExactMatch [03:22] Yeahj [03:24] Which means we'll try and match it against name, but eh [03:25] wgrant: http://pastebin.ubuntu.com/1647727/ [03:26] StevenK: Oh, bzr+ssh too maybe? [03:26] Maybe just try to parse the whole thing as a URI [03:26] And extract the path [03:26] Ignoring scheme [03:27] I hadn't considered bzr+ssh [03:27] Though lp: doesn't have a host, so it's a bit special [03:28] wgrant: So I can reflow _getExactMatch to do lp: or ~ and then just parse the whole thing [03:29] Actually, lp:foo passes to foo as the path [03:29] So no special handling required [03:30] Except that getByUniqueName won't work [03:33] Ah, indeed [03:35] wgrant: http://pastebin.ubuntu.com/1647748/ [03:35] wgrant: I can write a bzr+ssh test if you wish [03:36] StevenK: Oh [03:37] If you're just going to look up by URL anyway then why do you need the lp: special acse? [03:37] If you remove that the first thing it will do is try it as a URL anyway... [03:38] Excellent point [03:38] And if it starts with ~ then the URL lookup will fail [03:38] wgrant: http://pastebin.ubuntu.com/1647760/ [03:39] So it will try to find it as a unique name... [03:39] Ah, but it will try and parse it as a URI [03:39] When it isn't [03:39] And? [03:39] + path = URI(term).path[1:] [03:39] is probably wrong [03:39] Might want .strip('/') instead [03:39] Rather than just dropping the first character [03:39] (which will fail for lp:foo) [03:40] lp:foo won't get there [03:40] That's handled by the .getByUrl call [03:40] True [03:40] But still [03:40] [1:] is evil and pointless [03:40] And easily avoidable :) [03:40] URI('~launchpad-pqm/launchpad/devel') [03:40] == InvalidURIError [03:41] Sure [03:41] I [03:41] 'd hope so :) [03:41] Right, so the term.startswith('~') has to stay then [03:41] That's a uniquename [03:41] Oh [03:41] But failing to parse as a URI short-circuits out now [03:41] That's probably wrong [03:42] except InvalidURI can do path = term if you wish [03:42] Exactly [03:45] wgrant: Now that you've made me rewrite _getExactMatch :-) http://pastebin.ubuntu.com/1647772/ [03:46] StevenK: Sounds reasonable [03:47] wgrant: So, bzr+ssh search test, or commit and land it and its index friend? [03:48] Perhaps the latter [03:54] wgrant: Okay, now that I'm off the phone, I'll land them both [03:55] Great [03:55] StevenK: You've tested the latest code on DF? [03:55] StevenK: To confirm that it uses the indices? [03:56] Spoil my fun [04:03] wgrant: Indices recreated, code updated [04:04] 0.8 seconds [04:04] For a search of PAD/DEVEL [04:04] The plan is the more interesting bit [04:08] Index Cond: (lower(unique_name) ~~ '%pad/devel%'::text) [04:08] Total runtime: 152.058 ms [04:08] Right [04:08] Seems sensible [04:08] And faster [04:51] * StevenK sadfaces at buildbot === almaisan-away is now known as al-maisan [08:49] good morning === al-maisan is now known as almaisan-away === wedgwood_away is now known as wedgwood === Ursinha_ is now known as Ursinha === deryck is now known as deryck[lunch] === yofel_ is now known as yofel === deryck[lunch] is now known as deryck === wedgwood is now known as wedgwood_away === wedgwood_away is now known as wedgwood === wedgwood is now known as wedgwood_away