File: repository.txt

package info (click to toggle)
python-docutils 0.19%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,668 kB
  • sloc: python: 45,630; lisp: 14,475; xml: 1,789; javascript: 1,032; sh: 130; makefile: 104
file content (315 lines) | stat: -rw-r--r-- 9,521 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
.. include:: ../header.txt

=====================================
 The Docutils_ Version Repository
=====================================

:Author: Lea Wiemann, Docutils developers
:Contact: docutils-develop@lists.sourceforge.net
:Revision: $Revision: 9051 $
:Date: $Date: 2022-04-02 23:59:06 +0200 (Sa, 02. Apr 2022) $
:Copyright: This document has been placed in the public domain.

.. _Docutils: https://docutils.sourceforge.io/

.. admonition:: Quick Instructions

   To get a checkout of the Docutils source tree (with the
   sandboxes) with SVN_, type ::

       svn checkout https://svn.code.sf.net/p/docutils/code/trunk docutils-code

   Users of Git_ can clone a mirror of the docutils repository with ::

      git clone git://repo.or.cz/docutils.git

   If you are going to commit changes to the repository, please read
   the **whole document**, especially the section "`Information for
   Developers`_"!

Docutils uses a Subversion_ (SVN) repository located at
``docutils.svn.sourceforge.net``.

While Unix and Mac OS X users will probably prefer the standard
Subversion command line interface, Windows user may want to try
TortoiseSVN_, a convenient explorer extension.  The instructions apply
analogously.

There is a Git_ mirror at http://repo.or.cz/docutils.git providing
`web access`_ and the base for `creating a local Git clone`_.
[#github-mirrors]_

For the project policy on repository use (check-in requirements,
branching, etc.), please see the `Docutils Project Policies`__.

__ policies.html#subversion-repository

.. _SVN:
.. _Subversion: https://subversion.apache.org/
.. _TortoiseSVN: https://tortoisesvn.net/
.. _SourceForge.net: https://sourceforge.net/
.. _Git: http://git-scm.com/

.. contents::


Accessing the Repository
========================

Web Access
----------

The repository can be browsed and examined via the web at
https://sourceforge.net/p/docutils/code.

Alternatively, use the web interface at http://repo.or.cz/docutils.git.
[#github-mirrors]_

.. [#github-mirrors] There are also 3rd-party mirrors and forks at
   GitHub, some of them orphaned. At the time of this writing (2021-11-03),
   https://github.com/live-clones/docutils/tree/master/docutils
   provides an hourly updated clone.

Repository Access Methods
-------------------------

To get a checkout, first determine the root of the repository depending
on your preferred protocol:

anonymous access: (read only)
    Subversion_: ``https://svn.code.sf.net/p/docutils/code``

    Git_: ``git://repo.or.cz/docutils.git``

`developer access`_: (read and write)
    ``svn+ssh://<USERNAME>@svn.code.sf.net/p/docutils/code``

Checking Out the Repository
---------------------------

.. _creating a local Git clone:

Git_ users can clone a mirror of the docutils repository with ::

      git clone git://repo.or.cz/docutils.git

and proceed according to the `Git documentation`_.
Developer access (read and write) is possible with `git svn`_.

.. _Git documentation: https://git.wiki.kernel.org/index.php/GitDocumentation
.. _git svn: https://git.wiki.kernel.org/index.php/Git-svn

Subversion_ users can use the following commands
(substitute your preferred repository root for ROOT):

* To check out only the current main source tree of Docutils, type ::

    svn checkout ROOT/trunk/docutils

* To check out everything (main tree, sandboxes, web site, and parallel
  projects), type ::

    svn checkout ROOT/trunk docutils

  This will create a working copy of the whole trunk in a new directory
  called ``docutils``.

Note that you probably do *not* want to check out the ROOT itself
(without "/trunk"), because then you'd end up fetching the whole
Docutils tree for every branch and tag over and over again.

To update your working copy later on, ``cd`` into the working copy and
type ::

    svn update

Switching the Repository Root
-----------------------------

If you changed your mind and want to use a different repository root,
``cd`` into your working copy and type::

    svn switch --relocate OLDROOT NEWROOT


Editable installs
=================

There are several ways to ensure that edits to the Docutils code are
picked up by Python.
We'll assume that the Docutils "trunk" is checked out under the
``~/projects/`` directory.

1. Do an `editable install`__ with pip_::

     python3 -m pip install -e ~/projects/docutils/docutils

   __ https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs

2. Install in `development mode`__ with setuptools_.

   __ https://setuptools.pypa.io/en/latest/userguide/development_mode.html
      #development-mode

   .. _install manually:

3. Install "manually".

   Ensure that the "docutils" package is in ``sys.path`` by
   one of the following actions:

   * Set the ``PYTHONPATH`` environment variable so that Python
     picks up your local working copy of the code.

     For the bash shell, add this to your ``~/.profile``::

         PYTHONPATH=$HOME/projects/docutils/docutils
         export PYTHONPATH

     The first line points to the directory containing the ``docutils``
     package.  The second line exports the environment variable.

   * Create a symlink to the docutils package directory somewhere in the
     module search path (``sys.path``), e.g., ::

         ln -s ~/projects/docutils/docutils \
               /usr/local/lib/python3.9/dist-packages/

   * Use a `path configuration file`__.

     __ https://docs.python.org/library/site.html

   Optionally, add some or all `front-end tools`_
   to the binary search path, e.g.,
   add the ``tools`` directory to the ``PATH`` variable::

         PATH=$PATH:$HOME/projects/docutils/docutils/tools
         export PATH

   or link idividual front-end tools to a suitable place
   in the binary path::

         ln -s ~/projects/docutils/docutils/tools/docutils-cli.py \
               /usr/local/bin/docutils

5. Reinstall Docutils after any change::

       python3 setup.py install

   .. CAUTION::

      This method is **not** recommended for day-to-day development;
      it's too easy to forget.  Confusion inevitably ensues.

      If you install Docutils this way, Python will always pick up the
      last-installed copy of the code.  If you ever forget to
      reinstall the "docutils" package, Python won't see your latest
      changes.

A useful addition to the ``docutils`` top-level directory in branches
and alternate copies of the code is a ``set-PATHS`` file
containing the following lines::

    # source this file
    export PYTHONPATH=$PWD:$PWD
    export PATH=$PWD/tools:$PATH

Open a shell for this branch, ``cd`` to the ``docutils`` top-level
directory, and "source" this file.  For example, using the bash
shell::

    $ cd some-branch/docutils
    $ . set-PATHS

.. _pip: https://pypi.org/project/pip/
.. _setuptools: https://pypi.org/project/setuptools/
.. _front-end tools: ../user/tools.html


.. _developer access:

Information for Developers
==========================

If you would like to have write access to the repository, register
with SourceForge.net_ and send your SourceForge.net
user names to docutils-develop@lists.sourceforge.net.
(Note that there may be a delay of several hours until you can commit
changes to the repository.)

Sourceforge SVN access is documented `here`__

__ https://sourceforge.net/p/forge/documentation/svn/


Ensure any changes comply with the `Docutils Project Policies`_
before `checking in`_,

.. _Docutils Project Policies: policies.html
.. _checking in: policies.html#check-ins


Setting Up Your Subversion Client For Development
-------------------------------------------------

Before committing changes to the repository, please ensure that the
following lines are contained (and uncommented) in your local
~/.subversion/config file, so that new files are added with the
correct properties set::

    [miscellany]
    # For your convenience:
    global-ignores = ... *.pyc ...
    # For correct properties:
    enable-auto-props = yes

    [auto-props]
    *.py = svn:eol-style=native;svn:keywords=Author Date Id Revision
    *.txt = svn:eol-style=native;svn:keywords=Author Date Id Revision
    *.html = svn:eol-style=native;svn:keywords=Author Date Id Revision
    *.xml = svn:eol-style=native;svn:keywords=Author Date Id Revision
    *.tex = svn:eol-style=native;svn:keywords=Author Date Id Revision
    *.css = svn:eol-style=native;svn:keywords=Author Date Id Revision
    *.patch = svn:eol-style=native
    *.sh = svn:eol-style=native;svn:executable;svn:keywords=Author Date Id Revision
    *.png = svn:mime-type=image/png
    *.jpg = svn:mime-type=image/jpeg
    *.gif = svn:mime-type=image/gif


Repository Layout
=================

The following tree shows the repository layout::

    docutils/
    |-- branches/
    |   |-- branch1/
    |   |   |-- docutils/
    |   |   |-- sandbox/
    |   |   `-- web/
    |   `-- branch2/
    |       |-- docutils/
    |       |-- sandbox/
    |       `-- web/
    |-- tags/
    |   |-- tag1/
    |   |   |-- docutils/
    |   |   |-- sandbox/
    |   |   `-- web/
    |   `-- tag2/
    |       |-- docutils/
    |       |-- sandbox/
    |       `-- web/
    `-- trunk/
        |-- docutils/
        |-- sandbox/
        `-- web/

The main source tree lives at ``docutils/trunk/docutils/``, next to
the sandboxes (``docutils/trunk/sandbox/``) and the web site files
(``docutils/trunk/web/``).

``docutils/branches/`` and ``docutils/tags/`` contain (shallow) copies
of either the whole trunk or only the main source tree
(``docutils/trunk/docutils``).