| 22 | }}} |
| 23 | |
| 24 | == Committing changes == |
| 25 | |
| 26 | Any changes that you make, are ''locally'' stored with the commit command |
| 27 | {{{ |
| 28 | bzr commit |
| 29 | }}} |
| 30 | which asks you for a commit message. |
| 31 | |
| 32 | Similar to Git, Bazaar handles the very first line of a commit message in a |
| 33 | special way. For example `bzr log --line` prints the whole log with revision number, |
| 34 | author, date and first line. To keep things nice and tidy, this first line |
| 35 | should ''summarize'' the commit in ''50'' characters or less. To increase |
| 36 | readability of these lines you may use the `<prefix>: <description>` format, |
| 37 | with the following possible prefixes: |
| 38 | |
| 39 | * Fix (e.g. `Fix: segmentation fault` or `Fix: bug #1234`) |
| 40 | * Add (e.g. `Add: web interface`) |
| 41 | * Update (e.g. `Update: version`) |
| 42 | |
| 43 | Because, this line is limited to only 50 characters, you can use several |
| 44 | paragraphs divided by newlines to explain not only ''what'' you did, but more |
| 45 | importantly ''why'' you changed something. These paragraphs must be wrapped |
| 46 | at 72 characters. |
| 47 | |
| 48 | You should definately make use of Bazaar's builtin bug-tracker support. To |
| 49 | enable this for the UFO project add this line to your `bazaar.conf` (located in |
| 50 | `~/.bazaar`): |
| 51 | |
| 52 | {{{ |
| 53 | [DEFAULT] |
| 54 | trac_ufo_url = http://ufo.kit.edu/ufo |
| 55 | }}} |
| 56 | |
| 57 | Now, for each bug that has an associated ticket, you can mark the fixing commit |
| 58 | with |
| 59 | {{{ |
| 60 | bzr commit --fixes ufo:123 |