| | 62 | |
| | 63 | == Fix a bug == |
| | 64 | |
| | 65 | If you are about to fix a bug affecting more branches, you must place your changeset(s) on the top of the latest common ancestor of the branches. For example if you want to fix a bug existing in both the 1.0 release branch and the main one, you should do the following: |
| | 66 | {{{ |
| | 67 | $ hg clone http://lemon.cs.elte.hu/hg/lemon#1.0 bugfix |
| | 68 | $ cd bugfix |
| | 69 | $ cd hg up default <-- Actually, This is not necessary |
| | 70 | [... fix the bug ... ] |
| | 71 | $ hg ci -m 'Bugfix in BuggyTool, see #123' |
| | 72 | }}} |
| | 73 | Now merge it to the 1.0 branch |
| | 74 | {{{ |
| | 75 | $ hg tag -l my-fix # '-l' is important |
| | 76 | $ hg up -C 1.0 |
| | 77 | $ hg merge my-fix |
| | 78 | [... do some tests (e.g. make check) ...] |
| | 79 | $ hg ci -m 'Merge bugfix for #123' # Merge to 1.0 |
| | 80 | }}} |
| | 81 | Finally, merge it to the main branch |
| | 82 | {{{ |
| | 83 | $ hg pull http://lemon.cs.elte.hu/hg/lemon |
| | 84 | $ hg up -C default |
| | 85 | $ hg merge my-fix |
| | 86 | [... do some tests (e.g. make check) ...] |
| | 87 | $ hg ci -m 'Merge' # Merge is to main |
| | 88 | }}} |