Commits

Anonymous committed da3f7f9 Draft

merging trac-1.0 into trunk/trac - towards #159

Comments (0)

Files changed (302)

  * Francois Harvey <fharvey@securiweb.net>
  * Mark Rowe <trac@bdash.net.nz> 
  * Matthew Good <trac@matt-good.net>
- * Christian Boos <cboos@neuf.fr>
+ * Christian Boos <cboos@edgewall.org>
  * Emmanuel Blot <emmanuel.blot@free.fr>
  * Alec Thomas <alec@swapoff.org>
  * Tim Hatch <trac@timhatch.com>
+Trac 1.0 'Cell' (September 7, 2012)
+http://svn.edgewall.org/repos/trac/tags/trac-1.0
+
+Trac 1.0 is a major release adding refreshed user interface and
+improved DVCS repository support as the most visible changes.
+
+The following list contains only a few highlights:
+
+ - The default theme looks more modern, especially on recent browsers
+   (no effort has been made to make it look better on older browsers
+   like IE6 or 7)
+ - The TracHacks GitPlugin has been donated by Herbert Valerio Riedel
+   to the Trac project (many thanks!) and is now maintained here as an
+   optional component
+ - As a consequence, the Subversion support has been moved below
+   `tracopt.versioncontrol` as well
+ - The Git and Mercurial log view feature a visualization of the
+   branching structure
+ - Usability improvements for the tickets, with a better support for
+   conflict detection and resolution
+ - Integration of the TracHacks BatchModifyPlugin, contributed by
+   Brian Meeker (many thanks!) and is now maintained there as a
+   default component
+ - jQuery/UI integration, featuring a date picker for date fields
+ - Improved integration with Pygments syntax highlighting
+ - ... and numerous smaller features added and bugs fixed since 0.12!
+
+Trac 1.0-rc1 'Cell' (September 1, 2012)
+http://svn.edgewall.org/repos/trac/tags/trac-1.0rc1
+
+ See 1.0
+
+Trac 1.0-beta1 'Cell' (August 6, 2012)
+http://svn.edgewall.org/repos/trac/tags/trac-1.0b1
+
+ See 1.0-rc1
+
+-----------------------------------------------------------------------------
+
+Trac 0.12.4 (September 7, 2012)
+http://svn.edgewall.org/repos/trac/tags/trac-0.12.4
+
+Trac 0.12.4 is a regular maintenance release and contains 
+a few minor fixes.
+
 Trac 0.12.3 (February 6, 2012)
 http://svn.edgewall.org/repos/trac/tags/trac-0.12.3
 
  - added compatibility with Subversion 1.7 (#10414)
  - make it easier to troubleshoot common startup errors (#10024)
  - jQuery upgraded to 1.4.4 (#10001)
- - improved fine-grained permission handling in the source browser 
+ - improved fine-grained permission handling in the source browser
    (#9976, #10208, #10110)
+ - added compatibility with MySQL 5.5.3 utf8mb4 databases (#9766)
  - ... and dozens more fixes!
 
 Trac 0.12.2 (January 31, 2011)
 
 This list contains only a few highlights:
  - db: improve concurrency behavior (#9111)
- - fcgi: add an environment variable `TRAC_USE_FLUP` to control the usage of flup vs. bundled _fcgi.py (defaults to 0, i.e. use bundled as before)
+ - fcgi: add an environment variable `TRAC_USE_FLUP` to control the
+   usage of flup vs. bundled _fcgi.py (defaults to 0, i.e. use bundled
+   as before)
  - svn authz: improve compatibility with svn 1.5 format (#8289)
  - milestone: allow to set the time for the due date (#6369, #9582)
  - ticket: fixes for the CC: property (#8597, #9522)
- - notification: improved the formatting of ticket fields in notification e-mails (#9484, #9494) 
+ - notification: improved the formatting of ticket fields in
+   notification e-mails (#9484, #9494)
  - i18n: added a configuration option to set the default language (#8117)
  - several fixes for upgrade (#9400, #9416, #9483, #9556)
 
 Trac 0.12 'Babel' (June 13, 2010)
 http://svn.edgewall.org/repos/trac/tags/trac-0.12
 
-Trac 0.12 is a major release introducing i18n and multiple repository support as the most visible changes.
+Trac 0.12 is a major release introducing i18n and multiple repository
+support as the most visible changes.
 
 The following list contains only a few highlights:
  - The user interface is translated in a dozen of languages, provided the
    [Babel:] package is installed
- - Multiple repositories can be associated to a single Trac environment; the
-   repositories can be of heterogeneous types (svn, hg, git, darcs...)
- - Usability improvements for the Wiki, with a nice side-by-side edit mode with
-   automatic preview
+ - Multiple repositories can be associated to a single Trac
+   environment; the repositories can be of heterogeneous types (svn,
+   hg, git, darcs...)
+ - Usability improvements for the Wiki, with a nice side-by-side edit
+   mode with automatic preview
  - Richer Wiki syntax, with much improved support for tables, partial
    WikiCreole compatibility and numerous smaller improvements
- - Usability improvements for the Ticket module, with automatic preview of
-   comments while you type and possibility to edit or remove them later
+ - Usability improvements for the Ticket module, with automatic
+   preview of comments while you type and possibility to edit or
+   remove them later
  - Improved Custom Queries (time fields, multiple disjoint conditions,
    a.k.a. OR queries)
  - Timeline filtering by user
 
   See 0.12.
 
+-----------------------------------------------------------------------------
+
 Trac 0.11.7 (March 10, 2010)
 http://svn.edgewall.org/repos/trac/tags/trac-0.11.7
 
 http://svn.edgewall.org/repos/trac/tags/trac-0.11.7rc1
 
 Security fixes:
- - Fixed a ticket validation issue that would allow unauthorized users to modify the status and resolution of a ticket (#8884)
+ - Fixed a ticket validation issue that would allow unauthorized users
+   to modify the status and resolution of a ticket (#8884)
 
 Performance improvements:
- - Trac wiki had some trouble handling very long unicode words (#9025) [[comment(intentionally kept vague, we don't want to advertize a DOS, do we?)]]
+ - Trac wiki had some trouble handling very long unicode words (#9025)
+   [[comment(intentionally kept vague, we don't want to advertize a
+   DOS, do we?)]]
  - Full text search was very slow if lots of custom fields were used (#8935)
 
 Bug fixes:
- - Fixed a race condition that could lead to the destruction of the trac.ini file (#8623)
- - Fixed creation of new milestone which could have been a rename if performed after a name clash has been detected (#8816)
+ - Fixed a race condition that could lead to the destruction of the
+   trac.ini file (#8623)
+ - Fixed creation of new milestone which could have been a rename if
+   performed after a name clash has been detected (#8816)
  - Fixed display of value 0 in report cells (#7512)
 
 Trac 0.11.6 (November 28, 2009)
 
  See 0.11b2.
 
+-----------------------------------------------------------------------------
+
 Trac 0.10.5 (Jun 23, 2008)
 http://svn.edgewall.org/repos/trac/tags/trac-0.10.5
 
  Trac 0.10.4 is a bug fix release. The following list contains only a 
  few highlights:
 
- * Repository cache improvements. The new syncing scheme is incompatible with
-   the previous one and requires a database schema upgrade in order to prevent
-   the old and the new codebase to be mixed. A repository resync is not needed,
-   though. The 0.10.4 scheme is compatible with the 0.11 one.
-   (#3837, #4043 and #4586)
+ * Repository cache improvements. The new syncing scheme is
+   incompatible with the previous one and requires a database schema
+   upgrade in order to prevent the old and the new codebase to be
+   mixed. A repository resync is not needed, though. The 0.10.4 scheme
+   is compatible with the 0.11 one.  (#3837, #4043 and #4586)
  * Fix a possible freeze under heavy load (#4465)
 
  The complete list of closed tickets can be found here:
    unsafe (user provided) content is available for download. This behaviour
    can be altered using the "render_unsafe_content" option in the 
    "attachment" and "browser" sections of trac.ini.
- * Fixed XSS vulnerability in "download wiki page as text" in combination with 
-   Microsoft IE. Reported by Yoshinori Oota, Business Architects Inc.
+ * Fixed XSS vulnerability in "download wiki page as text" in
+   combination with Microsoft IE. Reported by Yoshinori Oota, Business
+   Architects Inc.
 
 Trac 0.10.3 (Dec 12, 2006)
 http://svn.edgewall.org/repos/trac/tags/trac-0.10.3
 
  See 0.10
 
-----
+-----------------------------------------------------------------------------
 
 Trac 0.9.6  (Jul 6, 2006)
 http://svn.edgewall.org/repos/trac/tags/trac-0.9.6
 
- * Fixed reStructuredText breach of privacy and denial of service vulnerability
-   found by Felix Wiemann.
+ * Fixed reStructuredText breach of privacy and denial of service
+   vulnerability found by Felix Wiemann.
  * trac-post-commit-hook fixes.
  * Fixed bugs: #2894, #3058, #3209 #3325.
 
  The complete list of closed tickets can be found here:
    http://trac.edgewall.org/query?status=closed&milestone=0.9
 
-----
+-----------------------------------------------------------------------------
 
 Trac 0.8.3  (Jun 15, 2005)
 http://svn.edgewall.org/repos/trac/tags/trac-0.8.3
    #885, #888, #889, #892, #901, #903, #907, #912, 
    #916, #923, #929, #931, #932, #935
 
-----
+-----------------------------------------------------------------------------
 
 Trac 0.7.1 'Argento'  (Jun, 2004)
 http://svn.edgewall.org/repos/trac/tags/trac-0.7.1
    #371, #372, #376, #377, #378, #381, #384, #385, #386, #387, #388,
    #392, #394, #396, #397, #398, #399, #402, #403, #410
 
-----
+-----------------------------------------------------------------------------
 
 Trac 0.6.1 '245 Trioxin' (April 12, 2004)
 http://svn.edgewall.org/repos/trac/tags/trac-0.6.1
    #135, #136, #138, #142, #145, #147, #151, #155, #170, #173,
    #174, #175, #177, #179
 
-----
+-----------------------------------------------------------------------------
 
 Trac 0.5.2 'Nameless' (March 2, 2004)
 http://svn.edgewall.org/repos/trac/tags/trac-0.5.2
 
  * Performance improvements.
  * Better unicode support in commit-messages.
- * TRAC_ADMIN is now a real "meta-permission" containing all other permissions.
+ * TRAC_ADMIN is now a real "meta-permission" containing all other
+   permissions.
  * Wiki-links of the svn:/path format can now also link to directories.
  * Handle subversion changesets without any "author" specified.
  * "view" checkboxes in the timeline view now reflect the current state.
 language and can use SQLite, PostgreSQL or MySQL as database. For HTML
 rendering, Trac uses the Genshi templating system.
 
-Note that you should also read the
-**trac/wiki/default-pages/TracInstall** documentation file present in
-the source distribution.  If you're upgrading an already installed
-environment, please also read trac/wiki/default-pages/TracUpgrade.
+**You should also read the trac/wiki/default-pages/TracInstall
+documentation file present in the source distribution.**
+
+If you're upgrading an already installed Trac environment, please also
+read trac/wiki/default-pages/TracUpgrade.
 
 
 Requirements
 To install Trac, the following software packages must be installed:
 
  * Python, version >= 2.5.
- * setuptools, version >= 0.6
+ * setuptools, version >= 0.6, or the "distribute" package
  * Genshi, version >= 0.6
  * Optionally, Subversion, version >= 1.1.x and the Subversion SWIG
    Python bindings (not PySVN, that's something different).
 
   $ python ez_setup.py
 
+or, alternatively, install distribute:
+
+  $ curl -O http://python-distribute.org/distribute_setup.py
+
+  $ python distribute_setup.py
+
 After that, you can do for example: easy_install Genshi
 
 Your version of Python comes with its own version of pysqlite, however
   $ python ./setup.py install
 
 will byte-compile the python source code and install it in the
-site-packages directory of your python installation. The directories
-cgi-bin, templates, htdocs and wiki-default are all copied to
-``$prefix/share/trac/``.
+site-packages directory of your python installation.
 
 The script will also install the trac-admin command-line tool, used to
 create and maintain project environments. Trac-admin is the command
 ----------------------------
 
 Trac provides three options for connecting to a "real" web server:
-CGI, FastCGI and mod_python. For decent performance, it is recommended
-that you use either FastCGI or mod_python.
+CGI, FastCGI, mod_python and mod_wsgi. For decent performance, it is
+recommended that you use either FastCGI or mod_wsgi.
 
 Please refer to the TracInstall page for details on these setups. You
 can find it either in the wiki of the Trac project you just created,
 
 define HELP
 
- Please use `make <target>' where <target> is one of: 
+ Please use `make <target>' where <target> is one of:
 
-  clean               delete all compiled files 
+  clean               delete all compiled files
   status              show which Python is used and other infos
 
   [python=...]        variable for selecting Python version
   apidoc|sphinx       generate the Sphinx documentation (all specified formats)
   apidoc-html         generate the Sphinx documentation in HTML format
   apidoc-pdf          generate the Sphinx documentation in PDF format
+  apidoc-check        check for missing symbols in Sphinx documentation
 
   apiref|epydoc       generate the full API reference using Epydoc
 
   [sphinxopts=...]    variable containing extra options for Sphinx
   [sphinxopts-html=...] variable containing extra options used for html format
   [epydocopts=...]    variable containing extra options for Epydoc
-  [dotpath=/.../dot]  path to Graphviz' dot program (not used yet)
-                         
+  [dotpath=/.../dot]  path to Graphviz dot program (not used yet)
+
 endef
 export HELP
 
 	@echo -n "Python version: "
 	@python -V
 	@echo -n "figleaf: "
-	@-which figleaf 2>/dev/null || echo 
+	@-which figleaf 2>/dev/null || echo
 	@echo -n "coverage: "
-	@-which coverage 2>/dev/null || echo 
+	@-which coverage 2>/dev/null || echo
 	@echo "PYTHONPATH=$$PYTHONPATH"
 	@echo "TRAC_TEST_DB_URI=$$TRAC_TEST_DB_URI"
 	@echo "server-options=$(server-options)"
 else
 update:
 	python setup.py $(foreach catalog,$(catalogs), \
-       	    update_catalog$(_catalog))
+	    update_catalog$(_catalog))
 endif
 
 compile-%:
 	python setup.py $(foreach catalog,$(catalogs), \
 	    compile_catalog$(_catalog) -l $(*)) \
-            generate_messages_js -l $(*)
+	    generate_messages_js -l $(*)
 
 ifdef locale
 compile: $(addprefix compile-,$(locale))
 else
 compile:
 	python setup.py $(foreach catalog,$(catalogs), \
-            compile_catalog$(_catalog))
+	    compile_catalog$(_catalog))
 endif
 
 check: pre-check $(addprefix check-,$(locales))
 
 check-%:
 	@echo -n "$(@): "
-	@$(foreach catalog,$(catalogs), \
-	    msgfmt --check $(catalog.po) &&) echo OK
-	@rm -f messages.mo
+	python setup.py $(foreach catalog,$(catalogs), \
+	    check_catalog$(_catalog) -l $(*))
 
 stats: pre-stats $(addprefix stats-,$(locales))
 
 stats-%:
 	@$(foreach catalog,$(catalogs), \
 	    [ -e $(catalog.po) ] \
-	    && echo -n "$(catalog.po): "; \
-	       msgfmt --statistics $(catalog.po) \
+	    && { echo -n "$(catalog.po): "; \
+	         msgfmt --statistics $(catalog.po); } \
 	    || echo "$(catalog.po) doesn't exist (make init-$(*))";)
 	@rm -f messages.mo
 
 
 pylint:
 	pylint \
-		--include-ids=y --persistent=n --comment=n --init-import=y \
-		--disable=E0102,E0211,E0213,E0602,E0611,E1002,E1101,E1102,E1103 \
-		--disable=F0401 \
-		--disable=W0102,W0141,W0142,W0201,W0212,W0221,W0223,W0231,W0232, \
-		--disable=W0401,W0511,W0603,W0613,W0614,W0621,W0622,W0703 \
-		--disable=C0103,C0111 \
-		trac tracopt
+	    --include-ids=y --persistent=n --comment=n --init-import=y \
+	    --disable=E0102,E0211,E0213,E0602,E0611,E1002,E1101,E1102,E1103 \
+	    --disable=F0401 \
+	    --disable=W0102,W0141,W0142,W0201,W0212,W0221,W0223,W0231,W0232, \
+	    --disable=W0401,W0511,W0603,W0613,W0614,W0621,W0622,W0703 \
+	    --disable=C0103,C0111 \
+	    trac tracopt
 
 # ----------------------------------------------------------------------------
 #
 
 # ----------------------------------------------------------------------------
 #
-# Figleaf based coverage tasks 
+# Figleaf based coverage tasks
 #
 # (see http://darcs.idyll.org/~t/projects/figleaf/doc/)
 #
 #
 # ----------------------------------------------------------------------------
 
-.PHONY: apidoc sphinx apiref epydoc clean-doc
+.PHONY: apidoc sphinx apidoc-check apiref epydoc clean-doc
 
 # We also try to honor the "conventional" environment variables used by Sphinx
 sphinxopts ?= $(SPHINXOPTS)
 sphinx: apidoc
 apidoc: $(addprefix apidoc-,$(sphinxformat))
 
+apidoc-check:
+	@python doc/utils/checkapidoc.py
+
 apidoc-%:
 	@$(SPHINXBUILD) -b $(*) \
 	    $(sphinxopts) $(sphinxopts-$(*)) \
 
 doc-images: $(addprefix build/,$(wildcard doc/images/*.png))
 build/doc/images/%: doc/images/% | build/doc/images
-	@cp $(<) $(@) 
+	@cp $(<) $(@)
 build/doc/images:
 	@mkdir -p $(@)
 
 
 ifeq "$(OS)" "Windows_NT"
     ifndef python-home
-        # Detect location of current python 
+        # Detect location of current python
         python-exe := $(shell python -c 'import sys; print sys.executable')
         python-home := $(subst \python.exe,,$(python-exe))
     endif
 About Trac
 ==========
 
-Trac is a minimalistic web-based software project management and bug/issue
-tracking system. It provides an interface to the Subversion revision control
-systems, an integrated wiki, flexible issue tracking and convenient report
-facilities.
+Trac is a minimalistic web-based software project management and
+bug/issue tracking system. It provides an interface to the Git and
+Subversion revision control systems, an integrated wiki, flexible
+issue tracking and convenient report facilities.
 
 Trac is distributed using the modified BSD License.
 
- * For installation instructions, please see the INSTALL. *
- * If you are upgrading from a previous Trac version, please read UPGRADE. *
+ * For installation instructions, please see the INSTALL for a short
+   overview and the trac/wiki/default-pages/TracInstall page for
+   complete, up-to-date instructions
 
-You might also want to take a look at the RELEASE and ChangeLog files for more
-information.
+ * If you are upgrading from a previous Trac version, please read UPGRADE
+   for a short overview and the trac/wiki/default-pages/TracUpgrade for
+   complete, up-to-date instructions 
+
+You might also want to take a look at the RELEASE and ChangeLog files
+for more information about this release.
 
 Otherwise, the primary source of information is the main Trac web site:
 
-Release Notes for Trac 0.13 Cell Release
-========================================
-Month xx, 201x
+Release Notes for Trac 1.0 'Cell' Release (rc1)
+===============================================
+September 1, 2012
 
 Highlights
 ----------
- * ...
-
+ * Refreshed user interface
+ * Git support
+ * Branching structure displayed in the revision log
+ * Ticket batch modification support
 
 Detailed User Visible Changes
 -----------------------------
 
 A detailed view of the API changes since 0.12.x can be found in
-http://trac.edgewall.org/wiki/TracDev/ReleaseNotes/0.13.
+http://trac.edgewall.org/wiki/TracDev/ReleaseNotes/1.0
 
 Developer-visible changes
 -------------------------
 
 A detailed view of the API changes since 0.12.x can be found in 
-http://trac.edgewall.org/wiki/TracDev/ApiChanges/0.13.
+http://trac.edgewall.org/wiki/TracDev/ApiChanges/1.0
 
 Acknowledgements
 ----------------

TESTING-README

-= Testing Readme =
-
-So, you want to see what's broken?  Eeeexcellent.
-
-If you are running python < 2.4.4, please see the troubleshooting section.
-
-== Quick Start ==
-
-First thing to do is run the tests.  If you have genshi and twill
-installed on your system, you should be able to run the tests like
-this: {{{ PYTHONPATH=. ./trac/test.py }}}
-
-== Slow Start ==
-
-If you want to test against specific versions of genshi, twill,
-pygments, etc., you can set those up like this:
-{{{
-myworktree/trac
-          /pygments-0.8
-          /twill-0.9
-          /genshi-0.4.4
-}}}
-
-Run `python setup egg_info` in those subdirectories as needed.  Then
-you can run:
-{{{
-PYTHONPATH=.:../twill-0.9:../genshi-0.4.4:../pygments-0.8 ./trac/test.py
-}}}
-
-If you want to run just the functional tests, you can do that by
-running
-{{{
-PYTHONPATH=.:../twill-0.9:../genshi-0.4.4:../pygments-0.8 ./trac/tests/functional/testcases.py
-}}}
-
-And to run everything except the functional tests,
-{{{
-PYTHONPATH=. ./trac/test.py --skip-functional-tests
-}}}
-
-
-NOTE: Unlike most unittests, the functional tests share a test fixture
-across tests.  This means that you can't(*) run just one of the tests
-by itself.  But you can run a sub-set of the functional tests:
-{{{
-PYTHONPATH=.:../twill-0.9:../genshi-0.4.4:../pygments-0.8 ./trac/tests/functional/__init__.py
-PYTHONPATH=.:../twill-0.9:../genshi-0.4.4:../pygments-0.8 ./trac/ticket/tests/functional.py
-PYTHONPATH=.:../twill-0.9:../genshi-0.4.4:../pygments-0.8 ./trac/versioncontrol/tests/functional.py
-}}}
-
-Note that that there is a set of functional tests that are run
-regardless of what subset you choose; these tests setup the shared
-fixture.
-
-
-(*) Unless you modify the code to comment out the other functional
-tests.  The test fixture is setup and torn down by
-`FunctionalTestSuite`, and it runs the tests added to it with
-`_tester` and `_testenv` set in the testcase objects.
-
-The functional tests require subversion, and use a random local port
-8000-8999 for the test web server.
-
-== Testing output and byproducts ==
-
-There is some logging done:
- testing.log ::
-    output from trac environment creation, tracd, and some svn commands
- functional-testing.log ::
-    output from twill
-
-The test fixture is left behind in 'testenv' so you can inspect it
-when debugging a problem.
-{{{
-testenv/htpasswd   -- the password/authentication for the test fixture.  password = username
-       /repo       -- the Subversion repository
-       /trac       -- the Trac environment
-}}}
-(Note that running the tests again will automatically delete this test
-environment and create a new one.  If you want to save a test
-environment, you will need to rename this directory before running the
-tests again.)
-
-The command to serve the test environment is:
-{{{
-PYTHONPATH=.:../twill-0.9:../genshi-0.4.4:../pygments-0.8 \
-./trac/web/standalone.py --basic-auth=trac,testenv/htpasswd, -s \
-    --port=8888 testenv/trac
-}}}
-This is particularly useful when a test fails and you want to explore
-the environment to debug the problem.
-
-== Test Coverage ==
-
-You can now determine statement coverage of unittests and functional
-tests.  But you'll have to run them separately for now.
-
-`figleaf` will need to be on your `PATH`.  Set the `FIGLEAF`
-environment variable to the figleaf command.
-
-Create a figleaf-exclude file with filename patterns to exclude.  For
-example:
-{{{
-/usr/lib/python.*/.*.py
-.*.html
-}}}
-
-Then run the tests something like this:
-{{{
-export FIGLEAF=figleaf
-figleaf ./trac/test.py -v --skip-functional-tests
-mv .figleaf .figleaf.unittests
-python trac/tests/functional/testcases.py -v
-mv .figleaf .figleaf.functional
-figleaf2html --exclude-patterns=../figleaf-exclude .figleaf.functional .figleaf.unittests
-}}}
-Also, this is very slow; on a decent machine, 10 minutes for the functional tests is normal.
-
-To run without figleaf, be sure to unset `FIGLEAF`.
-
------------------------------------------------------------------------------
-
-== Troubleshooting ==
-
- 1. trac-admin is failing on initenv with this exception:
-    {{{
-    raise Exception('Failed with exitcode %s running trac-admin with %r' % (retval, args))
-Exception: Failed with exitcode 1 running trac-admin with ('initenv', 'testenv', 'sqlite:db/trac.db', 'svn', '..../testenv/repo')
-    }}}
-    This can be caused by not having run `python setup.py egg_info` in
-    the genshi tree.
-
- 2. Windows needs an implementation of crypt or fcrypt.  Carey Evans'
-    pure python version works, but prints warnings on Python 2.3 (they
-    can be ignored).  See http://carey.geek.nz/code/python-fcrypt/
-
+The following people all made noteworthy contributions to Trac, which
+wouldn't be what it is now without their help:
+
  * Ants Aasma                     ants.aasma@gmail.com
  * Pedro Algarvio (s0undt3ch)     ufs@ufsoft.org
  * Brad Anderson                  brad@dsource.org
  * Justin Francis
  * Markus Fuchs
  * Lele Gaifax
+ * Sergii Galashyn                trovich@gmail.com
  * Raúl García
  * Axel Gembe
  * Eric Gillespie                 epg@netbsd.org
  * Tomas Kopecek
  * Waldemar Kornewald             wkornew@gmx.net
  * Nuutti Kotivuori               naked@iki.fi
+ * Leho Kraav                     leho@kraav.com
  * Jasmin Lapalme
  * Ian Leader                     ian.leader@line.co.uk
  * Christopher Lenz               cmlenz@gmx.de
  * Angel Marin                    anmar@gmx.net
  * Simon Martin
  * Narine Martirosyan             narine_martirosyan@instigatedesign.com
+ * Franz Mayer                    franz.mayer@gefasoft.de
  * Mark Mc Mahon                  mark.m.mcmahon@gmail.com
  * Brian Meeker                   meeker.brian@gmail.com
  * Aristotelis Mertis
  * Jennifer Murtell               jen@jmurtell.com
  * Jacob Norda                    jacobnorda@gmail.com
  * Dirkjan Ochtman                dirkjan@ochtman.nl
+ * Ryan J Ollos                   ryano@physiosonics.com
  * Jun Omae                       jun66j5@gmail.com
  * Itamar Ostricher               itamarost@gmail.com
  * Bas van Oostveen               v.oostveen@gmail.com
 used with a new version of Trac. This document describes the steps
 necessary to upgrade an environment.
 
-Note that you should also read the trac/wiki/default-pages/TracUpgrade
-documentation file present in the source distribution.
+**You should also read the trac/wiki/default-pages/TracUpgrade
+documentation file present in the source distribution.**
 
-Note that Environment upgrades are not necessary for minor version
+Note that environment upgrades are not necessary for minor version
 releases unless otherwise noted. For example, there's no need to
 upgrade a Trac environment created with (or upgraded) 0.8.0 when
 installing 0.8.4 (or any other 0.8.x release).
 The following sections discuss any extra actions that may need to be
 taken to upgrade to specific versions of Trac.
 
-From 0.12.x to 0.13.x
----------------------
+From 0.12.x to 1.0
+------------------
 
 Note that Clearsilver based plugin are now no longer supported.
 
+The content of ``attachments`` folder has been restructured and been
+moved to ``files/attachments``. The migration is handled automatically
+on upgrade, but in some cases you might need to clean-up the old
+``attachments`` directory manually.
+
+The Subversion components have been moved to
+``tracopt/versioncontrol.svn``.  The upgrade will take care of
+re-enabling those components if you haven't disabled the older
+`trac.versioncontrol` ones.
+
 From 0.11.x to 0.12.x
 ---------------------
 

contrib/bugzilla2trac.py

 Reworked, Jeroen Ruigrok van der Werven <asmodai@in-nomine.org>
 Jeff Moreland <hou5e@hotmail.com>
 
-$Id: bugzilla2trac.py 10595 2011-02-23 22:32:28Z rblank $
+$Id$
 """
 
 from __future__ import with_statement

contrib/checkwiki.py

     d = r.read()
     if r.status == 200 and d:
         f = open(pname, 'w+')
-        f.write(d)
+        f.write(d.replace('\r\n', '\n'))
         f.close()
     else:
         print "Missing or empty page"
         # print help information and exit:
         print "%s [-d] [-C] [-p prefix] [PAGE ...]" % sys.argv[0]
         print "\t-d        -- Download pages from the main project wiki."
-        print "\t-C        -- Don't try to check links (it's broken anyway)"
+        print "\t-C        -- Try to check links (currently broken)"
         print "\t-p prefix -- When downloading, prepend 'prefix/' to the page."
         sys.exit()
     get_page = get_page_from_file
     prefix = ''
-    check = True
+    check = False
     for o,a in opts:
         if o == '-d':
             get_page = get_page_from_web
         elif o == '-p':
             prefix = a+'/'
         elif o == '-C':
-            check = False
+            check = True
     data = {}
     for p in args or wiki_pages:
         data[p] = get_page(prefix, p)

contrib/sourceforge2trac.py

 Import a Sourceforge project's tracker items into a Trac database.
 
 Requires:
-   Trac 0.13 from http://trac.edgewall.org/
+   Trac 1.0 from http://trac.edgewall.org/
    Python 2.5 from http://www.python.org/
 
-0.13 clean-up by cboos **untested**, use at your own risks and send patches
+1.0 clean-up by cboos **untested**, use at your own risks and send patches
 
 The Sourceforge tracker items can be exported from the 'Backup' page
 of the project admin section. Substitute XXXXX with project id:

doc/api/trac_attachment.rst

 .. autoclass :: IAttachmentChangeListener
    :members:
 
+   See also :extensionpoints:`trac.attachment.IAttachmentChangeListener`
+
 .. autoclass :: IAttachmentManipulator
    :members:
 
+   See also :extensionpoints:`trac.attachment.IAttachmentManipulator`
+
 .. autoclass :: ILegacyAttachmentPolicyDelegate
    :members:
 
+   See also :extensionpoints:`trac.attachment.ILegacyAttachmentPolicyDelegate`
+
 
 Classes
 -------
 .. autoclass :: Attachment
    :members:
 
+.. autoclass :: InvalidAttachment
+   :members:
+
 Components
 ----------
 
 .. autoclass :: AttachmentModule
    :members:
+
+.. autoclass :: AttachmentAdmin
+   :members:

doc/api/trac_env.rst

 .. autoclass :: trac.env.IEnvironmentSetupParticipant
    :members:
 
+   See also :extensionpoints:`trac.env.IEnvironmentSetupParticipant`
+
 .. autoclass :: trac.env.ISystemInfoProvider
    :members:
 
+   See also :extensionpoints:`trac.env.ISystemInfoProvider`
+
+
 Components
 ----------
 

doc/api/trac_mimeview.rst

 
 .. automodule :: trac.mimeview.api
 
+
 Interfaces
 ----------
 
 .. autoclass :: trac.mimeview.api.IHTMLPreviewRenderer
    :members:
 
+   See also :extensionpoints:`trac.mimeview.api.IHTMLPreviewRenderer`
+
 .. autoclass :: trac.mimeview.api.IHTMLPreviewAnnotator
    :members:
 
+   See also :extensionpoints:`trac.mimeview.api.IHTMLPreviewAnnotator`
+
 .. autoclass :: trac.mimeview.api.IContentConverter
    :members:
 
+   See also :extensionpoints:`trac.mimeview.api.IContentConverter`
+
+
 Components
 ----------
 
 .. autoclass :: trac.mimeview.api.RenderingContext
    :members:
 
+.. autoclass :: trac.mimeview.api.Context
+   :members:
+
 .. autoclass :: trac.mimeview.api.Content
    :members:
 
+
 Functions
 ---------
 
     
    :param content: is either a `str` or an `unicode` string.
 
+.. autofunction :: trac.mimeview.api.ct_mimetype
+
 .. autofunction :: trac.mimeview.api.is_binary
 
 .. autofunction :: trac.mimeview.api.detect_unicode

doc/api/trac_ticket_roadmap.rst

 (for both the `RoadmapModule` and the `MilestoneModule`), which
 provides a configurable way to specify how tickets are grouped.
 
+
 Interfaces
 ----------
 
 .. autoclass :: ITicketGroupStatsProvider
    :members:
 
+   See also :extensionpoints:`trac.ticket.roadmap.ITicketGroupStatsProvider`
+
 .. autoclass :: TicketGroupStats
    :members:
 
 Helper Functions
 ----------------
 
+.. autofunction :: apply_ticket_permissions
 .. autofunction :: get_tickets_for_milestone
-.. autofunction :: apply_ticket_permissions
+.. autofunction :: grouped_stats_data

doc/api/trac_util.rst

 .. autoclass :: NaivePopen
    :members:
 
+.. autoclass :: WindowsError
+
+   Also defined on non-Windows systems (by a dummy OSError subclass).
+
+.. autoclass :: file_or_std
+
+.. data :: urandom
+
+  The standard `os.urandom` when available, otherwise a reasonable
+  replacement.
+
+
 Python "system" utilities
 -------------------------
 
 .. autofunction :: get_last_traceback
 .. autofunction :: get_lines_from_file
 .. autofunction :: get_frame_info
+.. autofunction :: import_namespace
 .. autofunction :: safe__import__
 .. autofunction :: safe_repr
 .. autofunction :: get_doc
 
 .. autofunction :: to_ranges
 
+.. autoclass :: lazy
+
+
 Algorithmic utilities
 ---------------------
 

doc/api/trac_util_datefmt.rst

 
 .. autofunction :: http_date
 
+.. autofunction	:: is_24_hours
+
 Formatting and parsing according to user preferences:
 
 .. autofunction	:: user_time
 
 
+jQuery UI datepicker helpers
+----------------------------
+
+.. autofunction	:: get_date_format_jquery_ui
+
+.. autofunction	:: get_time_format_jquery_ui
+
+.. autofunction	:: get_day_names_jquery_ui
+
+.. autofunction	:: get_first_week_day_jquery_ui
+
+.. autofunction	:: get_month_names_jquery_ui
+
+.. autofunction	:: get_timezone_list_jquery_ui
+
+
 Timezone utilities
 ------------------
 
-.. autoattribute :: trac.util.datefmt.localtz
+.. data :: trac.util.datefmt.localtz
 
-.. attribute :: trac.util.datefmt.all_timezones
+  A global `LocalTimezone` instance.
+
+.. autoclass :: LocalTimezone
+
+.. data :: trac.util.datefmt.all_timezones
 
 List of all available timezones. If pytz_ is installed, this
 corresponds to a rich variety of "official" timezones, otherwise this
 corresponds to `FixedOffset` instances, ranging from GMT -12:00 to GMT
 +13:00.
 
+.. autofunction :: timezone
+
 .. autofunction :: get_timezone
 
 .. autoclass :: FixedOffset

doc/api/trac_util_html.rst

 tag building facility is now not much more than an alias to the `tag`
 ElementFactory_, and most of the code uses directly the latter.
 
-.. autoclass :: TransposingElementFactory
-
 .. data :: html
 
    A `TransposingElementFactory` using `str.lower` transformation.
 
+.. autoclass :: TransposingElementFactory
+
 .. _Genshi: http://genshi.edgewall.org
 .. _builder: http://genshi.edgewall.org/wiki/ApiDocs/genshi.builder
 .. _ElementFactory: 
    `tracopt.mimeview.enscript.EnscriptDeuglifier` and
    `tracopt.mimeview.php.PhpDeuglifier`.
 
+.. autofunction :: escape
+.. autofunction :: unescape
+
+.. autoclass :: FormTokenInjector
+
+
+Misc. HTML processing
+---------------------
+
 .. autofunction :: expand_markup
+.. autofunction :: find_element
 .. autofunction :: plaintext
 

doc/api/trac_util_presentation.rst

 
 The following utilities are all available within Genshi templates.
 
+.. autofunction :: captioned_button
 .. autofunction :: classes
 .. autofunction :: first_last
 .. autofunction :: group
 .. autofunction :: paginate
 .. autofunction :: separated
 .. autofunction :: to_json
+
+Modules generating paginated output will be happy to use a rich
+pagination controller. See *Query*, *Report* and *Search* modules for
+example usage.
+
+.. autoclass :: Paginator

doc/api/trac_util_text.rst

 surprising results when splitting text in lines. For example, did you
 know that "Priorità" is encoded as ``'Priorit\xc3\x0a'`` in UTF-8?
 Calling `strip()` on this value in some locales can cut away the
-trailing ``\x0a`` and it's no longer valid UTF-8.
+trailing ``\x0a`` and it's no longer valid UTF-8...
 
 The drawback is that most of the outside world, while eventually
 "Unicode", is definitely not `unicode`. This is why we need to convert
 Encoding `unicode` to `str` is usually directly performed by calling
 `encode()` on the `unicode` instance, while decoding is preferably
 left to the `to_unicode` helper function, which converts `str` to
-`unicode` in a robust, guaranteed successful way.
+`unicode` in a robust and guaranteed successful way.
 
 .. autofunction :: to_unicode
 
 
 .. autofunction :: unicode_urlencode
 
-.. autofunction	:: quote_query_string
+.. autofunction :: quote_query_string
+
+.. autofunction :: javascript_quote
+
+.. autofunction :: to_js_string
+
 
 Console and file system
 .......................
 
-.. autofunction	:: path_to_unicode
+.. autofunction :: path_to_unicode
 
-.. autofunction	:: stream_encoding
+.. autofunction :: stream_encoding
 
 .. autofunction :: console_print
 
 
 .. autoclass :: unicode_passwd
 
-.. autofunction :: to_utf8
+.. autofunction :: levenshtein_distance
 
 
 Text formatting
 
 .. autofunction :: expandtabs
 
-.. autofunction :: javascript_quote
-
 .. autofunction :: obfuscate_email_address
 
 .. autofunction :: text_width
 
 .. autofunction :: shorten_line
 
+.. autofunction :: stripws
+
 .. autofunction :: wrap
 
 
 Conversion utilities
 --------------------
 
-.. autofunction	:: unicode_to_base64
+.. autofunction :: unicode_to_base64
 
-.. autofunction	:: unicode_from_base64
+.. autofunction :: unicode_from_base64
+
+.. autofunction :: to_utf8

doc/api/trac_versioncontrol_api.rst

 .. autoclass :: IRepositoryConnector
    :members:
 
+   See also :extensionpoints:`trac.versioncontrol.api.IRepositoryConnector`
+
 .. autoclass :: IRepositoryProvider
    :members:
 
+   See also :extensionpoints:`trac.versioncontrol.api.IRepositoryProvider`
+
 .. autoclass :: IRepositoryChangeListener
    :members:
 
+   See also :extensionpoints:`trac.versioncontrol.api.IRepositoryChangeListener`
+
+
 Components
 ----------
 
 .. autoclass :: RepositoryManager
    :members:
  
+.. autoclass :: DbRepositoryProvider
+   :members:
+ 
+
 Exceptions
 ----------
 
 .. autoclass :: NoSuchNode
    :members:
 
+
 Abstract classes
 ----------------
 
 
 .. autoclass :: Changeset
    :members:
+
+
+Helper Functions
+----------------
+
+.. autofunction :: is_default
+

doc/api/trac_web_api.rst

 
 Primary interface for handling web requests.
 
+
 Interfaces
 ----------
 
 .. autoclass :: IRequestHandler
    :members:
 
+   See also :extensionpoints:`trac.web.api.IRequestHandler`
+
 .. autoclass :: IRequestFilter
    :members:
 
+   See also :extensionpoints:`trac.web.api.IRequestFilter`
+
 For how the main content itself can be generated, see `trac.web.chrome`.
 
 .. autoclass :: ITemplateStreamFilter
    :members:
 
+   See also :extensionpoints:`trac.web.api.ITemplateStreamFilter`
+
 .. autoclass :: IAuthenticator
    :members:
 
-Important classes
------------------
+   See also :extensionpoints:`trac.web.api.IAuthenticator`
+
+
+Classes
+-------
 
 .. autoclass :: Request
    :members:
 .. autoclass :: trac.web.api.RequestDone
    :members:
 
+
+Helper Functions
+----------------
+
+.. autofunction :: arg_list_to_args
+.. autofunction :: parse_arg_list

doc/api/trac_web_chrome.rst

 .. autoclass :: trac.web.chrome.INavigationContributor
    :members:
 
+   See also :extensionpoints:`trac.web.chrome.INavigationContributor`
+
 .. autoclass :: trac.web.chrome.ITemplateProvider
    :members:
 
+   See also :extensionpoints:`trac.web.chrome.ITemplateProvider`
+
+
 Components
 ----------
 
 .. autoclass :: trac.web.chrome.Chrome
    :members:
 
+
 Functions
 ---------
 
 .. autofunction :: trac.web.chrome.web_context
 .. autofunction :: trac.web.chrome.add_meta
 
+
 Web resources
 ~~~~~~~~~~~~~
 
 .. autofunction :: trac.web.chrome.add_script
 .. autofunction :: trac.web.chrome.add_script_data
 
+
 Page admonitions
 ~~~~~~~~~~~~~~~~
 
 .. autofunction :: trac.web.chrome.add_warning
 .. autofunction :: trac.web.chrome.add_notice
 
+
 Contextual Navigation
 ~~~~~~~~~~~~~~~~~~~~~
 
 .. autofunction :: trac.web.chrome.add_link
 .. autofunction :: trac.web.chrome.add_ctxtnav
 .. autofunction :: trac.web.chrome.prevnext_nav
+
+
+Miscellaneous
+~~~~~~~~~~~~~
+
+.. autofunction :: auth_link

doc/api/trac_web_main.rst

 .. autoclass :: RequestDispatcher
    :members:
 
+
+Classes
+-------
+
+.. autoclass :: RequestWithSession
+
+
+Helper Functions
+----------------
+
+.. autofunction :: get_environments
+.. autofunction :: get_tracignore_patterns
+
+
 Miscellaneous
 -------------
 

doc/api/trac_wiki_api.rst

 .. autoclass :: trac.wiki.api.IWikiChangeListener
    :members:
 
+   See also :extensionpoints:`trac.wiki.api.IWikiChangeListener`.
+
 Components can also interfere with the changes, before or after
 they're made.
 
 .. autoclass :: trac.wiki.api.IWikiPageManipulator
    :members:
 
+   See also :extensionpoints:`trac.wiki.api.IWikiPageManipulator`.
+
 Then, the Wiki syntax itself can be extended. The first and less
 intrusive way is to provide new Wiki macros or Wiki processors. Those
 are basically the same thing, as they're implemented using the
 .. autoclass :: trac.wiki.api.IWikiMacroProvider
    :members:
 
+   See also `~trac.wiki.macros.WikiMacroBase` and 
+   :teo:`wiki/WikiMacros#DevelopingCustomMacros` and
+   :extensionpoints:`trac.wiki.api.IWikiMacroProvider`.
+
+
 The Wiki syntax can also be extended by introducing new markup.
 
 .. autoclass :: trac.wiki.api.IWikiSyntaxProvider
    :members:
 
+   See also :teo:`wiki:TracDev/IWikiSyntaxProviderExample` and
+   :extensionpoints:`trac.wiki.api.IWikiSyntaxProvider`.
+
+
 The Wiki System
 ---------------
 
-The wiky system provide an access to all the pages.
+The wiki system provide an access to all the pages.
 
 .. autoclass :: trac.wiki.api.WikiSystem
    :members:
 ---------------
 
 .. autofunction :: trac.wiki.api.parse_args
+.. autofunction :: trac.wiki.api.validate_page_name
 

doc/api/trac_wiki_macros.rst

+:mod:`trac.wiki.macros` -- The standard set of Wiki macros
+==========================================================
+
+.. module :: trac.wiki.macros
+
+The standard set of components corresponding to Wiki macros are not
+meant to be used directly from the API. You may study their
+implementation though, for getting inspiration. In particular, you'll
+see they all subclass the `WikiMacroBase` class, which provides a
+convenient way to implement a new `~trac.wiki.api.IWikiMacroProvider`
+interface.
+
+.. autoclass :: WikiMacroBase
+
+See also :teo:`wiki/WikiMacros#DevelopingCustomMacros`.
 
 # General substitutions.
 project = 'Trac'
-copyright = '2010, Edgewall Software'
+copyright = '2012, Edgewall Software'
 url = 'http://trac.edgewall.org'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
 #
 # The short X.Y version.
-version = '0.13'
+version = '1.0'
 # The full version, including alpha/beta/rc tags.
-release = '0.13'
+release = '1.0'
 
 # Devel or Release mode for the documentation (if devel, include TODOs,
 # can also be used in conditionals: .. ifconfig :: devel)
 
 def setup(app):
     # adding role for linking to InterTrac targets on t.e.o
-    from urllib import quote
     from docutils import nodes
     from docutils.parsers.rst import roles
+
     def teo_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
-        ref = url + '/intertrac/' + quote(text)
+        # special case ticket references
+        if text[0] == '#':
+            ref = url + '/ticket/' + text[1:]
+        else:
+            ref = url + '/intertrac/' + text
         roles.set_classes(options)
         node = nodes.reference(rawtext, text, refuri=ref, **options)
         return [node], []
     roles.register_canonical_role('teo', teo_role)
 
+    def extensionpoints_role(name, rawtext, text, lineno, inliner, options={},
+                             content=[]):
+        ref = url + '/wiki/TracDev/PluginDevelopment/ExtensionPoints/' + text
+        roles.set_classes(options)
+        node = nodes.reference(rawtext, text + " extension points",
+                               refuri=ref, **options)
+        return [node], []
+    roles.register_canonical_role('extensionpoints', extensionpoints_role)
+
     # ifconfig variables
     app.add_config_value('devel', '', True)

doc/utils/checkapidoc.py

+# -*- coding:  utf-8 -*-
+
+"""Trac API doc checker
+
+Verify that all symbols belonging to modules already documented in the doc/api
+Sphinx sources are referenced.
+
+See http://trac.edgewall.org/wiki/TracDev/ApiDocs
+"""
+
+import fnmatch
+import os
+import re
+import sys
+
+excluded_docs = ['index.rst']
+api_doc = 'doc/api'
+
+def usage(cmd):
+    print "Usage: %s [FILE...]" % (cmd,)
+    print
+    print "FILE is a %s file and can be a glob pattern." % (api_doc,)
+    print "If no files are given, check all."
+    exit(0)
+
+def main(argv):
+    api_files = rst_files = [rst for rst in os.listdir('doc/api')
+                             if fnmatch.fnmatch(rst, '*.rst')
+                             and rst not in excluded_docs]
+    cmd = argv.pop(0)
+    def has(*options):
+        for opt in options:
+            if opt in argv:
+                return argv.pop(argv.index(opt))
+    if has('-h', '--help'):
+        usage(cmd)
+    verbose = has('-v', '--verbose')
+    only_documented = not has('-a', '--all')
+    if argv:
+        given_files = []
+        for arg in argv:
+            arg = arg.replace('\\', '/').replace(api_doc + '/', '')
+            arg = arg.replace('.rst', '') + '.rst'
+            if '*' in arg: # glob pattern
+                given_files += [rst for rst in api_files
+                                if fnmatch.fnmatch(rst, arg)]
+            elif arg in api_files:
+                given_files.append(arg)
+        api_files = given_files
+    rst_basenames = sorted(f[:-4] for f in rst_files)
+    for rst in api_files:
+        basename = rst.replace('.rst', '')
+        if verbose or len(api_files) > 1:
+            print "== Checking %s ... " % (rst,)
+        check_api_doc(basename, verbose, only_documented, 
+                      any(f.startswith(basename) and f != basename 
+                          for f in rst_basenames))
+
+
+def check_api_doc(basename, verbose, only_documented, has_submodules):
+    module_name = basename.replace('_', '.')
+    try:
+        module = __import__(module_name, globals(), {}, ['__all__'])
+    except ImportError, e:
+        print "Skipping %s (%s)" % (basename, e)
+        return
+    all = getattr(module, '__all__', None)
+    if not all:
+        print "Warning: %s doesn't define __all__, using exported symbols." % (
+            module_name,)
+        all = get_default_symbols(module, only_documented, has_submodules)
+    no_apidoc = getattr(module, '__no_apidoc__', None)
+    if no_apidoc:
+        if isinstance(no_apidoc, basestring):
+            no_apidoc = [s.strip() for s in no_apidoc.split()]
+        all = list(set(all) - set(no_apidoc))
+    symbols, keywords = get_sphinx_documented_symbols(basename + '.rst')
+    for symbol in sorted(all):
+        if symbol in symbols:
+            if verbose:
+                print " - OK %14s :: %s" % (
+                    keywords[symbols.index(symbol)], symbol)
+        else:
+            value = getattr(module, symbol)
+            cls = getattr(value, '__class__', None)
+            keyword = 'data'
+            if not cls or cls.__name__ == 'type':
+                keyword = 'class'
+            elif cls.__name__ in ('function', 'instancemethod'):
+                keyword = 'function'
+            elif cls.__name__ == 'module':
+                keyword = 'module'
+            print " * .. %14s :: %s" % ('auto' + keyword, symbol)
+
+
+sphinx_doc_re = re.compile(r'''
+^.. \s+ ((?:py:|auto)(?:module|class|function|attribute)|data)  # keyword
+                                     \s* :: \s* ([\w\.]+)       # symbol
+''', re.MULTILINE | re.VERBOSE)
+
+def get_sphinx_documented_symbols(rst):
+    doc = file(os.path.join(api_doc, rst)).read()
+    symbols, keywords = [], []
+    for k, s in sphinx_doc_re.findall(doc):
+        symbols.append(s.split('.')[-1])
+        keywords.append(k)
+    return symbols, keywords
+
+
+def get_default_symbols(module, only_documented, has_submodules):
+    public = get_public_symbols(module) - get_imported_symbols(module, 
+                                                               has_submodules)
+    # eliminate modules
+    all = []
+    for symbol in public:
+        try:
+            __import__(symbol)
+        except ImportError:
+            all.append(symbol)
+    # only keep symbols having a docstring
+    if only_documented:
+        documented = []
+        for symbol in all:
+            value = getattr(module, symbol)
+            if value.__doc__ and (not getattr(value, '__class__', None) or 
+                                  value.__doc__ != value.__class__.__doc__):
+                documented.append(symbol)
+        all = documented
+    return all
+
+def get_public_symbols(m):
+    return set(symbol for symbol in dir(m) if not symbol.startswith('_'))
+
+import_from_re = re.compile(r'''
+^ \s* from \s+ ([\w\.]+) \s+ import \s+   # module
+(                                \*       # all symbols
+|       %s (?: [\s\\]* , [\s\\]* %s)*     # list of symbols
+| \( \s* %s (?: \s* , \s* %s)* \s* \)     # list of symbols in parenthesis
+)
+''' % ((r'(?:\w+|\w+\s+as\s+\w+)',) * 4), re.MULTILINE | re.VERBOSE)
+
+remove_original_re = re.compile(r'\w+\s+as', re.MULTILINE)
+
+def get_imported_symbols(module, has_submodules):
+    src_filename = module.__file__.replace('\\', '/').replace('.pyc', '.py')
+    if src_filename.endswith('/__init__.py') and not has_submodules:
+        return set()
+    src = file(src_filename).read()
+    imported = set()
+    for mod, symbol_list in import_from_re.findall(src):
+        symbol_list = symbol_list.strip()
+        if symbol_list == '*':
+            try:
+                imported_module = __import__(mod, globals(), {}, ['__all__'])
+                symbols = set(getattr(imported_module, '__all__', None) or 
+                              get_public_symbols(imported_module))
+            except ImportError:
+                print "Warning: 'from %s import *' couldn't be resolved" % (
+                    mod,)
+                continue
+        else:
+            if symbol_list and symbol_list[0] == '(' and symbol_list[-1] == ')':
+                symbol_list = symbol_list[1:-1]
+            symbols = set(remove_original_re.sub('', symbol_list)
+                          .replace('\\', '').replace(',', ' ').split())
+        imported |= symbols
+    return imported
+
+
+if __name__ == '__main__':
+    main(sys.argv)

sample-plugins/HelloWorld.py

 """Example macro."""
 
-revision = "$Rev: 10617 $"
-url = "$URL: http://svn.edgewall.org/repos/trac/trunk/sample-plugins/HelloWorld.py $"
+revision = "$Rev$"
+url = "$URL$"
 
 #
 # The following shows the code for macro, old-style.

sample-plugins/Timestamp.py

 """Inserts the current time (in seconds) into the wiki page."""
 
-revision = "$Rev: 10617 $"
-url = "$URL: http://svn.edgewall.org/repos/trac/trunk/sample-plugins/Timestamp.py $"
+revision = "$Rev$"
+url = "$URL$"
 
 #
 # The following shows the code for macro, old-style.

sample-plugins/milestone_to_version.py

 from trac.ticket.api import IMilestoneChangeListener
 from trac.ticket.model import Version
 
-revision = "$Rev: 9001 $"
-url = "$URL: http://svn.edgewall.org/repos/trac/trunk/sample-plugins/milestone_to_version.py $"
+revision = "$Rev$"
+url = "$URL$"
 
 
 class MilestoneToVersion(Component):

sample-plugins/permissions/public_wiki_policy.py

 from trac.core import *
 from trac.perm import IPermissionPolicy
 
-revision = "$Rev: 6326 $"
-url = "$URL: http://svn.edgewall.org/repos/trac/trunk/sample-plugins/permissions/public_wiki_policy.py $"
+revision = "$Rev$"
+url = "$URL$"
 
 class PublicWikiPolicy(Component):
     """Allow public access to some wiki pages.

sample-plugins/permissions/vulnerability_tickets.py

 from trac.core import *
 from trac.perm import IPermissionPolicy, IPermissionRequestor
 
-revision = "$Rev: 10187 $"
-url = "$URL: http://svn.edgewall.org/repos/trac/trunk/sample-plugins/permissions/vulnerability_tickets.py $"
+revision = "$Rev$"
+url = "$URL$"
 
 class SecurityTicketsPolicy(Component):
     """Prevent public access to security sensitive tickets.

sample-plugins/revision_links.py

 from trac.versioncontrol.web_ui import ChangesetModule
 from trac.wiki.api import IWikiSyntaxProvider
 
-revision = "$Rev: 9156 $"
-url = "$URL: http://svn.edgewall.org/repos/trac/trunk/sample-plugins/revision_links.py $"
+revision = "$Rev$"
+url = "$URL$"
 
 class RevisionLinks(Component):
     """Adds a few more ways to refer to changesets."""

sample-plugins/workflow/CodeReview.py

 from trac.perm import IPermissionRequestor
 from trac.config import Option, ListOption
 
-revision = "$Rev: 7457 $"
-url = "$URL: http://svn.edgewall.org/repos/trac/trunk/sample-plugins/workflow/CodeReview.py $"
+revision = "$Rev$"
+url = "$URL$"
 
 class CodeReviewActionController(Component):
     """Support for simple code reviews.
     a specific state will be selected.
 
     Example (from the enterprise-review-workflow.ini):
-
+    {{{
     review = in_review -> *
     review.name = review as