30 | | (Next time someone does this, we should document this.) |
| 30 | |
| 31 | Below are some "manual" steps for doing your first commit from an SVN checkout. In some cases, alternative commands are listed. |
| 32 | |
| 33 | WebKit maintains several tools that simplify the commit process in many scenarios. All of these tools are scripts in the WebKitTools/Scripts directory. Nevertheless, understanding more manual forms of the process is still a good thing. Because the tools can't do everything, it helps to have the manual process to fall back on in case the tools can't do what you need. |
| 34 | |
| 35 | 1. '''Create an account.''' |
| 36 | |
| 37 | To commit code, you will need an account. To create an account, register your e-mail address at [http://trac.webkit.org] and choose a password. You may be given a webkit.org e-mail address to use for this account. |
| 38 | |
| 39 | 2. '''Configure commit-log-editor.''' |
| 40 | |
| 41 | When using "svn commit" to submit a patch, the commit message should be the ChangeLog message(s) for the patch. WebKit maintains a script called "commit-log-editor" that populates the commit message for you. To configure the editor that commit-log-editor opens, you can set the SVN_LOG_EDITOR environment variable to the editor of your choice (e.g. nano). See the commit-log-editor source code [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/commit-log-editor] for alternative options and to see how commit-log-editor decides what editor to use. |
| 42 | |
| 43 | 3. '''Apply the patch to your local checkout.''' |
| 44 | |
| 45 | Use the "svn-apply" script to apply the patch to your local checkout. Make sure the date and reviewer are correct in the ChangeLogs (e.g. by using the -r|--reviewer flag). Alternatively, if the patch has been submitted to [http://bugs.webkit.org], you can use "webkit-patch apply-from-bug". This script will find the patch and set the reviewer for you. |
| 46 | |
| 47 | 4. '''Update your local checkout, if necessary.''' |
| 48 | |
| 49 | If time has elapsed since applying the patch to your local checkout, you may need to update your checkout with the latest repository changes. If an update causes a conflict in any ChangeLog files, you can use the resolve-ChangeLogs script to quickly resolve these conflicts and ensure that your ChangeLog changes are at the top. |
| 50 | |
| 51 | Alternatively, you can use the "update-webkit" script, which is smart enough to run resolve-ChangeLogs automatically, if necessary. |
| 52 | |
| 53 | 5. '''Commit the changes.''' |
| 54 | |
| 55 | Use the following command to commit changes-- |
| 56 | {{{ |
| 57 | svn commit --editor-cmd "<path_to_commit-log-editor>" |
| 58 | }}} |
| 59 | Alternatively, you can set the SVN_EDITOR environment variable to "commit-log-editor" and ensure that the directory containing commit-log-editor is in your path environment variable. |
| 60 | |
| 61 | A newer alternative is the following-- |
| 62 | {{{ |
| 63 | webkit-patch land --no-build |
| 64 | }}} |
| 65 | |
| 66 | 6. '''Register your credentials.''' |
| 67 | |
| 68 | On your first commit, the previous step will trigger a process to register your SVN credentials. SVN will prompt you for your password, then your user name (i.e. your account e-mail address), and then your password again. |
| 69 | |
| 70 | 7. '''Register the commit in bugs.webkit.org.''' |
| 71 | |
| 72 | If you are committing a patch in [http://bugs.webkit.org], you should add a comment to the report with text like the following: |
| 73 | {{{ |
| 74 | Manually committed r53667: http://trac.webkit.org/changeset/53667 |
| 75 | }}} |
| 76 | Then change the status of the report to RESOLVED. |
| 77 | |
| 78 | 8. '''Make sure you didn't break anything.''' |
| 79 | |
| 80 | Monitor [http://build.webkit.org/console] to make sure your patch doesn't turn any of the buildbots red! |