| Date: | 2010/03/10 |
|---|---|
| Version: | 0.6 |
To migrate your projects from v1 to v2 you need to understand difference between them.
Project v1 keeps project config in the separate control branch located in .scmproj subdirectory of project root. So project.cfg file actually located in PROJECT_ROOT/.scmproj/project.cfg. Project v1 may or may not have the top-level branch at the PROJECT_ROOT.
Project v2 keeps project config in top-level branch in the root of the project as .bzrmeta/scmproj/project.cfg file. Project v2 therefore always has the top-level branch at the PROJECT_ROOT and don't have separate control branch in .scmproj.
Project v2 does not support neither ALTS nor SUBSETS. So you need to have separate top-level branch for each valid alt/subset pair.
To migrate from v1 to v2 you need to create top-level branch if you don't have one, then create directories .bzrmeta and .bzrmeta/scmproj there, and copy project.cfg from .scmproj control branch to .bzrmeta/scmproj.
If you want to keep the history of changes to your project.cfg then you can merge your old control branch to new top-level branch, e.g.:
cd PROJECT_ROOT bzr merge .scmproj -r0..-1 bzr remove --force alts readme.txt bzr mv project.cfg .bzrmeta/scmproj/project.cfg bzr commit
The commands above required valid top-level branch in the PROJECT_ROOT, with .bzrmeta/scmproj directory created.
Don't forget to delete .scmproj control branch when you finished with migration of project.cfg.
If your project v1 has the component at the PROJECT_ROOT then you need to remove it from project v2 config file. Because now you always have top-level branch as component and control branch in the same time.
So find the component with RELPATH = . and delete or comment out the corresponding section.
Because project v2 does not support custom alts and subset you have to create as many top-level branches as you have valid alt/subset pairs in your project.cfg.
This can be done after you move project.cfg into .bzrmeta/scmproj. Create a new copy of top-level branch with bzr branch command and edit .bzrmeta/scmproj/project.cfg to use different default alt/subset pairs. Use syntax like DEFAULT = @altname for this.
Say you have following section in your project.cfg to describe 2 alts:
[ALTS]
DEFAULT = @trunk
trunk = {COMPONENT}:trunk
dev = {COMPONENT}:dev
To re-create alt "dev" you need to create copy of top-level branch and edit .bzrmeta/scmproj/project.cfg this way:
[ALTS]
DEFAULT = @dev
trunk = {COMPONENT}:trunk
dev = {COMPONENT}:dev
Later you can delete settings of other (non-default) alts/subsets from your config and therefore trim down the file.