/srv/irclogs.ubuntu.com/2013/02/14/#launchpad-dev.txt

=== wedgwood is now known as wedgwood_away
StevenKwgrant: http://pastebin.ubuntu.com/1647128/ is that what you meant?00:12
wgrantStevenK: Yeah00:15
StevenKwgrant: https://code.launchpad.net/~stevenk/launchpad/new-branch-search/+merge/147840 is updated00:19
wgrantcjwatson: Not going to take care of soyuz.derived_series_sync.enabled too?01:27
cjwatsonI tend to do one flag at a time or it gets too tangled for my poor brain, esp on three hours of sleep01:28
cjwatsonBut I guess if you like.  When was it enabled everywhere?01:28
cjwatsonAnd same question for soyuz.derived_series_upgrade.enabled01:29
wgrantderived_series_upgrade isn't enabled anywhere, I don't think01:40
=== micahg_ is now known as micahg
wgrantcjwatson: soyuz.derived_series_sync.enabled was enabled on 2011/08/16, but I don't think derived_series_upgrade ever was01:47
wgrantSo derived_series_sync can probably be turned on unconditionally01:47
cjwatsonYeah, was just digging that out01:47
cjwatsonAgreed01:47
cjwatsonNow I remember the QA saga that that was01:47
cjwatsonAnd https://lists.ubuntu.com/archives/ubuntu-devel-announce/2011-July/000877.html01:48
cjwatsonwgrant: Done02:05
wgrantcjwatson: Thanks.02:28
* wgrant goes on a review sptree02:28
* StevenK waits for his review to bubble to the top02:47
StevenKwgrant: The field needs to be lowercased too.03:05
StevenKwgrant: Uh?03:05
StevenKwgrant: field is just Branch.name or Branch.unique_name03:06
StevenKwgrant: I dropped the CountableIterator since the only real callsite of search is the branch vocabs, and they wrap what is returned in a CountableIterator03:07
wgrantStevenK: The field needs to be lowercased03:10
wgrantunique_name and name are not lowercase implicitly03:10
wgrantSo matching a lowercase value against them will make some things impossible to find03:10
wgrant(and it won't use the index)03:10
StevenKOh, I can't use field.contains_string ?03:10
wgrantYou might be able to use field.lower().contains_string03:11
StevenKYeah, that looks good03:12
StevenKwgrant: Right, everything addressed with the exception of CountableIterator, since I'm ignoring that03:13
wgrantYou addressed that.03:13
StevenKI meant addressed in terms of code changes03:14
StevenKwgrant: http://pastebin.ubuntu.com/1647698/03:14
wgrantStevenK: s/http/http:/? And what happens if the URI fails to parse?03:17
wgranteg. http:hahahahhaveanoops03:17
StevenKwgrant: No, I want to deal with http://bazaar.launchpad and https://code.launchpad03:18
StevenKI could use or03:19
wgrantAh, right03:19
wgrantStill need to handle URI parse failures03:19
StevenKwgrant: I should catch the InvalidURIError and return [] ?03:21
StevenKNone, I guess, since only search calls _getExactMatch03:22
wgrantYeahj03:22
StevenKWhich means we'll try and match it against name, but eh03:24
StevenKwgrant: http://pastebin.ubuntu.com/1647727/03:25
wgrantStevenK: Oh, bzr+ssh too maybe?03:26
wgrantMaybe just try to parse the whole thing as a URI03:26
wgrantAnd extract the path03:26
wgrantIgnoring scheme03:26
StevenKI hadn't considered bzr+ssh03:27
wgrantThough lp: doesn't have a host, so it's a bit special03:27
StevenKwgrant: So I can reflow _getExactMatch to do lp: or ~ and then just parse the whole thing03:28
wgrantActually, lp:foo passes to foo as the path03:29
wgrantSo no special handling required03:29
StevenKExcept that getByUniqueName won't work03:30
wgrantAh, indeed03:33
StevenKwgrant: http://pastebin.ubuntu.com/1647748/03:35
StevenKwgrant: I can write a bzr+ssh test if you wish03:35
wgrantStevenK: Oh03:36
wgrantIf you're just going to look up by URL anyway then why do you need the lp: special acse?03:37
wgrantIf you remove that the first thing it will do is try it as a URL anyway...03:37
StevenKExcellent point03:38
wgrantAnd if it starts with ~ then the URL lookup will fail03:38
StevenKwgrant: http://pastebin.ubuntu.com/1647760/03:38
wgrantSo it will try to find it as a unique name...03:39
StevenKAh, but it will try and parse it as a URI03:39
StevenKWhen it isn't03:39
wgrantAnd?03:39
wgrant+            path = URI(term).path[1:]03:39
wgrantis probably wrong03:39
wgrantMight want .strip('/') instead03:39
wgrantRather than just dropping the first character03:39
wgrant(which will fail for lp:foo)03:39
StevenKlp:foo won't get there03:40
StevenKThat's handled by the .getByUrl call03:40
wgrantTrue03:40
wgrantBut still03:40
wgrant[1:] is evil and pointless03:40
wgrantAnd easily avoidable :)03:40
StevenKURI('~launchpad-pqm/launchpad/devel')03:40
StevenK== InvalidURIError03:40
wgrantSure03:41
wgrantI03:41
wgrant'd hope so :)03:41
StevenKRight, so the term.startswith('~') has to stay then03:41
wgrantThat's a uniquename03:41
wgrantOh03:41
wgrantBut failing to parse as a URI short-circuits out now03:41
wgrantThat's probably wrong03:41
StevenKexcept InvalidURI can do path = term if you wish03:42
wgrantExactly03:42
StevenKwgrant: Now that you've made me rewrite _getExactMatch :-) http://pastebin.ubuntu.com/1647772/03:45
wgrantStevenK: Sounds reasonable03:46
StevenKwgrant: So, bzr+ssh search test, or commit and land it and its index friend?03:47
wgrantPerhaps the latter03:48
StevenKwgrant: Okay, now that I'm off the phone, I'll land them both03:54
wgrantGreat03:55
wgrantStevenK: You've tested the latest code on DF?03:55
wgrantStevenK: To confirm that it uses the indices?03:55
StevenKSpoil my fun03:56
StevenKwgrant: Indices recreated, code updated04:03
StevenK0.8 seconds04:04
StevenKFor a search of PAD/DEVEL04:04
wgrantThe plan is the more interesting bit04:04
StevenK               Index Cond: (lower(unique_name) ~~ '%pad/devel%'::text)04:08
StevenK Total runtime: 152.058 ms04:08
wgrantRight04:08
wgrantSeems sensible04:08
StevenKAnd faster04:08
* StevenK sadfaces at buildbot04:51
=== almaisan-away is now known as al-maisan
adeuringgood morning08: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!