Changes between Version 10 and Version 11 of WorkingGuideLines
- Timestamp:
- 08/20/09 08:46:28 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WorkingGuideLines
v10 v11 10 10 * applying patch 11 11 12 12 13 == Creating Ticket Guidelines == 13 14 Here are some useful tips for creating tickets: … … 15 16 * Bugfixes are allowed to go to the latest stable branch and new features and restructuring are allowed only for full releases. Stable branches are called: mc-X.Y (e.g. mc-4.6). Please also choose the correct milestone for this ticket: for a bugfix choose the latest milestone from the stable branch (e.g. 4.6.2), and for a new feature choose the default (which is atm 4.7). 16 17 * Please note that Changelog is frozen and mustn't be modified. All the modifications should be drawn in the commit message. 17 * After creating the branch, you shouldn't forget to set "Severity" field to the "on review" state, since now your ticket will pop up on [http://www.midnight-commander.org/report/9 this page] and can be reviewed by other developers.18 18 19 19 20 == Creating branches == 21 22 To publish branch you can use script git-publish-branch 23 24 Simple example to create branch: 25 {{{ 26 $ git checkout master 27 $ git pull // pull last changes 28 $ git checkout -b 123_branch_name // create local branch 29 }}} 30 31 Add changes and commit: 32 {{{ 33 $ git commit file.1 file.2 file.3 // commit changes 34 $ git-publish-branch // pub branch 35 }}} 36 20 37 * Each branch should follow some easy naming rules: XYZ_<something_descriptive_here>. XYZ is here the ID of the ticket. (The patch is not directly applied to the parent branch as we would like to review it beforehand. 21 * Each branch is created on the top of the other one. If this is a bugfix you should use stable branch, if not then master branch or branch where this bug (e.g for a bugfix create a branch on top of mc-4.6) 38 * Each branch is created on the top of the other one. If this is a bugfix you should use stable branch, if not then master branch or branch where this bug (e.g for a bugfix create a branch on top of mc-4.6). Please create your branches upon a last master/another_parent_branch, it will simplfy future merge process. 39 40 * After creating the branch, you shouldn't forget to set "Severity" field to the "on review" state if it ready for review, since now your ticket will pop up on [http://www.midnight-commander.org/report/9 this page] and can be reviewed by other developers. Also don't forget add link to changeset in ticket it should speed up review process. 41 42 Standard format is: 43 {{{ 44 branch: branch_name (parent: parent_branch_name) 45 changeset:changeset_hash 46 }}} 47 22 48 23 49 == Reviewing Ticket Guidelines == 24 50 As there are some guidelines for creating tickets, there are of course also some guidelines for reviewing tickets. 25 51 * Tickets which needs a review are located here: http://www.midnight-commander.org/report/9 26 * You can directly test the patch in git, simply checkout this branch and test and review it. 52 * You can directly test the patch in git, simply checkout this branch and test and review it (or test merge with 53 current local master branch or another branch which should be merged for check to conflicts). 54 55 {{{ 56 $ # simple test case: 57 $ git checkout origin/123_branch_name 58 $ <build and test> 59 }}} 60 {{{ 61 $ # best test case: 62 $ git checkout master 63 $ git reset --hard origin/master 64 $ git pull 65 $ git merge --log --no-ff origin/123_branch_name 66 $ <build and test> 67 }}} 68 27 69 * This should be reviewed when looking at a patch: 28 70 * is the patch straightforward or a somehow hackish fix for an issue? … … 30 72 * is the patch doing what it should? 31 73 * the patch mustn't introduce new bugs! 32 * If you're fine with this patch add your login to the "Votes for changeset" field, else if the patch is not okay, then remove votes and set the "Severity" field to "on rework" as keyword .74 * If you're fine with this patch add your login to the "Votes for changeset" field, else if the patch is not okay, then remove votes and set the "Severity" field to "on rework" as keyword and describe whats problems with this patch. 33 75 * Currently two votes are needed in order to get a patch into the parent branch. If you are the second one which have successfully reviewed this patch then you also set the "Severity" field to "approved". 34 76 … … 36 78 The last part is about applying a accepted patch to it's parent one 37 79 * The owner of the ticket will now merge the fix (located in the XXY_<something_descriptive_here> branch) into the parent branch. For this he eventually has to rebase this branch on the parent one. If the fix was a bugfix, then the fix would be now in the mc-X.Y branch. 38 * In this case the fix is still missing in the master branch. Please never!!!! rebase the stable release branch mc-X.Y in order to get a fix merged. If the merge failed because of conflicts fix them manually. 39 * Now you can simply close the ticket and the ticket will change into the testing state. In ticket you must describe how get summary patch. For example: 80 * In this case the fix is still missing in the master branch. Please '''NEVER(!!!)''' rebase the stable release branch mc-X.Y in order to get a fix merged. If the merge failed because of conflicts fix them manually. 81 * Don't forget add correct commit message. Standard format is: 82 {{{ 83 Ticket #<ticket_number>: ticket summary 84 85 changeset description, e.g. 86 add: some description 87 fix: some description 88 }}} 89 Some examples to merge your changes. 90 Rebase to merge commits in one: 40 91 {{{ 41 git-diff 111111111111111^...222222222222222 92 # in you working branch 93 $ git rebase -i HEAD~4 // if you add 4 commit (you can check it with 'git log') 94 }}} 95 Preparing to merge with master: 96 {{{ 97 $ git checkout master 98 $ git pull // don't forget update your master 99 $ git checkout 123_branch_name // checkout your working branch 100 $ git rebase origin/master // rebase you working branch to "master" 101 $ git checkout master // againt to master 102 $ git pull // and check updates 103 }}} 104 Merge process, if you has just one commit: 105 {{{ 106 $ git merge --log 123_branch_name // слияние с "master" той ветви, которую необходимо слить 107 }}} 108 109 If you have more than one commit: 110 {{{ 111 $ git merge --log --no-ff 123_branch_name // слияние с "master" той ветви, которую необходимо слить 112 }}} 113 option --log add to commit list of merged patches, option --no-ff allow create merge commit in case where branch isn't child branch for current head, it should simplify understanding commit relation. 114 115 Now you ready to update master branch on server: 116 {{{ 117 $ git push origin master // update central repository 118 $ git push origin :123_branch_name // delete bracnh 123_branch_name on server 119 $ git branch -d 123_branch_name // delete local branch 123_branch_name on your host 120 }}} 121 122 If you has any problems in merge process you should fix it manually and continue merge process, but try to check merge process before start to push or you can break branch. 123 124 * После этого перейдите на страницу http://midnight-commander.org/timeline, скопируйте оттуда ссылку на результат слияния и добавьте ее в последнем комментарии примерно так: 125 * Now you can close the ticket and the ticket will change into the testing state, and add to keywords name of branch you merge with (e.g. mater/commited-master). In ticket you must describe how get summary patch. For example: 126 {{{ 127 fixed: 111111111111111^...222222222222222 # for multipatch 128 fixed: 111111111111111 # for one changeset 42 129 }}} 43 130 where 111111111111111 - first commit; 222222222222222 - last commit … … 45 132 46 133 If you are unfamiliar with git, please have a look before working in our GitGuideLines. 134 135 Release process should be described [wiki:ReleaseProcess here]. 136