Hello, We make a simple mini-script to migrate to github from launchpad. (See attachment) Sorry to send it by email. But if you send me the project which should be available this script. I will push it
We migrate from: https://code.launchpad.net/openerp-mexico-localization 2014-06-20 9:46 GMT-05:00 Ovnicraft <ovnicr...@gmail.com>: > > > > On Fri, Jun 20, 2014 at 8:46 AM, Joël Grand-Guillaume < > joel.grandguilla...@camptocamp.com> wrote: > >> Comments in-line: >> >> >> On Fri, Jun 20, 2014 at 3:08 PM, Guewen Baconnier < >> guewen.baconn...@camptocamp.com> wrote: >> >>> Hi community, >>> >>> I want to start to coordinate the transition of the OCA branches to >>> Github. Joël already created all the projects on Github, not without >>> sighs, thanks to him! We still have to create the teams, migrate the >>> code and setup the tooling for the maintainers / reviewers. >>> >> >> => I needed some patience, I confess... >> >> >>> >>> Now, an inventory of what we'll need >>> ==================================== >>> >>> - A place where to write all the docs for maintainers of the projects >>> (the things we will discuss here). I'll try to write the docs, just not >>> sure of the best place to put them. >>> >> >> => For that, I want to strongly suggest to use the Github wiki/README.md >> as the technical docs. This way, every project within the OCA will have: >> > > Totally agree, working in Ecuador Localization in > https://github.com/odoo-ecuador/odoo-ecuador, for example i wrote how to > setup a dev environment ( > https://github.com/odoo-ecuador/odoo-ecuador/wiki/Ambiente-de-Desarrollo) > spanish by now. > >> >> a) A functionnal/business description on the new OCA website >> b) A technical description on github for each repository. >> >> Here is my suggestion : https://github.com/OCA/maintainers-tools >> >> >> >>> - Create a mapping of projects/branches Launchpad → Github that will be >>> used by the scripts >> >> - At some point, push the head 7.0 branch of each Launchpad project to >>> their corresponding Github project as the new 8.0. This can be automated >>> I guess (using the mapping) >>> - Write a script that mirrors the 6.1 and 7.0 branches to Github and >>> setup a cron >>> >> >> > => +1 for all 3 >> > > For this is not extra job for OCA ? at some point automated task can give > us problems, personally i think move from 7.0 to github, yes its a hard > job. BTW stay tuned around script. > >> >> >>> - On Github, each project of the OCA has its own list of committers, >>> there is no way to put the OCA committers automatically in each OCA >>> project. What we'll do is to maintain 1 committer team [0] and to write >>> a script (with a cron) that copies all the members in all the others >>> projects' teams. >>> - We have to decide where the OCA should deploy its tools (like the >>> mirroring script and committers script, and maybe others to come) >>> >> >> => Commit the tools here: https://github.com/OCA/maintainers-tools >> => For running the cron, tow options: >> a) OCA buy something on one of those services : >> http://www.cronjobservices.com/ >> b) Somebody within the OCA offer a server and access to Community >> Maintainers team to setup them >> > > If you want i can setup a machine at rackspace now and give the access. > > > Regards, > >> >> >> -- >> >> >> *camptocamp* >> INNOVATIVE SOLUTIONS >> BY OPEN SOURCE EXPERTS >> >> *Joël Grand-Guillaume* >> Division Manager >> Business Solutions >> >> +41 21 619 10 28 >> www.camptocamp.com >> >> >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~openerp-community >> Post to : openerp-community@lists.launchpad.net >> Unsubscribe : https://launchpad.net/~openerp-community >> More help : https://help.launchpad.net/ListHelp >> >> > > > -- > > [image: Cristian Salamea on about.me] > > Cristian Salamea > about.me/ovnicraft > <http://about.me/ovnicraft> > > _______________________________________________ > Mailing list: https://launchpad.net/~openerp-community > Post to : openerp-community@lists.launchpad.net > Unsubscribe : https://launchpad.net/~openerp-community > More help : https://help.launchpad.net/ListHelp > > -- Moisés López Calderón Vauxoo - OpenERP's Gold Partner Mobile: (+521) 477-752-22-30 Office: (+52) 477-773-33-46 web: http://www.vauxoo.com twitter: @vauxoo @moylop260 hangout: moylop...@vauxoo.com
import sys import os import subprocess import uuid import ConfigParser Config = ConfigParser.ConfigParser() """Config file example [bzr2git_conf] #basename_bzr_branch = addons-vauxoo full_global_path_branches = /Users/moylop260/openerp/bzr2git/addons-vauxoo #All branches from bzr, with name of version github_repository = g...@github.com:Vauxoo/addons-vauxoo.git """ Config.read( sys.argv[1] ) section = "bzr2git_conf" Config.options(section) full_global_path_branches = Config.get(section, "full_global_path_branches") github_repository = Config.get(section, "github_repository") current_path = full_global_path_branches def execute_cmd5(args, working_dir): os.chdir( working_dir) os.system( ' '.join( args ) ) os.chdir( current_path ) path_bzr_branches = current_path listdir = os.listdir(path_bzr_branches) listdir.reverse()#Master first branch, default branch for bzr_branch in listdir: bzr_branch_fullpath = os.path.join( current_path, bzr_branch) bzr_branch_version = bzr_branch.split('-')[0] git_branch_version = bzr_branch_version if git_branch_version == 'trunk': git_branch_version = 'master' if os.path.isdir( os.path.join( bzr_branch_fullpath, ".bzr" ) ): if not os.path.isdir( os.path.join( bzr_branch_fullpath, ".git" ) ): cmd_args = ["git", "init", "." ] execute_cmd5(cmd_args, working_dir=bzr_branch_fullpath) cmd_args = ["bzr", "pull", ":parent"] execute_cmd5(cmd_args, working_dir=bzr_branch_fullpath) cmd_args = ["bzr", "fast-export", "--plain", ".", "|", "git", "fast-import"] execute_cmd5(cmd_args, working_dir=bzr_branch_fullpath) cmd_args = ["git", "checkout", "-f", "master"] execute_cmd5(cmd_args, working_dir=bzr_branch_fullpath) cmd_args = ["git", "checkout", "-b", str( uuid.uuid4() )] execute_cmd5(cmd_args, working_dir=bzr_branch_fullpath) cmd_args = ["git", "push", "--force", github_repository, "HEAD:"+git_branch_version] execute_cmd5(cmd_args, working_dir=bzr_branch_fullpath)
_______________________________________________ Mailing list: https://launchpad.net/~openerp-community Post to : openerp-community@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community More help : https://help.launchpad.net/ListHelp