Wednesday 20 October 2010

creating push branches

To manage our software we use bazaar as version control system, which worked fine. As a certain point, some changes were needed with respect to the location of the software repository. Until know the repository was located under the home directory of several users (i.e., /net/home/johndoe/sw_repos/OurProject). This however is a bit tedious and not very nice. So a fake 'user' was created that would hold all the software projects, and related distributions, repositories, etc.

Next question was how do we transfer all our present versioned code to the new user, without destroying the lineage and links. In the following bazaar specific terminology is used.

Suppose we have a working branch of our project
/net/home/wdrenth/sw_dev/Project
which is bound (i.e., is a checkout of) /net/home/johndoe/sw_repos/Project
Let the new fake 'user' be called 'omnium'.

First create a repository and branch:
bzr init-repos /net/home/omnium/sw_repos/project
and
bzr init /net/home/omnium/sw_repos/project/Project

then, from user wdrenth
cd /net/home/wdrenth/sw_dev/Project
bzr push /net/home/omnium/sw_repos/project/Project
this populates the branch under 'omnium'
then
bzr bind /net/home/omnium/sw_repos/project/Project
which binds the wdrenth checkout to the new branch under omnium.

and ready!

No comments:

Post a Comment