Please set default reviewer for all official branches to ubuntu-dev

Asked by James Westby on 2010-02-10

Hi,

I need some help with updating old branches to a new state. I can do this over the API,
but it's terribly inefficient.

I'd like to set the reviewer for all branches linked to Ubuntu source packages to ~ubuntu-dev.

I'm doing it for all new branches now, I just need a hand catching up with the existing
branches.

It should be a chunk of SQL that isn't too hard.

Thanks,

James

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
2010-02-10
Last reply:
2010-02-10

I think this SQL does the job:

update branch
   set reviewer = (select id from person where name = 'ubuntu-dev')
 where id in (select branch.id
                from branch, seriessourcepackagebranch, distroseries, distribution
               where distribution = 'ubuntu'
                 and distroseries.distribution = distribution.id
                 and seriessourcepackagebranch.distroseries = distroseries.id
                 and branch.id = seriessourcepackagebranch.branch);

Sorry,

update branch
   set reviewer = (select id from person where name = 'ubuntu-dev')
 where id in (select branch.id
                from branch, seriessourcepackagebranch, distroseries, distribution
               where distribution.name = 'ubuntu'
                 and distroseries.distribution = distribution.id
                 and seriessourcepackagebranch.distroseries = distroseries.id
                 and branch.id = seriessourcepackagebranch.branch);

Maybe you can get a losa to run this on staging and see if it does what you want tomorrow?

Can you help with this problem?

Provide an answer of your own, or ask James Westby for more information if necessary.

To post a message you must log in.