[12:40] I'd like to get a list of all git_repository objects owned by ~usd-import-team with Ubuntu distribution source package targets. [12:41] Does sharing_service.getSharedGitRepositories do what I want? [12:41] How in launchpad do I get an object which has that method? [12:46] in launchpadlib I mean [12:57] tomwardill: ^ please [12:57] rbasak: err, I don't know :) I can have a look after this meeting [12:58] Thanks ;) [13:36] rbasak: lp.git_repositories.getRepositories(target=) [13:36] hmm, no, that's not quite what you want [13:37] I can't see a way other than doing lp.git_repositories.getRepositories(target=~usd-import-team) and then interating [13:37] * tomwardill defers to cjwatson [13:40] I can't think of anything else. [13:40] Presumably a tiny minority of ~usd-import-team's repos *aren't* owned by DSPs [13:41] And sharing_service.getSharedGitRepositories is not what you want, no [13:41] (Fairly sure public repos won't appear there, which will be ~all of them) [14:15] Ah [14:16] I didn't realise that using ~usd-import-team as a target would give me those repositories (I thought the target was the DSP?) [14:16] lp.git_repositories.getRepositories(target=lp.people['usd-import-team']) gives me 5412 entries, so that's probably it. [14:17] I can filter that by Ubuntu DSP client-side - as you say most of them will match. Thanks! [14:23] It's a bit weird and possibly an accident. But a convenient one ... [14:23] Should possibly add an optional owner argument to that [14:24] (My expectation without having checked the code recently would have been the same as yours. But it does IGitCollection(target), and the IGitCollection adapter for Person is .ownedBy) [14:30] To make this go faster, is there any way I can get the self_link for each entry in a collection without loading each entry from LP? I presume that's what happens if I just try to iterate over them? [14:30] I'm really just after a list of the push URL for every repository currently imported by git-ubuntu for a fix-up hack script to chug through them all. So hacks are fine. [14:31] So I can do the filter just by checking self_link.startswith(...). [14:31] And compose the push URL string manually by hacking on the URL. [14:47] rbasak: Each batch of the collection response has the full representation of each of the entries in the batch. You'd only need to optimise that way if you were looking at other objects referred to by those entries. [14:47] rbasak: Have a look at this to see what I mean: curl -s 'https://api.launchpad.net/devel/+git?target=%22%2F~usd-import-team%22&ws.op=getRepositories' | jq -S [14:48] If you just iterate over the collection and only look at immediate properties of the entries in it, you'll make about n/75 requests. [14:49] cjwatson: understood. Thanks!