diff options
| author | Paul Eggert | 2016-02-14 19:24:38 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-02-14 19:25:32 -0800 |
| commit | f8bf1b35bf55ae1bb7703f86d3b526887f064b19 (patch) | |
| tree | f3aa83dbb5900d9cf65cc24e5eb1aceff3411264 | |
| parent | f3aaca3552ba961d13cd1ee935c1c6b075f2398a (diff) | |
| download | emacs-f8bf1b35bf55ae1bb7703f86d3b526887f064b19.tar.gz emacs-f8bf1b35bf55ae1bb7703f86d3b526887f064b19.zip | |
CONTRIBUTE cleanups and updates
* CONTRIBUTE: Mention URLs and info nodes more consistently,
avoiding possibly-confusing punctuation adjacent to a URL, and
giving full shell commands for 'info'. Start with a brief but
complete how-to, for people who want to get started right away.
Then briefly discuss how to join the development process in the
typical order. Omit needless words. Update some of the
now-obsolete file names, info node names, and quoting styles.
Better document emacs-NN branches and how they are merged.
* admin/notes/git-workflow: Change emacs-24 to emacs-25,
and trunk to master. This file still needs work.
| -rw-r--r-- | CONTRIBUTE | 213 | ||||
| -rw-r--r-- | admin/notes/git-workflow | 36 |
2 files changed, 126 insertions, 123 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE index 74d340af13b..5102b4fe4f1 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE | |||
| @@ -1,48 +1,51 @@ | |||
| 1 | This file contains information on Emacs developer processes. | 1 | * How developers contribute to GNU Emacs |
| 2 | 2 | ||
| 3 | For information on contributing to Emacs as a non-developer, see | 3 | Here is how software developers can contribute to Emacs. (Non-developers: see |
| 4 | (info "(emacs)Contributing") or | ||
| 5 | http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html | 4 | http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html |
| 5 | or run the shell command 'info "(emacs)Contributing"'.) | ||
| 6 | 6 | ||
| 7 | * Information for Emacs Developers. | 7 | ** The Emacs repository |
| 8 | 8 | ||
| 9 | An "Emacs Developer" is someone who contributes a lot of code or | 9 | Emacs development uses Git on Savannah for its main repository. |
| 10 | documentation to the Emacs repository. Generally, they have write | 10 | Briefly, the following shell commands build and run Emacs from scratch: |
| 11 | access to the Emacs git repository on Savannah | ||
| 12 | https://savannah.gnu.org/git/?group=emacs. | ||
| 13 | 11 | ||
| 14 | ** Write access to the Emacs repository. | 12 | git config --global user.name 'Your Name' |
| 13 | git config --global user.email 'your.name@example.com' | ||
| 14 | git config --global transfer.fsckObjects true | ||
| 15 | git clone git://git.sv.gnu.org/emacs.git | ||
| 16 | cd emacs | ||
| 17 | ./autogen.sh | ||
| 18 | ./configure | ||
| 19 | make | ||
| 20 | src/emacs | ||
| 15 | 21 | ||
| 16 | Once you become a frequent contributor to Emacs, we can consider | 22 | For more details, see |
| 17 | giving you write access to the version-control repository. Request | 23 | http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs and |
| 18 | access on the emacs-devel@gnu.org mailing list. Also, be sure to | 24 | http://www.emacswiki.org/emacs/GitForEmacsDevs or see the file |
| 19 | subscribe to the emacs-devel@gnu.org mailing list and include the | 25 | admin/notes/git-workflow. |
| 20 | "emacs-announce" topic, so that you get the announcements about | ||
| 21 | feature freeze and other important events. | ||
| 22 | 26 | ||
| 23 | ** Using the Emacs repository | 27 | ** Getting involved with development |
| 24 | 28 | ||
| 25 | Emacs uses Git for the source code repository. | 29 | You can subscribe to the emacs-devel@gnu.org mailing list, paying |
| 30 | attention to postings with subject lines containing "emacs-announce", | ||
| 31 | as these discuss important events like feature freezes. See | ||
| 32 | http://lists.gnu.org/mailman/listinfo/emacs-devel for mailing list | ||
| 33 | instructions and archives. You can develop and commit changes in your | ||
| 34 | own copy of the repository, and discuss proposed changes on the | ||
| 35 | mailing list. Frequent contributors to Emacs can request write access | ||
| 36 | there. | ||
| 26 | 37 | ||
| 27 | See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get | 38 | ** Committing changes by others |
| 28 | started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more | ||
| 29 | advanced information. | ||
| 30 | 39 | ||
| 31 | Alternately, see admin/notes/git-workflow. | 40 | If committing changes written by someone else, commit in their name, |
| 32 | 41 | not yours. You can use 'git commit --author="AUTHOR"' to specify a | |
| 33 | If committing changes written by someone else, make the commit in | 42 | change's author. |
| 34 | their name, not yours. Git distinguishes between the author | ||
| 35 | and the committer; use the --author option on the commit command to | ||
| 36 | specify the actual author; the committer defaults to you. | ||
| 37 | 43 | ||
| 38 | ** Commit messages | 44 | ** Commit messages |
| 39 | 45 | ||
| 40 | Emacs development no longer stores descriptions of new changes in | 46 | Ordinarily, a change you commit should contain a log entry in its |
| 41 | ChangeLog files. Instead, a single ChangeLog file is generated from | 47 | commit message and should not touch the repository's ChangeLog files. |
| 42 | the commit messages when a release is prepared. So changes you commit | 48 | Here is an example commit message (indented): |
| 43 | should not touch any of the ChangeLog files in the repository, but | ||
| 44 | instead should contain the log entries in the commit message. Here is | ||
| 45 | an example of a commit message (indented): | ||
| 46 | 49 | ||
| 47 | Deactivate shifted region | 50 | Deactivate shifted region |
| 48 | 51 | ||
| @@ -53,12 +56,13 @@ an example of a commit message (indented): | |||
| 53 | * src/frame.c (Fhandle_switch_frame, Fselected_frame): | 56 | * src/frame.c (Fhandle_switch_frame, Fselected_frame): |
| 54 | Deactivate the mark. | 57 | Deactivate the mark. |
| 55 | 58 | ||
| 56 | Below are some rules and recommendations for formatting commit | 59 | Occasionally, commit messages are collected and prepended to a |
| 57 | messages: | 60 | ChangeLog file, where they can be corrected. It saves time to get |
| 61 | them right the first time, so here are guidelines for formatting them: | ||
| 58 | 62 | ||
| 59 | - Start with a single unindented summary line explaining the change; | 63 | - Start with a single unindented summary line explaining the change; |
| 60 | do not end this line with a period. If that line starts with a | 64 | do not end this line with a period. If that line starts with a |
| 61 | semi-colon and a space "; ", the log message will be ignored when | 65 | semicolon and a space "; ", the commit message will be ignored when |
| 62 | generating the ChangeLog file. Use this for minor commits that do | 66 | generating the ChangeLog file. Use this for minor commits that do |
| 63 | not need separate ChangeLog entries, such as changes in etc/NEWS. | 67 | not need separate ChangeLog entries, such as changes in etc/NEWS. |
| 64 | 68 | ||
| @@ -104,19 +108,19 @@ messages: | |||
| 104 | the rationale for a change; that can be done in the commit message | 108 | the rationale for a change; that can be done in the commit message |
| 105 | between the summary line and the file entries. | 109 | between the summary line and the file entries. |
| 106 | 110 | ||
| 107 | - Emacs generally follows the GNU coding standards when it comes to | 111 | - Emacs generally follows the GNU coding standards for ChangeLogs: see |
| 108 | ChangeLogs: | 112 | http://www.gnu.org/prep/standards/html_node/Change-Logs.html |
| 109 | http://www.gnu.org/prep/standards/html_node/Change-Logs.html or | 113 | or run 'info "(standards)Change Logs"'. One exception is that |
| 110 | "(info (standards)Change Logs"). One exception is that we still | 114 | commits still sometimes quote `like-this' (as the standards used to |
| 111 | sometimes quote `like-this' (as the standards used to recommend) | 115 | recommend) rather than 'like-this' or ‘like this’ (as they do now), |
| 112 | rather than 'like-this' (as they do now), because `...' is so widely | 116 | as `...' is so widely used elsewhere in Emacs. |
| 113 | used elsewhere in Emacs. | ||
| 114 | 117 | ||
| 115 | - Some of the rules in the GNU coding standards section 5.2 | 118 | - Some commenting rules in the GNU coding standards also apply |
| 116 | "Commenting Your Work" also apply to ChangeLog entries: they must be | 119 | to ChangeLog entries: they must be in English, and be complete |
| 117 | in English, and be complete sentences starting with a capital and | 120 | sentences starting with a capital and ending with a period (except |
| 118 | ending with a period (except the summary line should not end in a | 121 | the summary line should not end in a period). See |
| 119 | period). | 122 | http://www.gnu.org/prep/standards/html_node/Comments.html |
| 123 | or run 'info "(standards)Comments"'. | ||
| 120 | 124 | ||
| 121 | They are preserved indefinitely, and have a reasonable chance of | 125 | They are preserved indefinitely, and have a reasonable chance of |
| 122 | being read in the future, so it's better that they have good | 126 | being read in the future, so it's better that they have good |
| @@ -145,15 +149,15 @@ messages: | |||
| 145 | will suffice. | 149 | will suffice. |
| 146 | 150 | ||
| 147 | - There is no need to mention files such as NEWS and MAINTAINERS, or | 151 | - There is no need to mention files such as NEWS and MAINTAINERS, or |
| 148 | to indicate regeneration of files such as 'configure', in the | 152 | to indicate regeneration of files such as 'lib/gnulib.mk', in the |
| 149 | ChangeLog entry. "There is no need" means you don't have to, but | 153 | ChangeLog entry. "There is no need" means you don't have to, but |
| 150 | you can if you want to. | 154 | you can if you want to. |
| 151 | 155 | ||
| 152 | ** Generating ChangeLog entries | 156 | ** Generating ChangeLog entries |
| 153 | 157 | ||
| 154 | - You can use various Emacs functions to ease the process of writing | 158 | - You can use Emacs functions to write ChangeLog entries; see |
| 155 | ChangeLog entries; see (info "(emacs)Change Log Commands") or | 159 | http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html |
| 156 | http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html. | 160 | or run 'info "(emacs)Change Log Commands"'. |
| 157 | 161 | ||
| 158 | - If you use Emacs VC, one way to format ChangeLog entries is to create | 162 | - If you use Emacs VC, one way to format ChangeLog entries is to create |
| 159 | a top-level ChangeLog file manually, and update it with 'C-x 4 a' as | 163 | a top-level ChangeLog file manually, and update it with 'C-x 4 a' as |
| @@ -171,32 +175,33 @@ messages: | |||
| 171 | 175 | ||
| 172 | ** Branches | 176 | ** Branches |
| 173 | 177 | ||
| 174 | Development normally takes places on the trunk. | 178 | Future development normally takes place on the master branch. |
| 175 | Sometimes specialized features are developed on separate branches | 179 | Sometimes specialized features are developed on other branches before |
| 176 | before possibly being merged to the trunk. | 180 | possibly being merged to the master. Release branches are named |
| 177 | 181 | "emacs-NN" where NN is the major version number, and are mainly | |
| 178 | Development is discussed on the emacs-devel mailing list. | 182 | intended for more-conservative changes such as bug fixes. Typically, |
| 179 | 183 | collective development is active on the master branch and possibly on | |
| 180 | The trunk branch is named "master" in git; release branches are named | 184 | the current release branch. Periodically, the current release branch |
| 181 | "emacs-nn" where "nn" is the major version. | 185 | is merged into the master, using the gitmerge function described in |
| 186 | admin/notes-git-workflow. | ||
| 182 | 187 | ||
| 183 | If you are fixing a bug that exists in the current release, be sure to | 188 | If you are fixing a bug that exists in the current release, be sure to |
| 184 | commit it to the release branch; it will be merged to the master | 189 | commit it to the release branch; it will be merged to the master |
| 185 | branch later. | 190 | branch later by the gitmerge function. |
| 186 | 191 | ||
| 187 | However, if you know that the change will be difficult to merge to | 192 | However, if you know that the change will be difficult to merge to the |
| 188 | master (eg because the code on master has changed a lot), you can | 193 | master (e.g., because the code on master has changed a lot), you can |
| 189 | apply the change to both master and branch yourself. It could also | 194 | apply the change to both master and branch yourself. It could also |
| 190 | happen that a change is cherry-picked from master to the release | 195 | happen that a change is cherry-picked from master to the release |
| 191 | branch, and so doesn't need to be merged back. In these cases, | 196 | branch, and so doesn't need to be merged back. In these cases, |
| 192 | indicate in the release branch commit log that there is no need to | 197 | say in the release branch commit message that there is no need to merge |
| 193 | merge the commit to master; start the commit message with "Backport:". | 198 | the commit to master, by starting the commit message with "Backport:". |
| 194 | gitmerge.el will then exclude that commit from the merge to trunk. | 199 | The gitmerge function excludes these commits from the merge to the master. |
| 195 | 200 | ||
| 196 | Some changes should not be merged to master at all, for whatever | 201 | Some changes should not be merged to master at all, for whatever |
| 197 | reasons. These should be marked by including something like "Do not | 202 | reasons. These should be marked by including something like "Do not |
| 198 | merge to master" or anything that matches gitmerge-skip-regexp (see | 203 | merge to master" or anything that matches gitmerge-skip-regexp (see |
| 199 | gitmerge.el) in the log message. | 204 | admin/gitmerge.el) in the commit message. |
| 200 | 205 | ||
| 201 | ** Other process information | 206 | ** Other process information |
| 202 | 207 | ||
| @@ -206,10 +211,11 @@ Discussion about Emacs development takes place on emacs-devel@gnu.org. | |||
| 206 | 211 | ||
| 207 | Bug reports and fixes, feature requests and implementations should be | 212 | Bug reports and fixes, feature requests and implementations should be |
| 208 | sent to bug-gnu-emacs@gnu.org, the bug/feature list. This is coupled | 213 | sent to bug-gnu-emacs@gnu.org, the bug/feature list. This is coupled |
| 209 | to the tracker at http://debbugs.gnu.org . | 214 | to the http://debbugs.gnu.org tracker. |
| 210 | 215 | ||
| 211 | You can subscribe to the mailing lists, or see the list archives, | 216 | The Savannah info page http://savannah.gnu.org/mail/?group=emacs |
| 212 | by following links from http://savannah.gnu.org/mail/?group=emacs . | 217 | describes how to subscribe to the mailing lists, or see the list |
| 218 | archives. | ||
| 213 | 219 | ||
| 214 | To email a patch you can use a shell command like 'git format-patch -1' | 220 | To email a patch you can use a shell command like 'git format-patch -1' |
| 215 | to create a file, and then attach the file to your email. This nicely | 221 | to create a file, and then attach the file to your email. This nicely |
| @@ -219,16 +225,15 @@ such patch without additional remarks, you can use a command like | |||
| 219 | 225 | ||
| 220 | ** Issue tracker (a.k.a. "bug tracker") | 226 | ** Issue tracker (a.k.a. "bug tracker") |
| 221 | 227 | ||
| 222 | The Emacs issue tracker is at http://debbugs.gnu.org/. The form | 228 | The Emacs issue tracker at http://debbugs.gnu.org lets you view bug |
| 223 | presented by that page allows to view bug reports and search the | 229 | reports and search the database for bugs matching several criteria. |
| 224 | database for bugs matching several criteria. Messages posted to the | 230 | Messages posted to the bug-gnu-emacs@gnu.org mailing list, mentioned |
| 225 | bug-gnu-emacs@gnu.org mailing list, mentioned above, are recorded by | 231 | above, are recorded by the tracker with the corresponding bugs/issues. |
| 226 | the tracker with the corresponding bugs/issues. | ||
| 227 | 232 | ||
| 228 | GNU ELPA has a 'debbugs' package that allows accessing the tracker | 233 | GNU ELPA has a 'debbugs' package that allows accessing the tracker |
| 229 | database from Emacs. | 234 | database from Emacs. |
| 230 | 235 | ||
| 231 | ** Document your changes. | 236 | ** Documenting your changes |
| 232 | 237 | ||
| 233 | Any change that matters to end-users should have an entry in etc/NEWS. | 238 | Any change that matters to end-users should have an entry in etc/NEWS. |
| 234 | 239 | ||
| @@ -239,21 +244,21 @@ know it does not, mark the NEWS entry with "---". If you know | |||
| 239 | that *all* the necessary documentation updates have been made, mark | 244 | that *all* the necessary documentation updates have been made, mark |
| 240 | the entry with "+++". Otherwise do not mark it. | 245 | the entry with "+++". Otherwise do not mark it. |
| 241 | 246 | ||
| 242 | Please see (info "(elisp)Documentation Tips") or | 247 | For more specific tips on Emacs's doc style, see |
| 243 | https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html | 248 | http://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html |
| 244 | for more specific tips on Emacs's doc style. Use 'checkdoc' to check | 249 | Use 'checkdoc' to check for documentation errors before submitting a patch. |
| 245 | for documentation errors before submitting a patch. | ||
| 246 | 250 | ||
| 247 | ** Test your changes. | 251 | ** Testing your changes |
| 248 | 252 | ||
| 249 | Please test your changes before committing them or sending them to the | 253 | Please test your changes before committing them or sending them to the |
| 250 | list. If possible, add a new test along with any bug fix or new | 254 | list. If possible, add a new test along with any bug fix or new |
| 251 | functionality you commit (of course, some changes cannot be easily | 255 | functionality you commit (of course, some changes cannot be easily |
| 252 | tested). | 256 | tested). |
| 253 | 257 | ||
| 254 | Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info | 258 | Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See |
| 255 | "(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/ | 259 | http://www.gnu.org/software/emacs/manual/html_node/ert/ |
| 256 | for more information on writing and running tests. | 260 | or run 'info "(ert)"' for for more information on writing and running |
| 261 | tests. | ||
| 257 | 262 | ||
| 258 | If your test lasts longer than some few seconds, mark it in its | 263 | If your test lasts longer than some few seconds, mark it in its |
| 259 | 'ert-deftest' definition with ":tags '(:expensive-test)". | 264 | 'ert-deftest' definition with ":tags '(:expensive-test)". |
| @@ -264,27 +269,26 @@ top-level directory. Most tests are in the directory | |||
| 264 | <filename>" to run the tests for <filename>.el(c). See "test/README" | 269 | <filename>" to run the tests for <filename>.el(c). See "test/README" |
| 265 | for more information. | 270 | for more information. |
| 266 | 271 | ||
| 267 | ** Understanding Emacs Internals. | 272 | ** Understanding Emacs internals |
| 273 | |||
| 274 | The best way to understand Emacs internals is to read the code. Some | ||
| 275 | source files, such as xdisp.c, have extensive comments describing the | ||
| 276 | design and implementation. The following resources may also help: | ||
| 277 | |||
| 278 | http://www.gnu.org/software/emacs/manual/html_node/elisp/Tips.html | ||
| 279 | http://www.gnu.org/software/emacs/manual/html_node/elisp/GNU-Emacs-Internals.html | ||
| 268 | 280 | ||
| 269 | The best way to understand Emacs Internals is to read the code, | 281 | or run 'info "(elisp)Tips"' or 'info "(elisp)GNU Emacs Internals"'. |
| 270 | but the nodes "Tips" and "GNU Emacs Internals" in the Appendix | ||
| 271 | of the Emacs Lisp Reference Manual may also help. Some source files, | ||
| 272 | such as xdisp.c, have large commentaries describing the design and | ||
| 273 | implementation in more detail. | ||
| 274 | 282 | ||
| 275 | The file etc/DEBUG describes how to debug Emacs bugs. | 283 | The file etc/DEBUG describes how to debug Emacs bugs. |
| 276 | 284 | ||
| 277 | *** Non-ASCII characters in Emacs files | 285 | *** Non-ASCII characters in Emacs files |
| 278 | 286 | ||
| 279 | If you introduce non-ASCII characters into Emacs source files, it is a | 287 | If you introduce non-ASCII characters into Emacs source files, use the |
| 280 | good idea to add a 'coding' cookie to the file to state its encoding. | 288 | UTF-8 encoding unless it cannot do the job for some good reason. |
| 281 | Please use the UTF-8 encoding unless it cannot do the job for some | 289 | Although it is generally a good idea to add 'coding:' cookies to |
| 282 | good reason. As of Emacs 24.4, it is no longer necessary to have | 290 | non-ASCII source files, cookies are not needed in UTF-8-encoded *.el |
| 283 | explicit 'coding' cookies in *.el files if they are encoded in UTF-8, | 291 | files intended for use only with Emacs version 24.5 and later. |
| 284 | but other files need them even if encoded in UTF-8. However, if | ||
| 285 | an *.el file is intended for use with older Emacs versions (e.g. if | ||
| 286 | it's also distributed via ELPA), having an explicit encoding | ||
| 287 | specification is still a good idea. | ||
| 288 | 292 | ||
| 289 | *** Useful files in the admin/ directory | 293 | *** Useful files in the admin/ directory |
| 290 | 294 | ||
| @@ -306,15 +310,15 @@ changed heuristic to deduce that a file was renamed. So if you are | |||
| 306 | planning to make extensive changes to a file after renaming it (or | 310 | planning to make extensive changes to a file after renaming it (or |
| 307 | moving it to another directory), you should: | 311 | moving it to another directory), you should: |
| 308 | 312 | ||
| 309 | - create a feature branch | 313 | - Create a feature branch. |
| 310 | 314 | ||
| 311 | - commit the rename without any changes | 315 | - Commit the rename without any changes. |
| 312 | 316 | ||
| 313 | - make other changes | 317 | - Make other changes. |
| 314 | 318 | ||
| 315 | - merge the feature branch to trunk, _not_ squashing the commits into | 319 | - Merge the feature branch to the master branch, instead of squashing |
| 316 | one. The commit message on this merge should summarize the renames | 320 | the commits into one. The commit message on this merge should |
| 317 | and all the changes. | 321 | summarize the renames and all the changes. |
| 318 | 322 | ||
| 319 | 323 | ||
| 320 | 324 | ||
| @@ -336,4 +340,5 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | |||
| 336 | Local variables: | 340 | Local variables: |
| 337 | mode: outline | 341 | mode: outline |
| 338 | paragraph-separate: "[ ]*$" | 342 | paragraph-separate: "[ ]*$" |
| 343 | coding: utf-8 | ||
| 339 | end: | 344 | end: |
diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow index b6168c31bd5..2e4bbac70fe 100644 --- a/admin/notes/git-workflow +++ b/admin/notes/git-workflow | |||
| @@ -19,17 +19,15 @@ Initial setup | |||
| 19 | ============= | 19 | ============= |
| 20 | 20 | ||
| 21 | Then we want to clone the repository. We normally want to have both | 21 | Then we want to clone the repository. We normally want to have both |
| 22 | the current trunk and the emacs-24 branch. | 22 | the current master and the emacs-25 branch. |
| 23 | 23 | ||
| 24 | mkdir ~/emacs | 24 | mkdir ~/emacs |
| 25 | cd ~/emacs | 25 | cd ~/emacs |
| 26 | git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git | 26 | git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git master |
| 27 | mv emacs trunk | 27 | (cd master; git config push.default current) |
| 28 | (cd trunk; git config push.default current) | 28 | ./master/admin/git-new-workdir master emacs-25 |
| 29 | ./trunk/admin/git-new-workdir trunk emacs-24 | 29 | cd emacs-25 |
| 30 | cd emacs-24 | 30 | git checkout emacs-25 |
| 31 | git checkout emacs-24 | ||
| 32 | git config push.default current | ||
| 33 | 31 | ||
| 34 | You now have both branches conveniently accessible, and you can do | 32 | You now have both branches conveniently accessible, and you can do |
| 35 | "git pull" in them once in a while to keep updated. | 33 | "git pull" in them once in a while to keep updated. |
| @@ -59,13 +57,13 @@ you commit your change locally and then send a patch file as a bug report | |||
| 59 | as described in ../../CONTRIBUTE. | 57 | as described in ../../CONTRIBUTE. |
| 60 | 58 | ||
| 61 | 59 | ||
| 62 | Backporting to emacs-24 | 60 | Backporting to emacs-25 |
| 63 | ======================= | 61 | ======================= |
| 64 | 62 | ||
| 65 | If you have applied a fix to the trunk, but then decide that it should | 63 | If you have applied a fix to the master, but then decide that it should |
| 66 | be applied to the emacs-24 branch, too, then | 64 | be applied to the emacs-25 branch, too, then |
| 67 | 65 | ||
| 68 | cd ~/emacs/trunk | 66 | cd ~/emacs/master |
| 69 | git log | 67 | git log |
| 70 | 68 | ||
| 71 | and find the commit you're looking for. Then find the commit ID, | 69 | and find the commit you're looking for. Then find the commit ID, |
| @@ -73,7 +71,7 @@ which will look like | |||
| 73 | 71 | ||
| 74 | commit 958b768a6534ae6e77a8547a56fc31b46b63710b | 72 | commit 958b768a6534ae6e77a8547a56fc31b46b63710b |
| 75 | 73 | ||
| 76 | cd ~/emacs/emacs-24 | 74 | cd ~/emacs/emacs-25 |
| 77 | git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b | 75 | git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b |
| 78 | 76 | ||
| 79 | and add "Backport:" to the commit string. Then | 77 | and add "Backport:" to the commit string. Then |
| @@ -81,17 +79,17 @@ and add "Backport:" to the commit string. Then | |||
| 81 | git push | 79 | git push |
| 82 | 80 | ||
| 83 | 81 | ||
| 84 | Merging emacs-24 to trunk/master | 82 | Merging emacs-25 to the master |
| 85 | ================================ | 83 | ============================== |
| 86 | 84 | ||
| 87 | It is recommended to use the file gitmerge.el in the admin directory | 85 | It is recommended to use the file gitmerge.el in the admin directory |
| 88 | for merging 'emacs-24' into 'master'. It will take care of many | 86 | for merging 'emacs-25' into 'master'. It will take care of many |
| 89 | things which would otherwise have to be done manually, like ignoring | 87 | things which would otherwise have to be done manually, like ignoring |
| 90 | commits that should not land in master, fixing up ChangeLogs and | 88 | commits that should not land in master, fixing up ChangeLogs and |
| 91 | automatically dealing with certain types of conflicts. If you really | 89 | automatically dealing with certain types of conflicts. If you really |
| 92 | want to, you can do the merge manually, but then you're on your own. | 90 | want to, you can do the merge manually, but then you're on your own. |
| 93 | If you still choose to do that, make absolutely sure that you *always* | 91 | If you still choose to do that, make absolutely sure that you *always* |
| 94 | use the 'merge' command to transport commits from 'emacs-24' to | 92 | use the 'merge' command to transport commits from 'emacs-25' to |
| 95 | 'master'. *Never* use 'cherry-pick'! If you don't know why, then you | 93 | 'master'. *Never* use 'cherry-pick'! If you don't know why, then you |
| 96 | shouldn't manually do the merge in the first place; just use | 94 | shouldn't manually do the merge in the first place; just use |
| 97 | gitmerge.el instead. | 95 | gitmerge.el instead. |
| @@ -104,11 +102,11 @@ up-to-date by doing a pull. Then start Emacs with | |||
| 104 | emacs -l admin/gitmerge.el -f gitmerge | 102 | emacs -l admin/gitmerge.el -f gitmerge |
| 105 | 103 | ||
| 106 | You'll be asked for the branch to merge, which will default to | 104 | You'll be asked for the branch to merge, which will default to |
| 107 | 'origin/emacs-24', which you should accept. Merging a local tracking | 105 | 'origin/emacs-25', which you should accept. Merging a local tracking |
| 108 | branch is discouraged, since it might not be up-to-date, or worse, | 106 | branch is discouraged, since it might not be up-to-date, or worse, |
| 109 | contain commits from you which are not yet pushed upstream. | 107 | contain commits from you which are not yet pushed upstream. |
| 110 | 108 | ||
| 111 | You will now see the list of commits from 'emacs-24' which are not yet | 109 | You will now see the list of commits from 'emacs-25' which are not yet |
| 112 | merged to 'master'. You might also see commits that are already | 110 | merged to 'master'. You might also see commits that are already |
| 113 | marked for "skipping", which means that they will be merged with a | 111 | marked for "skipping", which means that they will be merged with a |
| 114 | different merge strategy ('ours'), which will effectively ignore the | 112 | different merge strategy ('ours'), which will effectively ignore the |