8000 Remove references to FAQ and migrate content (#31) · python/devguide@05f0e18 · GitHub
[go: up one dir, main page]

Skip to content

Commit 05f0e18

Browse files
willingcbrettcannon
authored andcommitted
Remove references to FAQ and migrate content (#31)
1 parent de9aab4 commit 05f0e18

File tree

9 files changed

+233
-203
lines changed

9 files changed

+233
-203
lines changed

committing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ multiple clone approach, and explain in more detail these basic steps.
430430

431431
For more advanced explanations about :ref:`null merges <hg-null-merge>`,
432432
:ref:`heads merges <hg-heads-merge>`, :ref:`merge conflicts
433-
<hg-merge-conflicts>`, etc., see the :ref:`FAQs for core developers
434-
<core-devs-faqs>`.
433+
<hg-merge-conflicts>`, etc., see the :ref:`version control for core developers
434+
<version-core-devs>`.
435435

436436
.. _share extension: https://www.mercurial-scm.org/wiki/ShareExtension
437437

communication.rst

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,32 @@ mailing lists, but also other forms 8000 .
1111
Mailing Lists
1212
-------------
1313

14-
The primary mailing list where discussions about Python's development occur is
15-
python-dev_. The list is open to the public and is subscribed to by all core
14+
python-dev_ is the primary mailing list for discussions about Python's
15+
development. The list is open to the public and is subscribed to by all core
1616
developers plus many people simply interested in following Python's
1717
development. Discussion is focused on issues related to Python's development,
18-
such as how to handle a specific issue, a PEP, etc. Ideas about new
19-
functionality should **not** start here and instead should be sent to
20-
python-ideas_. Technical support questions should also not be asked here and
21-
instead should go to python-list_ or python-help_.
18+
such as how to handle a specific issue, a PEP, etc.::
19+
20+
- Ideas about new functionality should **not** start here and instead
21+
should be sent to python-ideas_.
22+
- Technical support questions should also not be asked here and instead
23+
should go to python-list_ or python-help_.
24+
25+
Python-ideas_ is a mailing list open to the public to discuss ideas on changing
26+
Python. If a new idea does not start here (or python-list_, discussed below),
27+
it will get redirected here.
28+
29+
Sometimes people post new ideas to python-list_ to gather community opinion before
30+
heading to python-ideas_. The list is also sometimes known as comp.lang.python,
31+
the name of the newsgroup it mirrors (it is also known by the abbreviation
32+
c.l.py).
2233

2334
The python-committers_ mailing list is a private mailing list for core
2435
developers (the archives are publicly available).
2536
If something only affects core developers (e.g., the
2637
tree is frozen for commits, etc.), it is discussed here instead of python-dev
2738
to keep traffic down on the latter.
2839

29-
Python-ideas_ is a mailing list open to the public to discuss ideas on changing
30-
Python. If a new idea does not start here (or python-list_, discussed below),
31-
it will get redirected here.
32-
3340
Python-checkins_ sends out an email for every commit to Python's various
3441
repositories from https://hg.python.org. All core developers
3542
subscribe to this list and are known to reply to these emails to make comments
@@ -41,10 +48,9 @@ only want an email for when a new issue is open, subscribe to
4148
new-bugs-announce_. If you would rather receive an email for all changes made
4249
to any issue, subscribe to python-bugs-list_.
4350

44-
Sometimes people post new ideas to python-list_ to gather community opinion before
45-
heading to python-ideas_. The list is also sometimes known as comp.lang.python,
46-
the name of the newsgroup is mirrors (it is also known by the abbreviation
47-
c.l.py).
51+
General Python questions should go to `python-list`_ or `tutor`_
52+
or similar resources, such as StackOverflow_ or the ``#python`` IRC channel
53+
on Freenode_.
4854

4955
A complete list of Python mailing lists can be found at http://mail.python.org.
5056
Most lists are also mirrored at http://news.gmane.org/ and can be read and
@@ -60,6 +66,9 @@ RSS feed readers.
6066
.. _python-help: http://mail.python.org/mailman/listinfo/python-help
6167
.. _python-ideas: http://mail.python.org/mailman/listinfo/python-ideas
6268
.. _python-list: http://mail.python.org/mailman/listinfo/python-list
69+
.. _tutor: http://mail.python.org/mailman/listinfo/tutor
70+
.. _StackOverflow: http://stackoverflow.com/
71+
.. _Freenode: http://freenode.net/
6372

6473

6574
IRC
@@ -79,3 +88,15 @@ Blogs
7988
Several core developers are active bloggers and discuss Python's development
8089
that way. You can find their blogs (and various other developers who use Python)
8190
at http://planet.python.org/.
91+
92+
93+
Standards of behaviour in these communication channels
94+
------------------------------------------------------
95+
We try to foster environments of mutual respect, tolerance and encouragement,
96+
as described in the PSF's `Diversity Statement`_. Abiding by the guidelines
97+
in this document and asking questions or posting suggestions in the
98+
appropriate channels are an excellent way to get started on the mutual respect
99+
part, greatly increasing the chances of receiving tolerance and encouragement
100+
in return.
101+
102+
.. _Diversity Statement: http://www.python.org/psf/diversity/

coredev.rst

Lines changed: 140 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ You need to provide an SSH-2 key to be able to commit code. You may have
6464
multiple keys if you wish (e.g., for work and home). Using Ed25519 keys is
6565
encouraged. Send your key as an attachment in an email to
6666
hgaccounts@python.org along with your GitHub username so you can be added to
67-
the "Python core" team at https://github.com/python. Help in generating an SSH
68-
key can be found in the :ref:`faq`.
67+
the "Python core" team at https://github.com/python.
6968

7069
Your SSH key will be set to a username in the form of "first_name.last_name".
7170
This should match your username on the issue tracker.
@@ -165,3 +164,142 @@ break or figure out what you need to do to make it enjoyable again.
165164

166165

167166
.. _PSF Code of Conduct: https://www.python.org/psf/codeofconduct/
167+
168+
169+
.. _version-core-devs:
170+
171+
Version control for core developers
172+
-----------------------------------
173+
174+
.. _hg-commit:
175+
176+
How do I commit a change to a file?
177+
'''''''''''''''''''''''''''''''''''
178+
179+
To commit any changes to a file (which includes adding a new file or deleting
180+
an existing one), you use the command::
181+
182+
hg commit [PATH]
183+
184+
``PATH`` is optional: if it is omitted, all changes in your working copy
185+
will be committed to the local repository. When you commit, be sure that all
186+
changes are desired by :ref:`reviewing them first <hg-status>`;
187+
also, when making commits that you intend to push to public repositories,
188+
you should **not** commit together unrelated changes.
189+
190+
To abort a commit that you are in the middle of, leave the message
191+
empty (i.e., close the text editor without adding any text for the
192+
message). Mercurial will then abort the commit operation so that you can
193+
try again later.
194+
195+
Once a change is committed to your local repository, it is still only visible
196+
by you. This means you are free to experiment with as many local commits
197+
you feel like.
198+
199+
.. note::
200+
If you do not like the default text editor Mercurial uses for
201+
entering commit messages, you may specify a different editor,
202+
either by changing the ``EDITOR`` environment variable or by setting
203+
a Mercurial-specific editor in your global ``.hgrc`` with the ``editor``
204+
option in the ``[ui]`` section.
205+
206+
207+
.. _hg-merge-conflicts:
208+
209+
How do I solve merge conflicts?
210+
'''''''''''''''''''''''''''''''
211+
212+
The easiest way is to install KDiff3 --- Mercurial will open it automatically
213+
in case of conflicts, and you can then use it to solve the conflicts and
214+
save the resulting file(s). KDiff3 will also take care of marking the
215+
conflicts as resolved.
216+
217+
If you don't use a merge tool, you can use ``hg resolve --list`` to list the
218+
conflicting files, resolve the conflicts manually, and the use
219+
``hg resolve --mark <file path>`` to mark these conflicts as resolved.
220+
You can also use ``hg resolve -am`` to mark all the conflicts as resolved.
221+
222+
.. note::
223+
Mercurial will use KDiff3 automatically if it's installed and it can find
224+
it --- you don't need to change any settings. KDiff3 is also already
225+
included in the installer of TortoiseHg. For more information, see
226+
https://www.mercurial-scm.org/wiki/KDiff3.
227+
228+
229+
.. _hg-null-merge:
230+
231+
How do I make a null merge?
232+
'''''''''''''''''''''''''''
233+
234+
If you committed something (e.g. on 3.5) that shouldn't be ported on newer
235+
branches (e.g. on default), you have to do a *null merge*::
236+
237+
cd 3.x
238+
hg merge 3.5
239+
hg revert -ar default
240+
hg resolve -am # needed only if the merge created conflicts
241+
hg ci -m '#12345: null merge with 3.5.'
242+
243+
Before committing, ``hg status`` should list all the merged files as ``M``,
244+
but ``hg diff`` should produce no output. This will record the merge without
245+
actually changing the content of the files.
246+
247+
248+
.. _hg-heads-merge:
249+
250+
I got "abort: push creates new remote heads!" while pushing, what do I do?
251+
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
252+
253+
If you see this message while pushing, it means that you committed something
254+
on a clone that was not up to date, thus creating a new head.
255+
This usually happens for two reasons:
256+
257+
1. You forgot to run ``hg pull`` and/or ``hg up`` before committing;
258+
2. Someone else pushed on the main repo just before you, causing a push race;
259+
260+
First of all you should pull the new changesets using ``hg pull``. Then you can
261+
use ``hg heads`` to see which branches have multiple heads.
262+
263+
If only one branch has multiple heads, you can do::
264+
265+
cd default
266+
hg heads .
267+
hg up csid-of-the-other-head
268+
hg merge
269+
hg ci -m 'Merge heads.'
270+
271+
``hg heads .`` will show you the two heads of the current branch: the one you
272+
pulled and the one you created with your commit (you can also specify a branch
273+
with ``hg heads <branch>``). While not strictly necessary, it is highly
274+
recommended to switch to the other head before merging. This way you will be
275+
merging only your changeset with the rest, and in case of conflicts it will be
276+
a lot easier.
277+
278+
If more than one branch has multiple heads, you have to repeat these steps for
279+
each branch. Since this creates new changesets, you will also have to
280+
:ref:`merge them between branches <branch-merge>`. For example, if both ``3.5``
281+
and ``default`` have multiple heads, you should first merge heads in ``3.5``,
282+
then merge heads in ``default``, and finally merge ``3.5`` with ``default``
283+
using ``hg merge 3.5`` as usual.
284+
285+
In order to avoid this, you should *always remember to pull and update before
286+
committing*.
287+
288+
289+
How do I undo the changes made in a recent commit?
290+
''''''''''''''''''''''''''''''''''''''''''''''''''
291+
292+
First, this should not happen if you take the habit of :ref:`reviewing changes
293+
<hg-status>` before committing them.
294+
295+
In any case, run::
296+
297+
hg backout <revision number>
298+
299+
This will modify your working copy so that all changes in ``<revision number>``
300+
(including added or deleted files) are undone. You then need to :ref:`commit
301+
<hg-commit>` these changes so that the backout gets permanently recorded.
302+
303+
.. note::
304+
These instructions are for Mercurial 1.7 and higher. ``hg backout`` has
305+
a slightly different behaviour in versions before 1.7.

0 commit comments

Comments
 (0)
0