- Needed to patch fastimport (see fastimport.patch)
- Switch to bzr directory
git init
bzr fast-export --plain . | git fast-import
rm -rf .bzr
git log --format=%H --first-parent > hashes
tac hashes | tail -n +2 > reversed_hashes
- Determine initial commit (we'll refer to it as $initial_commit)
git checkout $initial_commit
- `git checkout -b top-level-commits
cat reversed_hashes | xargs -I % bash -c "git cherry-pick % || git cherry-pick -m 1 %"
- Create a new repo on git repo on any service (refer to address as $repo_addr)
git remote add origin $repo_addr
git push origin top-level-commits:master
Created
April 10, 2017 16:59
-
-
Save larryprice/85590b3565387b30ed12111b143e3adf to your computer and use it in GitHub Desktop.
Migrating libertine repos from bzr to git
This file contains 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
--- commands.py 2016-04-18 22:24:36.000000000 +0300 | |
+++ /usr/lib/python2.7/dist-packages/fastimport/commands.py 2017-04-10 17:17:41.473457256 +0300 | |
@@ -501,11 +501,11 @@ | |
else: | |
sep = b' ' | |
- name = utf8_bytes_string(name) | |
+ #name = utf8_bytes_string(name) | |
email = fields[1] | |
- email = utf8_bytes_string(email) | |
+ #email = utf8_bytes_string(email) | |
return b''.join((name, sep, b'<', email, b'> ', ("%d" % fields[2]).encode('ascii'), b' ', offset_str)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment