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