Last active
January 4, 2016 20:29
-
-
Save usmonster/8674126 to your computer and use it in GitHub Desktop.
Steps to export Vesuvius from LP to GH. Result here: https://github.com/usmonster/vesuvius-test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Steps to export Vesuvius from LP to GH. | |
# Replace [username] and ~/path/to/vesuvius with the appropriate values. | |
# NOTE: This is NOT a script, but a series of commands you should run by hand. | |
# Also, much of this was found on http://flexion.org/posts/2012-10-migrating-bzr-to-git.html . | |
# get the tools | |
sudo apt-get update | |
sudo apt-get install bzr-fastimport # adds fast-export to bzr if you don't already have it | |
sudo apt-get upgrade git # make sure git is the most current! | |
# initialize an empty local git repo | |
mkdir vesuvius-test.git | |
cd vesuvius-test.git | |
git init | |
# Now go to https://github.com/new and create an empty repo named vesuvius-test . | |
# Make sure the description includes a link to the official main project page. | |
# export vesuvius from your local bzr checkout to the new local git repo (tell me if you see errors) | |
bzr fast-export --plain /path/to/vesuvius | git fast-import | |
git reset --hard # get the actual files to show up | |
# migrate .bzrignore to .gitignore | |
git mv .bzrignore .gitignore | |
echo >> .gitignore | |
echo "# Keep empty directories:" >> .gitignore | |
echo "!*/.git*" >> .gitignore | |
# adds .gitkeep file to empty directories so git doesn't exclude them | |
#find -empty -type d -not -iwholename '*.git*' -exec touch '{}/.gitkeep' ";" | |
#git add **/.gitkeep | |
## ^unnecessary, but found one directory after doing a manual find on the bzr branch: | |
mkdir vesuvius/www/pingfm | |
touch vesuvius/www/pingfm/.gitkeep | |
git add **/.gitkeep | |
# commit the newly migrated repository | |
git commit --all -m "Migrated from Bazaar to Git." | |
# OPTIONAL: reset index, cleanup & optimize the local repo (recommended somewhere) | |
git rm --cached -r . | |
git reset --hard | |
git gc --aggressive --prune=now | |
# ALMOST THERE: Do a sanity check now before proceeding. | |
# FINALLY: push the repo to GitHub | |
git remote add origin [email protected]:[username]/vesuvius-test.git | |
git push origin master | |
# You're done(ish)! Check GitHub and ask someone to do a local checkout and run all tests. | |
# NEXT STEPS: | |
# - When you're satisfied, rename the project from vesuvius-test to vesuvius. | |
# - Keep the LP branch around, but maybe freeze it and update the description to point to GitHub. | |
# - Add official team members at https://github.com/[username]/vesuvius/settings/collaboration . | |
# - Make sure the email address they used on LP is also verified on their GH account. | |
# - Ask Fran to make and populate an official vesuvuis GH team: https://github.com/orgs/sahana/teams | |
# - Coordinate transferring repo ownership to Sahana: https://github.com/[username]/vesuvius/settings | |
# - At some point you may want to migrate all the LP issues and blueprints into GitHub issues. | |
# - Consider migrating or disabling the wiki, if that's what is wanted. | |
# - Investigate writing a webhook for Pootle stuff: https://help.github.com/articles/post-receive-hooks | |
# - Other stuff I haven't thought of ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One possible issue to note is that not all commits are associated with an email address:
git shortlog -es|sort -rn |grep -Ev "@.+\."
yields
There are ways to rewrite commit authors' email addresses in the git history (by careful use of
git filter-branch
), but it should be done before the official repo is ever pushed to or made public, if it is done at all. It might be important to make sure that all contributors have signed the CLA and that their commits are correctly associated with their email addresses.