[03:13] <handsome_feng> Hi, could someone here handle my request? Thanks! https://answers.launchpad.net/launchpad/+question/670540
[03:48] <wgrant> handsome_feng: Done.
[03:49] <handsome_feng> wgrant: Thank you very much!
[14:44] <Laney> what's the right invocation to change the owner of a git_repository from the API?
[14:45] <Laney> I tried setting 'owner' and calling lp_save() on all the things but it didn't get updated
[14:47] <cjwatson> That ought to work.  Do you have a transcript?
[14:48] <Laney> I'll run it again.
[14:48] <cjwatson> You should just need to call lp_save on the repository
[14:49] <Laney> https://paste.ubuntu.com/p/m4ZGPBFjNC/
[14:51] <cjwatson> gits[0].lp_refresh()
[14:52] <cjwatson> Wait, what is gits in this case?
[14:52] <cjwatson> Can I have a more complete transcript? :P
[14:52] <cjwatson> I bet gits is a collection
[14:52] <Laney> It is, it's from getBranches() or something
[14:53] <cjwatson> Listify it first, or assign gits[0] to a variable
[14:53] <cjwatson> Otherwise the __getitem__ inside gits[0] does a separate fetch from the webservice each time and so forgets your changes
[14:53] <cjwatson> Bit of a gotcha with collections
[14:53] <Laney> Ahh, this is a peculiarity with LP programming that I'm not aware of
[14:53] <Laney> That works, thanks!
[14:54] <cjwatson> np, it's not at all obvious when you haven't encountered it before
[14:54] <Laney> Oh, but I've got to fix the subscribers too
[14:55] <cjwatson> You can call methods without this trick - it's only property assignments that are problematic
[14:55] <cjwatson> Though it may be a good idea anyway to avoid excessive webservice calls
[14:56] <cjwatson> https://help.launchpad.net/API/launchpadlib#Three_things_to_make_your_client_faster has a little trick to see what webservice calls are happening
[15:00] <Laney> That'll be useful, cheers
[15:01] <Laney> Good semantic use of HTTP error codes (409 in this case)
[15:02] <cjwatson> Yeah, the LP webservice is sort of what you get if you go all-out on REST design and kinda forget the performance bit