~ubuntu-branches/ubuntu/quantal/python-django/quantal

« back to all changes in this revision

Viewing changes to docs/internals/svn.txt

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda
  • Date: 2009-10-12 19:22:16 UTC
  • mfrom: (1.1.9 upstream) (4.4.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091012192216-l4wb7fp72wow19zp
Tags: 1.1.1-1ubuntu1
* Merge python-django 1.1.1-1 from debian unstable (LP: #447617)
  for security and bug fixes, all Ubuntu changes merged by Debian.
* Add to debian/patches:
  - 20_python2.6.3_regression.patch - backported upstream commit 11620
    to make Django work with Python 2.6.3 properly. (LP: #445639)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _internals-svn:
 
2
 
 
3
=================================
 
4
The Django source code repository
 
5
=================================
 
6
 
 
7
 
 
8
When deploying a Django application into a real production
 
9
environment, you will almost always want to use `an official packaged
 
10
release of Django`_. However, if you'd like to try out in-development
 
11
code from an upcoming release or contribute to the development of
 
12
Django, you'll need to obtain a checkout from Django's source code
 
13
repository. This document covers the way the code repository is laid
 
14
out and how to work with and find things in it.
 
15
 
 
16
 
 
17
.. _an official packaged release of Django: http://www.djangoproject.com/download/
 
18
 
 
19
 
 
20
High-level overview
 
21
===================
 
22
 
 
23
The Django source code repository uses `Subversion`_ to track changes
 
24
to the code over time, so you'll need a copy of the Subversion client
 
25
(a program called ``svn``) on your computer, and you'll want to
 
26
familiarize yourself with the basics of how Subversion
 
27
works. Subversion's web site offers downloads for various operating
 
28
systems, and `a free online book`_ is available to help you get up to
 
29
speed with using Subversion.
 
30
 
 
31
The Django Subversion repository is located online at
 
32
`code.djangoproject.com/svn <http://code.djangoproject.com/svn/>`_. `A
 
33
friendly Web-based interface for browsing the code`_ is also
 
34
available, though when using Subversion you'll always want to use the
 
35
repository address instead. At the top level of the repository are two
 
36
directories: ``django`` contains the full source code for all Django
 
37
releases, while ``djangoproject.com`` contains the source code and
 
38
templates for the `djangoproject.com <http://www.djangoproject.com/>`_
 
39
web site. For trying out in-development Django code, or contributing
 
40
to Django, you'll always want to check out code from some location in
 
41
the ``django`` directory.
 
42
 
 
43
Inside the ``django`` directory, Django's source code is organized
 
44
into three areas:
 
45
 
 
46
* ``branches`` contains branched copies of Django's code, which are
 
47
  (or were) maintained for various purposes. Some branches exist to
 
48
  provide a place to develop major or experimental new features
 
49
  without affecting the rest of Django's code, while others serve to
 
50
  provide bug fixes or support for older Django releases.
 
51
 
 
52
* ``tags`` contains snapshots of Django's code at various important
 
53
  points in its history; mostly these are the exact revisions from
 
54
  which packaged Django releases were produced.
 
55
 
 
56
* ``trunk`` contains the main in-development code which will become
 
57
  the next packaged release of Django, and is where most development
 
58
  activity is focused.
 
59
 
 
60
 
 
61
.. _Subversion: http://subversion.tigris.org/
 
62
.. _a free online book: http://svnbook.red-bean.com/
 
63
.. _A friendly web-based interface for browsing the code: http://code.djangoproject.com/browser/
 
64
 
 
65
 
 
66
Working with Django's trunk
 
67
===========================
 
68
 
 
69
If you'd like to try out the in-development code for the next release
 
70
of Django, or if you'd like to contribute to Django by fixing bugs or
 
71
developing new features, you'll want to get the code from trunk. You
 
72
can get a complete copy of this code (a "Subversion checkout") by
 
73
typing::
 
74
 
 
75
    svn co http://code.djangoproject.com/svn/django/trunk/
 
76
 
 
77
Note that this will get *all* of Django: in addition to the top-level
 
78
``django`` module containing Python code, you'll also get a copy of
 
79
Django's documentation, unit-test suite, packaging scripts and other
 
80
miscellaneous bits. Django's code will be present in your checkout as
 
81
a directory named ``django``.
 
82
 
 
83
To try out the in-development trunk code with your own applications,
 
84
simply place the directory containing your checkout on your Python
 
85
import path. Then ``import`` statements which look for Django will find
 
86
the ``django`` module within your checkout.
 
87
 
 
88
If you're going to be working on Django's code (say, to fix a bug or
 
89
develop a new feature), you can probably stop reading here and move
 
90
over to :ref:`the documentation for contributing to Django
 
91
<internals-contributing>`, which covers things like the preferred
 
92
coding style and how to generate and submit a patch.
 
93
 
 
94
 
 
95
Branches
 
96
========
 
97
 
 
98
Django uses branches for two main purposes:
 
99
 
 
100
1. Development of major or experimental features, to keep them from
 
101
   affecting progress on other work in trunk.
 
102
 
 
103
2. Security and bug-fix support for older releases of Django, during
 
104
   their support lifetimes.
 
105
 
 
106
 
 
107
Feature-development branches
 
108
----------------------------
 
109
 
 
110
Feature-development branches tend by their nature to be
 
111
temporary. Some produce successful features which are merged back into
 
112
Django's trunk to become part of an official release, but others do
 
113
not; in either case there comes a time when the branch is no longer
 
114
being actively worked on by any developer. At this point the branch is
 
115
considered closed.
 
116
 
 
117
Unfortunately, Subversion has no standard way of indicating this. As a
 
118
workaround, branches of Django which are closed and no longer
 
119
maintained are moved into the directory ``django/branches/attic``.
 
120
 
 
121
For reference, the following are branches whose code eventually became
 
122
part of Django itself, and so are no longer separately maintained:
 
123
 
 
124
* ``boulder-oracle-sprint``: Added support for Oracle databases to
 
125
  Django's object-relational mapper. This has been part of Django
 
126
  since the 1.0 release.
 
127
 
 
128
* ``gis``: Added support for geographic/spatial queries to Django's
 
129
  object-relational mapper. This has been part of Django since the 1.0
 
130
  release, as the bundled application ``django.contrib.gis``.
 
131
 
 
132
* ``i18n``: Added :ref:`internationalization support <topics-i18n>` to
 
133
  Django. This has been part of Django since the 0.90 release.
 
134
 
 
135
* ``magic-removal``: A major refactoring of both the internals and
 
136
  public APIs of Django's object-relational mapper. This has been part
 
137
  of Django since the 0.95 release.
 
138
 
 
139
* ``multi-auth``: A refactoring of :ref:`Django's bundled
 
140
  authentication framework <topics-auth>` which added support for
 
141
  :ref:`authentication backends <authentication-backends>`. This has
 
142
  been part of Django since the 0.95 release.
 
143
 
 
144
* ``new-admin``: A refactoring of :ref:`Django's bundled
 
145
  administrative application <ref-contrib-admin>`. This became part of
 
146
  Django as of the 0.91 release, but was superseded by another
 
147
  refactoring (see next listing) prior to the Django 1.0 release.
 
148
 
 
149
* ``newforms-admin``: The second refactoring of Django's bundled
 
150
  administrative application. This became part of Django as of the 1.0
 
151
  release, and is the basis of the current incarnation of
 
152
  ``django.contrib.admin``.
 
153
 
 
154
* ``queryset-refactor``: A refactoring of the internals of Django's
 
155
  object-relational mapper. This became part of Django as of the 1.0
 
156
  release.
 
157
 
 
158
* ``unicode``: A refactoring of Django's internals to consistently use
 
159
  Unicode-based strings in most places within Django and Django
 
160
  applications. This became part of Django as of the 1.0 release.
 
161
 
 
162
Additionally, the following branches are closed, but their code was
 
163
never merged into Django and the features they aimed to implement
 
164
were never finished:
 
165
 
 
166
* ``full-history``
 
167
 
 
168
* ``generic-auth``
 
169
 
 
170
* ``multiple-db-support``
 
171
 
 
172
* ``per-object-permissions``
 
173
 
 
174
* ``schema-evolution``
 
175
 
 
176
* ``schema-evolution-ng``
 
177
 
 
178
* ``search-api``
 
179
 
 
180
* ``sqlalchemy``
 
181
 
 
182
All of the above-mentioned branches now reside in
 
183
``django/branches/attic``.
 
184
 
 
185
 
 
186
Support and bugfix branches
 
187
---------------------------
 
188
 
 
189
In addition to fixing bugs in current trunk, the Django project
 
190
provides official bug-fix support for the most recent released version
 
191
of Django, and security support for the two most recently-released
 
192
versions of Django. This support is provided via branches in which the
 
193
necessary bug or security fixes are applied; the branches are then
 
194
used as the basis for issuing bugfix or security releases.
 
195
 
 
196
As of the Django 1.0 release, these branches can be found in the
 
197
repository in the directory ``django/branches/releases``, and new branches
 
198
will be created there approximately one month after each new Django
 
199
release. For example, shortly after the release of Django 1.0, the
 
200
branch ``django/branches/releases/1.0.X`` was created to receive bug
 
201
fixes, and shortly after the release of Django 1.1 the branch
 
202
``django/branches/releases/1.1.X`` was created.
 
203
 
 
204
Prior to the Django 1.0 release, these branches were maintaind within
 
205
the top-level ``django/branches`` directory, and so the following
 
206
branches exist there and provided support for older Django releases:
 
207
 
 
208
* ``0.90-bugfixes``
 
209
 
 
210
* ``0.91-bugfixes``
 
211
 
 
212
* ``0.95-bugfixes``
 
213
 
 
214
* ``0.96-bugfixes``
 
215
 
 
216
Official support for those releases has expired, and so they no longer
 
217
receive direct maintenance from the Django project. However, the
 
218
branches continue to exist and interested community members have
 
219
occasionally used them to provide unofficial support for old Django
 
220
releases.
 
221
 
 
222
 
 
223
Tags
 
224
====
 
225
 
 
226
The directory ``django/tags`` within the repository contains complete
 
227
copies of the Django source code as it existed at various points in
 
228
its history. These "tagged" copies of Django are *never* changed or
 
229
updated; new tags may be added as needed, but once added they are
 
230
considered read-only and serve as useful guides to Django's
 
231
development history.
 
232
 
 
233
Within ``django/tags/releases`` are copies of the code which formed each
 
234
packaged release of Django, and each tag is named with the version
 
235
number of the release to which it corresponds. So, for example,
 
236
``django/tags/releases/1.1`` is a complete copy of the code which was
 
237
packaged as the Django 1.1 release.
 
238
 
 
239
Within ``django/tags/notable_moments`` are copies of the Django code from
 
240
points which do not directly correspond to releases, but which are
 
241
nonetheless important historical milestones for Django
 
242
development. The current "notable moments" marked there are:
 
243
 
 
244
* ``ipo``: Django's code as it existed at the moment Django was first
 
245
  publicly announced in 2005.
 
246
 
 
247
* ``pre-magic-removal``: The state of Django's code just before the
 
248
  merging of the ``magic-removal`` branch (described above), which
 
249
  significantly updated Django's object-relational mapper.
 
250
 
 
251
* ``pre-newforms-admin``: The state of Django's code just before the
 
252
  merging of the ``newforms-admin`` branch (see above), which
 
253
  significantly updated Django's bundled administrative application.
 
254
 
 
255
* Tags corresponding to each of the alpha, beta and release-candidate
 
256
  packages in the run up to the Django 1.0 release.