The version control system we use for Calitko Project is Bazaar. It is decentralized and the main advantage it that developers do not need a network connection to a central server all the time. They can commit changes locally and at some point synchronize their work with other developers by pushing their changes on a public server.
You can download Bazaar from the official Bazaar Downloads page.
Here we describe only the simplest steps you need to know to use Bazaar. If you would like to read more examples, take a look at the official Bazaar Tutorials.
At first you may want to setup a bazaar repository as your projects root. Using a repository will decrease unnecessary duplication of Bazaar control data in multiple branches and can speed up branching times. Initializing a repository is quite easy:
$ cd ~ $ bzr init-repo --trees projects $ cd projects
A new directory projects is created and initialized as a repository. The option --trees tells bzr that all branches you create in this repository should have working trees. Without this option only the control data will be created and you will not want that unless you setup a repository on a public server.
Now that you have setup your repository, you can create your first Calitko branch:
$ bzr branch http://bzr.calitko.org/calitko
NOTE: Make sure your firewall is not blocking bzr from accessing the Internet!
This creates a directory in the current working directory with the same name as the branch you branch from, calitko in our case now. If you want your local branch to have a different name, e.g. calitko-dev, branch like this:
$ bzr branch http://bzr.calitko.org/calitko calitko-dev
If you want to branch from a past revision, use the option -r:
$ bzr branch http://bzr.calitko.org/calitko calitko-old -r 68
To synchronize with the public branch:
$ cd calitko-dev $ bzr pull http://bzr.calitko.org/calitko
Once you've pulled from a branch the location is stored and you can simply do:
$ bzr pull
Once you have your branch you can modify the files in the branch's working tree. You can easily check the status of the branch:
$ bzr status
You'll see which files in the current working tree have been modified, renamed, removed or added to the branch, as well as which ones are not versioned.
To commit your changes locally, do:
$bzr commit -m "Extended the documentation, added the page using_revision_control.html"
This commits all changes and sets the message for the revision. If you do not use the option -m then the default editor will be opened and you'll have to type the message, save and exit.
To create a diff or patch file containing the changes between two past revisions, use:
$ bzr diff -r 35..65 > calitko-0.5.4-to-0.5.5.patch
To create a diff or patch file containing the changes between the last committed revision and the working tree, use:
$ bzr diff > calitko-0.5.5-generic.PacketSession.patch
Note: When you do some refactoring that involves moving or renaming files, please use bzr to do that! This ensures that not only the file locations are physically changed but also the Bazaar correctly manages the internal control information and no file history is lost! To rename or move a file, do:
$ bzr rename oldname.cpp newname.cpp $ bzr move dir1/file.cpp dir2
To push your changes to a public server, use bzr push location. We plan to make it possible for each Calitko developer to push their branches at http://bzr.calitko.org/developers/name/branch but the infrastructure is not setup yet. This documentation will be updates once that becomes possible.
Bazaar has also many other useful commands. To get the list of all available commands:
$ bzr help commands
To see the short help for a specific command, type:
$ bzr help command
Well, that should be enough to get yourself started! For further tutorials take a look at the official Bazaar Tutorials and of course experiment yourself!