=== bob2 [rob@bob2.user] has left #launchpad [] === kiko-afk is now known as kiko === Kinnison is now known as Kinni|ZZZ === kiko is now known as kiko-afk === stub is a bad, bad person who shall be spanked [05:55] Merge to thelove@canonical.com/bazaar--devo--1.0: baz cacherev is now much smarter. 'baz cacherev (|patch-level|FQ(PN/VN)) now works' (patch-65) [06:36] http://www.gnu.org/software/gnu-arch/ <-- The GNU Arch logo is a squid taking a crap??? === Kinni|ZZZ is now known as Kinni|Car [09:52] stub: wrong window? /msg wife net time :-) [09:52] next [09:54] lifeless, SteveA: i'd like to get rid of the arch tags, but understand we don't want to lose changes in the process [09:54] can i suggest that the process be to move the offending file to filname.py.oldtag, then copy it to the new filename and remove the tag [09:54] we can remove the oldtag files once we are happy it won't lose changes [09:59] stub: still around? [10:00] yo [10:02] any chance of a dogfood code update today? [10:03] sure [10:03] thanks, i'mkeen to start polishing the malone UI and get feedback [10:04] Last update was yesterday [10:13] i made some more tweaks last night [10:13] does it take a long time to rev it? [10:14] also, i'm trying to make newsampledata, has the procedure changed? [10:20] i did a "make" in the db/schema dir, then made my changes, then "make newsampledata", and the changes did not show up in the newsampledata [10:20] stub: ^ ? [10:21] Its a fairly quick and painless procedure [10:21] erm, sorry, i'm an idiot [10:21] I'm not aware of any sampledata changes [10:21] i was making the vchanges on the dogfood server, no wonder it didn't show up on my localhost :-) === Kinni|Car is now known as Kinnison [10:32] SteveA, stub: is there any way to make widgets context-aware [10:33] for example, if we have already selected an upstream product, then when it comes to selecting packages, we should pre-show a shortlist of packages for those products [10:33] Morning [10:34] sabdfl: A widget can get its context, as can a named vocabulary [10:34] ok, that's the context that it's running on [10:35] can that be used to share information between cooperating widgets? [10:35] hmm... no it can't [10:35] because that all has to happen client side, really [10:35] unless we make popups the default, and make the popup check the context too [10:36] here's the example: the "add a bug" form [10:36] sabdfl: I think a widget might be able to locate other widgets in the same form, but you are right in that it would involve resubmitting the form [10:36] it has the bug details, then the upstream, then the package selector [10:36] I think this is might example you are stealing ;) [10:36] it would make sense that the package selector would learn from the upstream product selector [10:36] might example? [10:36] c/might/my [10:37] ry [10:37] using popups this could still work though [10:38] when the popup selector pops, does it contact the server at all? [10:38] Yes - we would define a customized popup so that it interrogates the parent form for the product and only displays the available sourcepackages. [10:38] can't *only* display the available sourcepackages [10:38] sabdfl: Yes - the popup window is a view on the page it was loaded from (the editform or addform view) [10:39] would have to allow you to search because we are not certain that every package and upstream is already in the db [10:39] and besides, a bug could affect two unrelated packages [10:41] So the popup would default to showing the best guesses (if possible), but search is still possible? === carlos [~carlos@69.Red-80-33-181.pooles.rima-tde.net] has joined #launchpad [10:45] sabdfl: I think it would be fine to do what you suggest to all the files that have tags. [10:46] the important thing is that files don't just disappear altogether === lulu [~lu@217.37.231.28] has joined #launchpad [10:53] Morning lulu [11:05] kinnison: :o) again! [11:18] I need to add a whatever it is called (MultipleJoin ?) to the DistroRelease class in order to get at the DistroArchRelease objects related to it. How do I do that, given that DistroRelease is defined with the _columns = [] syntax ? [11:27] Kinnison: you can see an example at lib/canonical/launchpad/database/person.py [11:28] # RelatedJoin gives us also an addLanguage and removeLanguage for free [11:28] languages = RelatedJoin('Language', joinColumn='person', [11:28] otherColumn='language', intermediateTable='PersonLanguage') [11:28] _emailsJoin = MultipleJoin('RosettaEmailAddress', joinColumn='person') [11:28] def emails(self): [11:28] return iter(self._emailsJoin) [11:29] carlos: Right [11:31] So... [11:31] _archJoin = MultipleJoin( 'DistroArchRelease', joinColumn='distrorelease' ) [11:31] def architectures(self): [11:31] return iter(self._archJoin) [11:31] allows me to do something like: [11:32] for dar in dr.architectures(): [11:32] pass [11:32] yes? === doko [doko@dsl-082-082-213-028.arcor-ip.net] has joined #launchpad [11:36] Kinnison: I think so [11:37] cool; I'll try it later when I have a db to try it on :-) === Kinnison gets on with writing interfaces to fake that up again :-) [11:37] Kinnison: the "_archJoin" thing is only needed if you are exposing that in the interface [11:38] oh? Otherwise what should I do? [11:38] if it's for internal use, you can use it directly with other name [11:38] just architectures = MultipleJoin ... [11:38] oh righty [11:41] so... [11:41] architectures = MultipleJoin( 'DistroArchRelease', [11:41] joinColumn='distrorelease' ) [11:41] let's me do [11:41] for dar in dr.architectures: [11:41] pass [11:41] ? [11:42] I've just done the dogfood update [11:43] elmo: ping? [11:45] Kinnison: yes [11:45] Kinnison: it looks like an attribute but it's a method [11:45] carlos: cool [11:45] or a kind of [11:45] Heh [11:45] that's how I see it, not sure if I'm wrong but it works that way :-) [11:48] >>> dr.architectures[0] .architecturetag [11:48] u'i386' === Kinnison owes carlos a beer [11:48] Kinnison: ;-) [12:17] carlos: how is https://wiki.canonical.com/RosettaToDogfood going? [12:17] SteveA: don't know, I left on Thursday to attend a GNOME conference, I gave to daf a scritp to import the users into the dogfood server [12:18] SteveA: we had a problem with it and spiv was looking at it [12:18] ok, let's ask daf when he is here. [12:18] I need to talk today with spiv and daf to know the status [12:18] andrew is on vacation now [12:18] you won't be able to talk with him [12:18] ok [12:18] do you know what the problem was? [12:19] the transactions were not working [12:19] the import was done, but it was never committed [12:19] spiv said he saw it before but he was not able to reproduce it [12:19] until we gave him our script [12:21] I can see that this is a problem with zopeless setup that needs fixing. but it should not stop actually moving rosetta to use the dogfood server. [12:21] the script could have explicit transaction handling in it [12:22] SteveA: If I do that, the script breaks [12:22] let me execute it and show you the error... [12:24] ok [12:25] If I have been hacking on a pile of stuff and then I realise that I need to undo about four changes to a dir; commit everything else; then get that bit back; is it possible in tla? [12:28] aah buggrit; it can go as one uberchange and then I'll carry on hacking :-) [12:30] hmmm, it does not gives an error now, but the data is not stored [12:31] wait [12:31] ok [12:31] SteveA: it's fixed [12:31] I was looking at the wrong database [12:32] SteveA: it should work now if it's executed in the dogfood database [12:32] ok. is there anything else standing in the way of getting rosetta to use the dogfood system today? [12:33] have the changes to virtual hosting set-up been discussed with elmo? [12:36] SteveA: don't know, that's the only thing that remains to move to dogfood server as soon as the script is executed in the new server [12:37] are we moving then to launchpad.domain or will we still use rosetta.domain? [12:40] to users of the system, it will appear the same as before [12:41] ok [12:51] ok, bug assignment is looking a LOT better now [12:51] SteveA: in tal, how can is set an attribute to an element if something on the context is True? [12:54] you mean an attribute in the xml sense? [12:54] yeah [12:55] Okay; I've finally seen it too many times not to know what it means... what *is* 'tal' ? [12:55] um, you'd say tal:attributes="foo python:context/truevalue and 'something' or None" but that is very ugly [12:55] better to use a method on your view's class [12:56] Kinnison: "Template attribute language". a language expressed as elements and attributes in a particular namespace, used in xml documents to do certain kinds of processing. [12:57] used in wikipedia's wiki implementation, zope, plone, zope3, roundup, and various other places [12:57] SteveA: gotcha [01:02] SteveA: great, thanks, view method it is :-) [01:03] How do I get the equivalent of gdb for python then? E.g. perl -d [01:04] pdb [01:05] we don't seem to install that by default. Or is it a module or something? [01:05] elmo: any chance you can get mawson's archive mirror updated? [01:06] aah it is [01:06] it's a module - see the python docs [01:06] thanks dude [01:06] yeah, I'm doing it now [01:07] Kinnison: neat way: insert the following in your software somewhere. import pdb; pdb.set_trace() [01:07] conventionally it is on one line, statements separated by a semicolon [01:07] this drops you into the debugger where it is executed [01:07] I see === Kinnison tries this [01:08] use 's' to step to the actual point you want [01:08] yep [01:08] use 's' to step, 'n' to skip over the next statement [01:08] 'c' to continue [01:08] and various other things [01:08] use vi or emacs? [01:08] there's a groovy add-on for emacs where you can use the pdb console in one window, and see the code synchronized in another [01:09] and there's a similar but less functional thing for vim somewhere too [01:09] Kinnison: in recent python packages pdb is installed as a binary as well in /usr/bin [01:10] SteveA: About three steps and one print and I worked out what was missing from my code === Kinnison fluffles pdb [01:10] Lua has a similar tool [01:10] wherever you want to drop into the debugger stick debug.debug() [01:11] so if you want to drop into the debugger on every line stick that as a linehook :-) [01:11] I ought to write a better debugger using all that [01:11] pdb is great. jim fulton wrote a howto once called "the debugger is my friend" [01:12] Heh [01:12] What's the equiv of int() for floating point numbers? [01:12] or was it "the debugger is your friend" [01:12] you mean a constructor? [01:12] float() [01:12] coolie [01:12] eww, floats ;-) [01:12] or does str have a method for that? [01:13] SteveA: is it possible to bind a checkbox input and some text, so clicking on the text is like clicking on the checkbox? [01:13] I'm being workraved; bbl after a 'rest break' [01:13] Kinnison: well, that depends on what you want to do. int() constructs an int, and float() constructs a float. Maybe you want to parse strings into ints / floats? [01:13] sabdfl: try making the text a [01:14] ok [01:14] alternatively, enclose the lot in the . But the former is easier to maintain, I think, and clearer. [01:14] it says more clearly what you want. [01:15] doesnt work [01:15] label comes after the input? [01:15] let me do a quick experiment [01:16] SteveA: well yes; I want a float from a string :-) [01:16] SteveA: I.E. given '5.3' I want 5.3 [01:17] sabdfl: my mistake. the "for" has to refer to an id attribute [01:17] id? [01:18] so [01:18] ok, will try, thanks [01:18] Yes; that's right [01:18] Kinnison: float('1.2') [01:18]