On 2009-06-13,
I’ve requested the merge of two teams:
https://launchpad.net/~ubuntu-my with https://launchpad.net/~malaysianteam to be https://launchpad.net/~ubuntu-my.
We just want it to be more official Ubuntu Loco team as ~ubuntu-my already been approved as subteam of Ubuntu Local Community Teams and Approved LoCo team rather than ~malaysianteam. It easier to manage ~ubuntu-my such as contact for loco team and LoCo Directory.
So i create a question at launchpad here
After about a month, my question get solved then i manage to merged the two team with the help of Launchpad Team for solving this bugs on Launchpad and also thanks to Andreas Moog for his helpful script and his effort.
So here i would like to share amoog script:
#!/usr/bin/env python
# Copyright Andreas Moog <amoog@ubuntu.com> 2009
# Licensed under the GPL
# coding: utf-8
import os, string, sys
from launchpadlib.errors import HTTPError
oldteam = “malaysianteam”
newteam = “ubuntu-my”
def connect_lp():
# For now, use the staging environment
try:
from launchpadlib.launchpad import Launchpad, EDGE_SERVICE_ROOT
from launchpadlib.errors import HTTPError
from launchpadlib.credentials import Credentials
except ImportError:
print(“ERROR: it seems that python-launchpadlib is not installed”)
exit(1)
launchpad = None
# the credentials and cache-dir used by py-lp-lib
lp_cred = os.path.abspath(‘./lpbinding/moveteams-lplib-cred’)
lp_cache_dir = os.path.abspath(‘./lpbinding/cache’)
# load stored LP credentials
try:
print(“Get Launchpad Settings”)
lp_cred_file = open(lp_cred, ‘r’)
credentials = Credentials()
credentials.load(lp_cred_file)
lp_cred_file.close()
launchpad = Launchpad(credentials, EDGE_SERVICE_ROOT, lp_cache_dir)
except IOError:
launchpad = Launchpad.get_token_and_login(‘moveteams’, EDGE_SERVICE_ROOT, lp_cache_dir)
lp_cred_file = open(lp_cred, ‘w’)
launchpad.credentials.save(lp_cred_file)
lp_cred_file.close()
if launchpad is None:
print(“Something bad happened: I can’t connect to Launchpad
.”)
print(“Launchpad connection is working”)
# TODO: Implement support for arbitrary projects
return launchpad
launchpad = connect_lp()
members = launchpad.people[oldteam].members
for member in members:
print “Adding %s to the team” % member.display_name
try:
launchpad.people[newteam].addMember(person=member, status=”Approved”)
except HTTPError as error:
print “The error %s has occured” % error
Thanks also to Ubuntu-MY LoCo Member for their support and VOTES