When I started contributing to Ubuntu on launchpad.I came across a version control system popularly used by launchpad developers.It is very easy to use and is flexible and I am going to share some of the basics with you all 🙂
Bazaar is a distributed revision control system sponsored by Canonical.It is written in Python programming language.
Bazaar give us the ability to track changes for a directory by turning it into something slightly more complicated than a directory that we call a branch. The branch not only stores how the directory looks right now, but also how it looked at various points in the past. Then, when we do something we wish we hadn’t, we can restore the directory to the way it looked at some point in the past.Version control systems give users the ability to save changes to a branch by “committing a revision“. The revision created is essentially a summary of the changes that were made since the last time the tree was saved.
$sudo apt-get install bzr
Setting an email address via bzr whoami.
For setting a global identity, use
$bzr whoami “Your Name <email@example.com>”
For using a different address for a specific branch, enter the branch folder and use:
$ bzr whoami –branch “Your Name <firstname.lastname@example.org>”
Setting the email address in the ~/.bazaar/bazaar.conf by adding the following lines.Note that
[DEFAULT] is case sensitive:
email=Your Name <email@example.com>
CREATING A REPO
$bzr init-repo <repo-name>
CREATING A BRANCH
$bzr init <branch-name>
- Adding all files:
- Adding a particular file:
$bzr add <filename>
$bzr commit -m “commit-message”
SOME USEFUL BAZAAR COMMANDS
$bzr status # tells the changes made to the working directory since last revision.
$bzr diff # shows the full text of changes to all files as a standard unified diff. This can be piped through many
programs such as ‘’patch’‘, ‘’diffstat’‘, ‘’filterdiff” and ‘’colordiff’‘
$bzr log # shows the history of the branch by browsing its log
$bzr merge <url of repo>
then commit changes if you are satisfied with it using
$bzr commit “merged”
PUSHING YOUR BRANCH TO OTHER REPO
$bzr push <url of repo>