| | 1 | == Bazaar == |
|---|
| | 2 | |
|---|
| | 3 | Bazaar is a distributed revision control system, currently developed by Canonical. More information can be found at: |
|---|
| | 4 | |
|---|
| | 5 | * [http://bazaar.canonical.com/en/ Bazaar Official Web Site] |
|---|
| | 6 | * [http://doc.bazaar.canonical.com/bzr.2.2/en/ Bazaar Official Documentation] |
|---|
| | 7 | |
|---|
| | 8 | [[BR]] |
|---|
| | 9 | |
|---|
| | 10 | == Accessing Repositories == |
|---|
| | 11 | * To create a local branch of ADEI, the following command should be used: |
|---|
| | 12 | {{{ |
|---|
| | 13 | bzr branch https+webdav://darksoft.org/dev/adei/adei |
|---|
| | 14 | }}} |
|---|
| | 15 | * You may synchronize with master branch, using |
|---|
| | 16 | {{{ |
|---|
| | 17 | bzr pull https+webdav://darksoft.org/dev/adei/adei |
|---|
| | 18 | }}} |
|---|
| | 19 | * To publish the branch on the server, you need to obtain write-access to the repositories. |
|---|
| | 20 | * Please, register in Trac and use Trac user-name and password for authentication. |
|---|
| | 21 | * 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'''. |
|---|
| | 22 | * 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. |
|---|
| | 23 | * To send current local version to the server, execute |
|---|
| | 24 | {{{ |
|---|
| | 25 | bzr push https+webdav://darksoft.org/dev/adei/adei-eventdisplay |
|---|
| | 26 | }}} |
|---|
| | 27 | |
|---|
| | 28 | == Managing local changes == |
|---|
| | 29 | * There are few basic commands you need to know to start working with Bazaar |
|---|
| | 30 | * bzr status - will report current changes to the tree |
|---|
| | 31 | * bzr diff - will output an unified diff file between current tree and last commit |
|---|
| | 32 | * bzr revert - may be used to revert changes in the whole tree or specified file |
|---|
| | 33 | * bzr add <list of files> - will add new files into the tree |
|---|
| | 34 | * bzr commit - will commit a new revision. Please, look for next section how to make commit messages properly |
|---|
| | 35 | |
|---|
| | 36 | == Committing changes == |
|---|
| | 37 | Any changes that you make, are ''locally'' stored with the commit command |
|---|
| | 38 | {{{ |
|---|
| | 39 | bzr commit |
|---|
| | 40 | }}} |
|---|
| | 41 | which asks you for a commit message. |
|---|
| | 42 | |
|---|
| | 43 | Similar to Git, Bazaar handles the very first line of a commit message in a |
|---|
| | 44 | special way. For example `bzr log --line` prints the whole log with revision number, |
|---|
| | 45 | author, date and first line. To keep things nice and tidy, this first line |
|---|
| | 46 | should ''summarize'' the commit in ''50'' characters or less. To increase |
|---|
| | 47 | readability of these lines you may use the `<prefix>: <description>` format, |
|---|
| | 48 | with the following possible prefixes: |
|---|
| | 49 | |
|---|
| | 50 | * Fix (e.g. `Fix: segmentation fault` or `Fix: bug #1234`) |
|---|
| | 51 | * Add (e.g. `Add: web interface`) |
|---|
| | 52 | * Update (e.g. `Update: version`) |
|---|
| | 53 | |
|---|
| | 54 | Because, this line is limited to only 50 characters, you can use several |
|---|
| | 55 | paragraphs divided by newlines to explain not only ''what'' you did, but more |
|---|
| | 56 | importantly ''why'' you changed something. These paragraphs must be wrapped |
|---|
| | 57 | at 72 characters. |
|---|
| | 58 | |
|---|
| | 59 | You should definitely make use of Bazaar's builtin bug-tracker support. To |
|---|
| | 60 | enable this for the UFO project add this line to your `bazaar.conf` (located in |
|---|
| | 61 | `~/.bazaar`): |
|---|
| | 62 | |
|---|
| | 63 | {{{ |
|---|
| | 64 | [DEFAULT] |
|---|
| | 65 | trac_adei_url = http://adei.info/adei |
|---|
| | 66 | }}} |
|---|
| | 67 | |
|---|
| | 68 | Now, for each bug that has an associated ticket, you can mark the fixing commit |
|---|
| | 69 | with |
|---|
| | 70 | {{{ |
|---|
| | 71 | bzr commit --fixes adei:123 |
|---|
| | 72 | }}} |
|---|
| | 73 | |
|---|
| | 74 | [[BR]] |
|---|
| | 75 | |
|---|
| | 76 | |
|---|
| | 77 | |