aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2016-02-14 19:24:38 -0800
committerPaul Eggert2016-02-14 19:25:32 -0800
commitf8bf1b35bf55ae1bb7703f86d3b526887f064b19 (patch)
treef3aa83dbb5900d9cf65cc24e5eb1aceff3411264
parentf3aaca3552ba961d13cd1ee935c1c6b075f2398a (diff)
downloademacs-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--CONTRIBUTE213
-rw-r--r--admin/notes/git-workflow36
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 @@
1This file contains information on Emacs developer processes. 1* How developers contribute to GNU Emacs
2 2
3For information on contributing to Emacs as a non-developer, see 3Here is how software developers can contribute to Emacs. (Non-developers: see
4(info "(emacs)Contributing") or
5http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html 4http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html
5or run the shell command 'info "(emacs)Contributing"'.)
6 6
7* Information for Emacs Developers. 7** The Emacs repository
8 8
9An "Emacs Developer" is someone who contributes a lot of code or 9Emacs development uses Git on Savannah for its main repository.
10documentation to the Emacs repository. Generally, they have write 10Briefly, the following shell commands build and run Emacs from scratch:
11access to the Emacs git repository on Savannah
12https://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
16Once you become a frequent contributor to Emacs, we can consider 22For more details, see
17giving you write access to the version-control repository. Request 23http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs and
18access on the emacs-devel@gnu.org mailing list. Also, be sure to 24http://www.emacswiki.org/emacs/GitForEmacsDevs or see the file
19subscribe to the emacs-devel@gnu.org mailing list and include the 25admin/notes/git-workflow.
20"emacs-announce" topic, so that you get the announcements about
21feature freeze and other important events.
22 26
23** Using the Emacs repository 27** Getting involved with development
24 28
25Emacs uses Git for the source code repository. 29You can subscribe to the emacs-devel@gnu.org mailing list, paying
30attention to postings with subject lines containing "emacs-announce",
31as these discuss important events like feature freezes. See
32http://lists.gnu.org/mailman/listinfo/emacs-devel for mailing list
33instructions and archives. You can develop and commit changes in your
34own copy of the repository, and discuss proposed changes on the
35mailing list. Frequent contributors to Emacs can request write access
36there.
26 37
27See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get 38** Committing changes by others
28started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more
29advanced information.
30 39
31Alternately, see admin/notes/git-workflow. 40If committing changes written by someone else, commit in their name,
32 41not yours. You can use 'git commit --author="AUTHOR"' to specify a
33If committing changes written by someone else, make the commit in 42change's author.
34their name, not yours. Git distinguishes between the author
35and the committer; use the --author option on the commit command to
36specify the actual author; the committer defaults to you.
37 43
38** Commit messages 44** Commit messages
39 45
40Emacs development no longer stores descriptions of new changes in 46Ordinarily, a change you commit should contain a log entry in its
41ChangeLog files. Instead, a single ChangeLog file is generated from 47commit message and should not touch the repository's ChangeLog files.
42the commit messages when a release is prepared. So changes you commit 48Here is an example commit message (indented):
43should not touch any of the ChangeLog files in the repository, but
44instead should contain the log entries in the commit message. Here is
45an 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
56Below are some rules and recommendations for formatting commit 59Occasionally, commit messages are collected and prepended to a
57messages: 60ChangeLog file, where they can be corrected. It saves time to get
61them 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
174Development normally takes places on the trunk. 178Future development normally takes place on the master branch.
175Sometimes specialized features are developed on separate branches 179Sometimes specialized features are developed on other branches before
176before possibly being merged to the trunk. 180possibly being merged to the master. Release branches are named
177 181"emacs-NN" where NN is the major version number, and are mainly
178Development is discussed on the emacs-devel mailing list. 182intended for more-conservative changes such as bug fixes. Typically,
179 183collective development is active on the master branch and possibly on
180The trunk branch is named "master" in git; release branches are named 184the current release branch. Periodically, the current release branch
181"emacs-nn" where "nn" is the major version. 185is merged into the master, using the gitmerge function described in
186admin/notes-git-workflow.
182 187
183If you are fixing a bug that exists in the current release, be sure to 188If you are fixing a bug that exists in the current release, be sure to
184commit it to the release branch; it will be merged to the master 189commit it to the release branch; it will be merged to the master
185branch later. 190branch later by the gitmerge function.
186 191
187However, if you know that the change will be difficult to merge to 192However, if you know that the change will be difficult to merge to the
188master (eg because the code on master has changed a lot), you can 193master (e.g., because the code on master has changed a lot), you can
189apply the change to both master and branch yourself. It could also 194apply the change to both master and branch yourself. It could also
190happen that a change is cherry-picked from master to the release 195happen that a change is cherry-picked from master to the release
191branch, and so doesn't need to be merged back. In these cases, 196branch, and so doesn't need to be merged back. In these cases,
192indicate in the release branch commit log that there is no need to 197say in the release branch commit message that there is no need to merge
193merge the commit to master; start the commit message with "Backport:". 198the commit to master, by starting the commit message with "Backport:".
194gitmerge.el will then exclude that commit from the merge to trunk. 199The gitmerge function excludes these commits from the merge to the master.
195 200
196Some changes should not be merged to master at all, for whatever 201Some changes should not be merged to master at all, for whatever
197reasons. These should be marked by including something like "Do not 202reasons. These should be marked by including something like "Do not
198merge to master" or anything that matches gitmerge-skip-regexp (see 203merge to master" or anything that matches gitmerge-skip-regexp (see
199gitmerge.el) in the log message. 204admin/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
207Bug reports and fixes, feature requests and implementations should be 212Bug reports and fixes, feature requests and implementations should be
208sent to bug-gnu-emacs@gnu.org, the bug/feature list. This is coupled 213sent to bug-gnu-emacs@gnu.org, the bug/feature list. This is coupled
209to the tracker at http://debbugs.gnu.org . 214to the http://debbugs.gnu.org tracker.
210 215
211You can subscribe to the mailing lists, or see the list archives, 216The Savannah info page http://savannah.gnu.org/mail/?group=emacs
212by following links from http://savannah.gnu.org/mail/?group=emacs . 217describes how to subscribe to the mailing lists, or see the list
218archives.
213 219
214To email a patch you can use a shell command like 'git format-patch -1' 220To email a patch you can use a shell command like 'git format-patch -1'
215to create a file, and then attach the file to your email. This nicely 221to 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
222The Emacs issue tracker is at http://debbugs.gnu.org/. The form 228The Emacs issue tracker at http://debbugs.gnu.org lets you view bug
223presented by that page allows to view bug reports and search the 229reports and search the database for bugs matching several criteria.
224database for bugs matching several criteria. Messages posted to the 230Messages posted to the bug-gnu-emacs@gnu.org mailing list, mentioned
225bug-gnu-emacs@gnu.org mailing list, mentioned above, are recorded by 231above, are recorded by the tracker with the corresponding bugs/issues.
226the tracker with the corresponding bugs/issues.
227 232
228GNU ELPA has a 'debbugs' package that allows accessing the tracker 233GNU ELPA has a 'debbugs' package that allows accessing the tracker
229database from Emacs. 234database from Emacs.
230 235
231** Document your changes. 236** Documenting your changes
232 237
233Any change that matters to end-users should have an entry in etc/NEWS. 238Any 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
239that *all* the necessary documentation updates have been made, mark 244that *all* the necessary documentation updates have been made, mark
240the entry with "+++". Otherwise do not mark it. 245the entry with "+++". Otherwise do not mark it.
241 246
242Please see (info "(elisp)Documentation Tips") or 247For more specific tips on Emacs's doc style, see
243https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html 248http://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html
244for more specific tips on Emacs's doc style. Use 'checkdoc' to check 249Use 'checkdoc' to check for documentation errors before submitting a patch.
245for documentation errors before submitting a patch.
246 250
247** Test your changes. 251** Testing your changes
248 252
249Please test your changes before committing them or sending them to the 253Please test your changes before committing them or sending them to the
250list. If possible, add a new test along with any bug fix or new 254list. If possible, add a new test along with any bug fix or new
251functionality you commit (of course, some changes cannot be easily 255functionality you commit (of course, some changes cannot be easily
252tested). 256tested).
253 257
254Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info 258Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See
255"(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/ 259http://www.gnu.org/software/emacs/manual/html_node/ert/
256for more information on writing and running tests. 260or run 'info "(ert)"' for for more information on writing and running
261tests.
257 262
258If your test lasts longer than some few seconds, mark it in its 263If 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"
265for more information. 270for more information.
266 271
267** Understanding Emacs Internals. 272** Understanding Emacs internals
273
274The best way to understand Emacs internals is to read the code. Some
275source files, such as xdisp.c, have extensive comments describing the
276design and implementation. The following resources may also help:
277
278http://www.gnu.org/software/emacs/manual/html_node/elisp/Tips.html
279http://www.gnu.org/software/emacs/manual/html_node/elisp/GNU-Emacs-Internals.html
268 280
269The best way to understand Emacs Internals is to read the code, 281or run 'info "(elisp)Tips"' or 'info "(elisp)GNU Emacs Internals"'.
270but the nodes "Tips" and "GNU Emacs Internals" in the Appendix
271of the Emacs Lisp Reference Manual may also help. Some source files,
272such as xdisp.c, have large commentaries describing the design and
273implementation in more detail.
274 282
275The file etc/DEBUG describes how to debug Emacs bugs. 283The 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
279If you introduce non-ASCII characters into Emacs source files, it is a 287If you introduce non-ASCII characters into Emacs source files, use the
280good idea to add a 'coding' cookie to the file to state its encoding. 288UTF-8 encoding unless it cannot do the job for some good reason.
281Please use the UTF-8 encoding unless it cannot do the job for some 289Although it is generally a good idea to add 'coding:' cookies to
282good reason. As of Emacs 24.4, it is no longer necessary to have 290non-ASCII source files, cookies are not needed in UTF-8-encoded *.el
283explicit 'coding' cookies in *.el files if they are encoded in UTF-8, 291files intended for use only with Emacs version 24.5 and later.
284but other files need them even if encoded in UTF-8. However, if
285an *.el file is intended for use with older Emacs versions (e.g. if
286it's also distributed via ELPA), having an explicit encoding
287specification 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
306planning to make extensive changes to a file after renaming it (or 310planning to make extensive changes to a file after renaming it (or
307moving it to another directory), you should: 311moving 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/>.
336Local variables: 340Local variables:
337mode: outline 341mode: outline
338paragraph-separate: "[ ]*$" 342paragraph-separate: "[ ]*$"
343coding: utf-8
339end: 344end:
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
21Then we want to clone the repository. We normally want to have both 21Then we want to clone the repository. We normally want to have both
22the current trunk and the emacs-24 branch. 22the current master and the emacs-25 branch.
23 23
24mkdir ~/emacs 24mkdir ~/emacs
25cd ~/emacs 25cd ~/emacs
26git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git 26git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git master
27mv 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 29cd emacs-25
30cd emacs-24 30git checkout emacs-25
31git checkout emacs-24
32git config push.default current
33 31
34You now have both branches conveniently accessible, and you can do 32You 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
59as described in ../../CONTRIBUTE. 57as described in ../../CONTRIBUTE.
60 58
61 59
62Backporting to emacs-24 60Backporting to emacs-25
63======================= 61=======================
64 62
65If you have applied a fix to the trunk, but then decide that it should 63If you have applied a fix to the master, but then decide that it should
66be applied to the emacs-24 branch, too, then 64be applied to the emacs-25 branch, too, then
67 65
68cd ~/emacs/trunk 66cd ~/emacs/master
69git log 67git log
70 68
71and find the commit you're looking for. Then find the commit ID, 69and find the commit you're looking for. Then find the commit ID,
@@ -73,7 +71,7 @@ which will look like
73 71
74commit 958b768a6534ae6e77a8547a56fc31b46b63710b 72commit 958b768a6534ae6e77a8547a56fc31b46b63710b
75 73
76cd ~/emacs/emacs-24 74cd ~/emacs/emacs-25
77git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b 75git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b
78 76
79and add "Backport:" to the commit string. Then 77and add "Backport:" to the commit string. Then
@@ -81,17 +79,17 @@ and add "Backport:" to the commit string. Then
81git push 79git push
82 80
83 81
84Merging emacs-24 to trunk/master 82Merging emacs-25 to the master
85================================ 83==============================
86 84
87It is recommended to use the file gitmerge.el in the admin directory 85It is recommended to use the file gitmerge.el in the admin directory
88for merging 'emacs-24' into 'master'. It will take care of many 86for merging 'emacs-25' into 'master'. It will take care of many
89things which would otherwise have to be done manually, like ignoring 87things which would otherwise have to be done manually, like ignoring
90commits that should not land in master, fixing up ChangeLogs and 88commits that should not land in master, fixing up ChangeLogs and
91automatically dealing with certain types of conflicts. If you really 89automatically dealing with certain types of conflicts. If you really
92want to, you can do the merge manually, but then you're on your own. 90want to, you can do the merge manually, but then you're on your own.
93If you still choose to do that, make absolutely sure that you *always* 91If you still choose to do that, make absolutely sure that you *always*
94use the 'merge' command to transport commits from 'emacs-24' to 92use 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
96shouldn't manually do the merge in the first place; just use 94shouldn't manually do the merge in the first place; just use
97gitmerge.el instead. 95gitmerge.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
106You'll be asked for the branch to merge, which will default to 104You'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
108branch is discouraged, since it might not be up-to-date, or worse, 106branch is discouraged, since it might not be up-to-date, or worse,
109contain commits from you which are not yet pushed upstream. 107contain commits from you which are not yet pushed upstream.
110 108
111You will now see the list of commits from 'emacs-24' which are not yet 109You will now see the list of commits from 'emacs-25' which are not yet
112merged to 'master'. You might also see commits that are already 110merged to 'master'. You might also see commits that are already
113marked for "skipping", which means that they will be merged with a 111marked for "skipping", which means that they will be merged with a
114different merge strategy ('ours'), which will effectively ignore the 112different merge strategy ('ours'), which will effectively ignore the