Stoq plugin for bzr

De StoqWiki

This tutorial no longer makes sense since we now use git, and a tutorial alike can be found in Stoq plugin for git

The stoq plugin for bazaar provides some commands to make it easier to work with more than one stoq tree at the same time.

Tabela de conteúdo

Installation

After you have installed bzr, you can run this command to install the plugin:

mkdir ~/.bazaar/plugins -p
bzr branch lp:stoq-bzr ~/.bazaar/plugins/stoq

After this command finishes, you should have the plugin working. You can test it with:

bzr help stoq

And you should see some help for the new stoq command.

It may also be necessary to update the plugin from time to time. To do this, run:

bzr pull -d ~/.bazaar/plugins/stoq/

First time configuration

Before you start using the plugin features, you first need to configure it. Run this command:

bzr stoq --setup

You will be prompted to enter a base directory for development. This is where the plugin will create the trees for stoq. Default is ~/devel

Creating a mirror

To speedy things up when working with a lot of trees, the stoq plugin can use a "mirror".

To create the mirror run:

bzr stoq --create-mirror

This will create a tree called stoq.launchpad.master. If you choose to create a mirror and use this mirror for other trees, don't delete this directory, or the trees that depend on this mirror will stop working properly.

This feature uses bazaar's stacked branches. Take a look at bazaar's documentation for further information.

We are almost ready to start working on stoq.

Creating a new tree

Now we need to create our first tree. It's as simple as:

bzr stoq --init tree_name

This will create another directory at the root of develpoment, called tree_name. Inside this dir, there will be other 4 directories: stoq, stoqlib, stoqdrivers and kiwi.

Using a tree

Now, to use a tree, you can type:

bzr stoq tree_name

And your terminal should look something like:

[tree_name] jdahlin@gasolinux:~/dev/stoq/tree_name$ 

Now you are ready to run stoq with your develpment tree:

stoq admin

Updating a tree

To update a tree with the latest code from launchpad, run:

bzr stoq -u tree_name

Don't forget to update your mirror from time to time, or when creating a new tree, as it will not update automatically (yet). If you run the previous command without a tree, it will update the mirror by default:

bzr stoq -u

Listing existing trees

To see a list of trees you have, just run the stoq command without any parameters:

bzr stoq

This will print a list of all your trees.

Ferramentas pessoais