Pages

Saturday, July 9, 2011

Migrate BBBS htdocs from bzr to git

I have had been tracking the static pages etc in the BBBS htdocs directory associated with my BBBS install using BZR.  I have primarily changed over to using GIT now but hadn't had a chance to convert that repository until today.  ( Note that this is being done on a Debian v6 system.)

I first tried using tailor to do the migration, as that has worked for me before.  This time, however, it failed with an error message about not being able to rename one of the files for one of the changesets.  I made sure that the repository format was upgraded and tried again but it still failed in the same way. 

Found the following article, which pointed me to a successful way ot doing the migration:
http://doc.bazaar.canonical.com/migration/en/foreign/bzr-on-git-projects.html

Ran the following command lines, with "old-htdocs" being the bzr repository is and "htdocs" being where the new git repostiory is going :

md htdocs

cd htdocs

git init

cd ../old-htdocs

bzr fast-export --htdocs=../htdocs.bzr --git-branch=BBBS-htdocs ../old-htdocs | git fast-import --import-marks=../htdocs.git --export-marks=../htdocs.git

That resulted in the branch BBBS-htdocs being imported in to the new htdocs git repository.


No comments:

Post a Comment