Bazaar
Bazaar is a distributed revision control system, currently developed by Canonical. More information can be found at:
* Bazaar Official Web Site * Bazaar Official Documentation
Instaling Bazaar
Bazaar installation is pretty straightforward:
- GNU/Linux: Bazaar is probably in your GNU/Linux distribution already.
- Windows: http://wiki.bazaar.canonical.com/WindowsDownloads
- Mac OS X: http://wiki.bazaar.canonical.com/MacOSXBundle
Accessing Repositories
- First of all, you need to configure the bazaar to recognize the certificate of ADEI server
- Download the CA certificate and place it in some location
- Edit ~/.bazaar/bazaar.conf and specify the path to this file in ssl.ca_certs in the DEFAULT. This should look like:
[DEFAULT] email = Your Name <your.mail> ssl.ca_certs=/opt/ssl/ca/chain.crt
- Then, inform bazaar about your name and e-mail address. You should use bzr whoami command for this.
bzr whoami "FirstName LastName <email@address.org>"
- You may check current setting with
bzr whoami
- You will need to install a bazaar plugin (webdav)
cd ~/.bazaar/plugins/ bzr branch lp:bzr-webdav mv bzr-webdav webdav
- To create a local branch of ADEI, the following command should be used:
bzr branch https+webdav://darksoft.org/dev/adei/adei
- You may synchronize with master branch, using
bzr pull https+webdav://darksoft.org/dev/adei/adei
- To publish the branch on the server, you need to obtain write-access to the repositories.
- Please, register in Trac and report the registered name to administrator (Suren Chilingaryan). Then, use the Trac user-name and password for authentication.
- Please, avoid committing to the master branch, use adei-<suffix> where the suffix is your name or a name of feature you are currently working for. For instance adei-eventdisplat.
- For adei-related projects, use <project_name>-<package_name>[-suffix]. For instance, kitcube-status for a master branch of KIT Cube status display and kitcube-status-feature1 for work on some status display features.
- To send current local version to the server, execute
bzr push https+webdav://darksoft.org/dev/adei/adei-eventdisplay
Managing local changes
There are few basic commands you need to know to start working with Bazaar:
- bzr status - will report current changes to the tree
- bzr diff - will output an unified diff file between current tree and last commit
- bzr revert - may be used to revert changes in the whole tree or specified file
- bzr add <list of files> - will add new files into the tree
- bzr commit - will commit a new revision. Please, look for next section how to make commit messages properly
Committing changes
Any changes that you make, are locally stored with the commit command
bzr commit
which asks you for a commit message.
Similar to Git, Bazaar handles the very first line of a commit message in a special way. For example bzr log --line prints the whole log with revision number, author, date and first line. To keep things nice and tidy, this first line should summarize the commit in 50 characters or less. To increase readability of these lines you may use the <prefix>: <description> format, with the following possible prefixes:
* Fix (e.g. Fix: segmentation fault or Fix: bug #1234) * Add (e.g. Add: web interface) * Update (e.g. Update: version)
Because, this line is limited to only 50 characters, you can use several paragraphs divided by newlines to explain not only what you did, but more importantly why you changed something. These paragraphs must be wrapped at 72 characters.
You should definitely make use of Bazaar's builtin bug-tracker support. To enable this for the UFO project add this line to your bazaar.conf (located in ~/.bazaar):
[DEFAULT] trac_adei_url = http://adei.info/adei
Now, for each bug that has an associated ticket, you can mark the fixing commit with
bzr commit --fixes adei:123
Attachments
- chain.crt (2.3 kB) - added by csa on 12/09/13 20:58:18.