I’m the only developer of a small project. I truck that project with bazaar. At the initial stages I did the following:
mkdir myProject
cd myProject
bzr init
bzr mkdir src
bzr mkdir data
bzr mkdir foo
....
I have had some progress with this project and it already contains couple of dozens of commits. Now I have realized that I need to create branches for this project. Something like
trunk
rel
testFeature1
testFeature2
...
What is the best way to accomplish this?
What I did was:
cd myProject
mkdir repo
mv .bzr repo
mv .bzrignore repo
del src data foo
mkdir trunk
cd trunk
bzr branch ../repo ./ --use-existing-dir
I’m pretty much satisfied with the result, except for the fact that bzr status issued inside myProject/repo complains about all those missing files.
Now to the questions: is my approach acceptable? What should I do about the missing files in the repo directory?
The way I would go about this would be to do this: start with a project like the one you created:
Now create a repository and push the branch into it:
Now start working on a checkout (lightweight or otherwise depending on your preference):
Now you can create branches for features or whatever:
and merge the changes back into trunk:
Note that
bzr switchtakes either a path that is either relative to the current directory, absolute, or relative to the repository when you’re linked to a repository, butbzr mergerequires a path that is relative to the current directory or absolute (not relative to the repository).This may not fit your workflow (checkouts and the like), but it is a fairly effective way of achieving what you want to do. Hope it helps.