Commits

Alex Willmer  committed eb65e6e Merge

Merge 0.12-stable branch into ticket-links

- Add ticket_links table at database revision to 27 (formerly 22)
- Modify/add unit tests to match changed/added features
- NB: Functional tests not changed
- NB: Use of SELECT DISTINCT rather than SELECT in ticket queries

  • Participants
  • Parent commits 66f599d, 85f767e
  • Branches ticket-links

Comments (0)

Files changed (471)

+*~
+.*.sw[op]
+.svn
+.hg
+build
+dist
+Trac.egg-info
+*.pyc
+testenv
+testing.log
+functional-testing.log
+html
+htmlcov
+figleaf
+.coverage
+.figleaf*
+*.figleaf
+Makefile.cfg
+doc/.build
+*.mo
+trac/htdocs/js/messages/*.js
+[patterns]
+contrib/trac-svn-hook = LF
+**.cmd = CRLF
+** = native
+syntax: glob
+*~
+.*.sw[op]
+.svn
+.git
+build
+dist
+Trac.egg-info
+*.pyc
+testenv
+testing.log
+functional-testing.log
+html
+htmlcov
+figleaf
+.coverage
+.figleaf*
+*.figleaf
+Makefile.cfg
+doc/.build
+*.mo
+trac/htdocs/js/messages/*.js
  * Jeroen Ruigrok van der Werven <asmodai@in-nomine.org>
  * Odd Simon Simonsen <simon-code@bvnetwork.no>
  * Remy Blank <remy.blank@pobox.com>
+ * Jun Omae <jun66j5@gmail.com>
 
 See also THANKS for people who have contributed to the project.
-Copyright (C) 2003-2009 Edgewall Software
+Copyright (C) 2003-2011 Edgewall Software
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
+Trac 0.12.2 (January 31, 2011)
+http://svn.edgewall.org/repos/trac/tags/trac-0.12.2
+
+This list contains only a few highlights:
+ - install: improved robustness of Trac installation if Babel is
+   installed after the fact (#9439, #9595, #9961)
+ - notifications: support for Asian character width (#4717)
+ - roadmap: fix display of progress bar in some corner cases (#9718)
+   and respect the overall_completion milestone group setting (#9721)
+ - reports: reports and queries look much better, as the columns now
+   keep the same width across groups; the absence of word wrapping in
+   reports has been fixed (#9825)
+ - web admin: improved layout (#8866, #9963)
+ - web: it's now possible to log in different Trac instances sharing
+   the same URL prefix (e.g. /project and /project-test) (#9951)
+
+Trac 0.12.1 (October 9, 2010)
+http://svn.edgewall.org/repos/trac/tags/trac-0.12.1
+
+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)
+ - 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) 
+ - 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.
+
+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
+ - 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
+ - Improved Custom Queries (time fields, multiple disjoint conditions,
+   a.k.a. OR queries)
+ - Timeline filtering by user
+ - ... and numerous smaller features added and bugs fixed since 0.11!
+
+Trac 0.12rc1 'Babel' (June 03, 2010)
+http://svn.edgewall.org/repos/trac/tags/trac-0.12rc1
+
+  See 0.12.
+
+Trac 0.11.7 (March 10, 2010)
+http://svn.edgewall.org/repos/trac/tags/trac-0.11.7
+
+ Trac 0.11.7 is nearly identical to 0.11.7rc1 except for a few more fixes:
+  - avoid an infinite loop when using an AtomicFile in a read-only 
+    directory (#9081) 
+  - don't report client disconnects during writes as internal errors (#9103)
+  - don't reuse a closed cursor, which could happen in one specific case
+    for the pysqlite backend (#9104)
+
+Trac 0.11.7rc1 (February 23, 2010)
+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)
+
+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?)]]
+ - 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 display of value 0 in report cells (#7512)
+
+Trac 0.11.6 (November 28, 2009)
+http://svn.edgewall.org/repos/trac/tags/trac-0.11.6
+
+ Trac 0.11.6 contains two security fixes and a number of bug fixes,
+ performance improvements and minor enhancements. The following list
+ contains only a few highlights:
+
+Security fixes:
+ * Fixed the policy checks in report results when using alternate formats.
+ * Added a check for the "raw" role that is missing in docutils < 0.6.
+
+Performance improvements:
+ * Re-enabled connection pooling with SQLite (#3446).
+ * Added caching of configuration options (#8510).
+
+Bug fixes:
+ * Fixed the "database is locked" issue with SQLite (#3446, #8468).
+ * Deprecated SQLite 2.x support (#8625).
+ * Fixed hanlding of times in timezones with DST (#8240).
+ * Avoid corruption of trac.ini during write (#8623).
+ * Improved support for revision ranges in revision log view (#8349)
+
+Trac 0.11.5 (July 17, 2009)
+http://svn.edgewall.org/repos/trac/tags/trac-0.11.5
+
+ Trac 0.11.5 is identical to 0.11.5rc2 except for fixing a minor
+ incompatibility issue when using IIS via AJP as frontend (#8475).
+
+Trac 0.11.5rc2 (July 11, 2009)
+http://svn.edgewall.org/repos/trac/tags/trac-0.11.5rc2
+
+ Trac 0.11.5rc2 fixes two regressions found in rc1 and one minor enhancement:
+
+ * Fixed workaround for zipped Genshi eggs, [8354], #7823
+ * Fixed internal error when removing a wiki page version [8343].
+ * Fixed display of merge properties for scoped repositories #7715.
+
+Trac 0.11.5rc1 (June 30, 2009)
+http://svn.edgewall.org/repos/trac/tags/trac-0.11.5rc1
+
+ Trac 0.11.5rc1 contains a number of bug fixes and minor enhancements.
+ The following list contains only a few highlights:
+
+Bug fixes:
+ * Implemented pre-upgrade backup support for PostgreSQL and MySQL (#2304)
+ * Fixed PostgreSQL upgrade issue (#8378)
+ * More robust diff parsing (#2672)
+ * Avoid intermittent hangs by not calling apr_terminate explicitly (#7785)
+
+Trac 0.11.4 (March 30, 2009)
+http://svn.edgewall.org/repos/trac/tags/trac-0.11.4
+
+ Trac 0.11.4 is identical to the second release candidate.
+
+ Trac 0.11.4 contains a number of bug fixes and minor enhancements.
+ The following list contains only a few highlights:
+
+ * Custom mainnav links regression (#8153)
+ * Fixed Python 2.3 incompatibility (#8061)
+ * Fixed Python 2.6 notification issue (#8083)
+ * Fixed PostgreSQL multi column index issue (#7600)
+
+Trac 0.11.4rc2 (March 25, 2009)
+http://svn.edgewall.org/repos/trac/tags/trac-0.11.4rc2
+
+ * Custom mainnav links regression (#8153)
+
+Trac 0.11.4rc1 (March 18, 2009)
+http://svn.edgewall.org/repos/trac/tags/trac-0.11.4rc1
+
+ Trac 0.11.4rc1 contains a number of bug fixes and minor enhancements.
+ The following list contains only a few highlights:
+
+Bug fixes:
+ * Fixed Python 2.3 incompatibility (#8061)
+ * Fixed Python 2.6 notification issue (#8083)
+ * Fixed PostgreSQL multi column index issue (#7600)
+
 Trac 0.11.3 (February 15, 2009)
 http://svn.edgewall.org/repos/trac/tags/trac-0.11.3
 
 =======================
 Trac is a lightweight project management tool that is implemented as a
 web-based application. Trac is written in the Python programming language and
-can use SQLite or PostgreSQL as  database. For HTML rendering, Trac uses the
-Genshi templating system.
+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.
+
 
 
 Requirements
 ------------
 To install Trac, the following software packages must be installed:
 
- * Python, version >= 2.3.
-   + Please keep in mind, that for RPM-based systems you will also need
-   python-devel and python-xml packages.
- * Genshi, version >= 0.5
- * Optionally, Subversion, version >= 1.0. (>= 1.1.x recommended)and Subversion SWIG Python bindings (not PySVN).
- * PySQLite, version 2.x for SQLite 3.x
+ * Python, version >= 2.4.
+ * setuptools, version >= 0.6
+ * Genshi, version >= 0.6
+ * Optionally, Subversion, version >= 1.1.x and the Subversion SWIG Python 
+   bindings (not PySVN, that's something different).
+ * One of the following Python bindings, depending on the database used:
+    * pysqlite version 2.x for SQLite 3.x (is part of the standard library 
+      starting with Python 2.5)
+    * psycopg2 version 2.0.x for the PostgreSQL database
+    * MySQLdb, version 1.2.2 for the MySQL database
  * A web server capable of executing CGI/FastCGI scripts, or Apache HTTPD with
-   mod_python. (Trac also comes with a standalone server)
+   mod_python or mod_wsgi. (Trac also comes with a standalone server, tracd)
+
+Any of the above python library can usually be installed using easy_install,
+which itself can be installed using the following bootstrap script:
+
+  $ wget http://peak.telecommunity.com/dist/ez_setup.py
+
+  $ python ez_setup.py
+
+After that, you can do for example: easy_install Genshi
+
+If you're using Python 2.4 and need pysqlite, you can download from
+http://code.google.com/p/pysqlite/downloads/list the Windows installers or the
+tar.gz archive for building from source:
+
+  $ tar xvfz <version>.tar.gz
+
+  $ cd <version>
+
+  $ python setup.py build_static install
+
+That way, the latest SQLite version will be downloaded and built into the
+bindings.
 
 
 Installing Trac
 
 /The Trac Team
 
-Please also consider joining the mailing list at
-<http://lists.edgewall.com/mailman/listinfo/trac/>.
+Please also consider joining the mailing lists at
+<http://groups.google.com/group/trac-users>
 
 
 Visit the Trac open source project at <http://trac.edgewall.org/>
+#          Makefile for testing Trac (see doc/dev/testing.rst)
+#
+#          Some i18n tasks are also supported, see HELP below.
+# ----------------------------------------------------------------------------
+#
+# Note that this is a GNU Makefile.
+# nmake and other abominations are not supported.
+#
+# ----------------------------------------------------------------------------
+
+define HELP
+
+ Please use `make <target>' where <target> is one of: 
+
+  clean               delete all compiled files 
+  status              show which Python is used and other infos
+
+  [python=...]        variable for selecting Python version
+
+ ---------------- Testing tasks
+
+  unit-test           run unit tests
+  functional-test     run functional tests
+  test-wiki           shortcut for running all wiki unit tests
+  test                run all tests
+  coverage            run all tests, under coverage
+  figleaf             run all tests, under figleaf
+
+  [db=...]            variable for selecting database backend
+  [test=...]          variable for selecting a single test file
+  [testopts=...]      variable containing extra options for running tests
+  [coverageopts=...]  variable containing extra options for coverage
+
+ ---------------- Standalone test server
+
+  server              start tracd
+
+  [port=...]          variable for selecting the port
+  [auth=...]          variable for specifying authentication
+  [env=...]           variable for the trac environment or parent dir
+  [tracdopts=...]     variable containing extra options for tracd
+
+ ---------------- L10N tasks
+
+  init-xy             create catalogs for given xy locale
+
+  extraction          regenerate the catalog templates
+
+  update              update all the catalog files from the templates
+  update-xy           update the catalogs for the xy locale only
+
+  compile             compile all the catalog files
+  compile-xy          compile the catalogs for the xy locale only
+
+  check               verify all the catalog files
+  check-xy            verify the catalogs for the xy locale only
+
+  stats               detailed translation statistics for all catalogs
+  stats-pot           total messages in the catalog templates
+  stats-xy            translated, fuzzy, untranslated for the xy locale only
+
+  summary             display percent translated for all catalogs
+  summary-xy          display percent translated for the xy locale only
+                      (suitable for a commit message)
+
+  diff                show relevant changes after an update for all catalogs
+  diff-xy             show relevant changes after an update for the xy locale
+
+  [locale=...]        variable for selecting a set of locales
+
+endef
+export HELP
+
+# ` (keep emacs font-lock happy)
+
+# ----------------------------------------------------------------------------
+#
+# Main targets
+
+.PHONY: all help status clean clean-bytecode clean-mo
+
+ifdef test
+all: status
+	python $(test) $(testopts)
+else
+all: help
+endif
+
+help:
+	@echo "$$HELP"
+
+status:
+	@echo -n "Python version: "
+	@python -V
+	@echo -n "figleaf: "
+	@-which figleaf 2>/dev/null || echo 
+	@echo -n "coverage: "
+	@-which coverage 2>/dev/null || echo 
+	@echo "PYTHONPATH=$$PYTHONPATH"
+	@echo "TRAC_TEST_DB_URI=$$TRAC_TEST_DB_URI"
+	@echo "server-options=$(server-options)"
+
+Trac.egg-info: status
+	python setup.py egg_info
+
+clean: clean-bytecode clean-figleaf clean-coverage
+
+clean-bytecode:
+	find -name \*.py[co] -exec rm {} \;
+
+Makefile Makefile.cfg: ;
+
+# ----------------------------------------------------------------------------
+#
+# Copy Makefile.cfg.sample to Makefile.cfg and adapt to your local environment,
+# no customizations to the present Makefile should be necessary.
+#
+#
+-include Makefile.cfg
+#
+# ----------------------------------------------------------------------------
+
+
+# ----------------------------------------------------------------------------
+#
+# L10N related tasks
+
+ifdef locale
+    locales = $(locale)
+else
+    locales = $(wildcard trac/locale/*/LC_MESSAGES/messages.po)
+    locales := $(subst trac/locale/,,$(locales))
+    locales := $(subst /LC_MESSAGES/messages.po,,$(locales))
+    locales := $(sort $(locales))
+endif
+
+messages.po = trac/locale/$(*)/LC_MESSAGES/messages.po
+messages-js.po = trac/locale/$(*)/LC_MESSAGES/messages-js.po
+messages.pot = trac/locale/messages.pot
+messages-js.pot = trac/locale/messages-js.pot
+
+.PHONY: extract extraction update compile check stats summary diff
+
+init-%:
+	@[ -e $(messages.po) ] \
+	 && echo "$(messages.po) already exists" \
+	 || python setup.py init_catalog -l $(*)
+	@[ -e $(messages-js.po) ] \
+	 && echo "$(messages-js.po) already exists" \
+	 || python setup.py init_catalog_js -l $(*)
+
+extract extraction:
+	python setup.py extract_messages extract_messages_js
+
+update-%:
+	python setup.py update_catalog -l $(*) update_catalog_js -l $(*)
+
+ifdef locale
+update: $(addprefix update-,$(locale))
+else
+update:
+	python setup.py update_catalog update_catalog_js
+endif
+
+compile-%:
+	python setup.py compile_catalog -l $(*) \
+	    compile_catalog_js -l $(*) generate_messages_js -l $(*)
+
+ifdef locale
+compile: $(addprefix compile-,$(locale))
+else
+compile:
+	python setup.py compile_catalog compile_catalog_js
+endif
+
+check: pre-check $(addprefix check-,$(locales))
+	@echo "All catalogs checked are OK"
+
+pre-check:
+	@echo "checking catalogs for $(locales)..."
+
+check-%:
+	@echo -n "$(@): "
+	@msgfmt --check $(messages.po) && msgfmt --check $(messages-js.po) \
+	 && echo OK
+	@rm -f messages.mo
+
+stats: pre-stats $(addprefix stats-,$(locales))
+
+pre-stats: stats-pot
+	@echo "translation statistics for $(locales)..."
+
+stats-pot:
+	@echo "translation statistics for catalog templates:"
+	@echo -n "messages.pot: "; msgfmt --statistics $(messages.pot)
+	@echo -n "messages-js.pot: "; msgfmt --statistics $(messages-js.pot) 
+
+stats-%:
+	@echo -n "messages.po: "; msgfmt --statistics $(messages.po)
+	@[ -e $(messages-js.po) ] \
+	 && echo -n "messages-js.po: "; msgfmt --statistics $(messages-js.po) \
+	 || echo "$(messages-js.po) doesn't exist (make init-$(*))"
+
+summary: $(addprefix summary-,$(locales))
+
+define untranslated-sh
+LC_ALL=C msgfmt --statistics $(1) 2>&1 \
+  | tail -1 \
+  | sed -e 's/0 translated messages, \([0-9]*\) un.*/\1/'
+endef
+
+define translated-sh
+{ LC_ALL=C msgfmt --statistics $(1) 2>&1 || echo 0; } \
+    | tail -1 \
+    | sed -e 's/[^0-9]*\([0-9]*\) translated.*/\1/'
+endef
+
+MESSAGES_TOTAL = \
+    $(eval MESSAGES_TOTAL := ( \
+        $(shell $(call untranslated-sh,$(messages.pot))) + \
+        $(shell $(call untranslated-sh,$(messages-js.pot)))))\
+    $(MESSAGES_TOTAL)
+
+summary-%:
+	@python -c "print 'l10n/$(*): translations updated (%d%%)' \
+	    % (($(shell $(call translated-sh,$(messages.po))) + \
+	        $(shell $(call translated-sh,$(messages-js.po)))) * 100.0 \
+	       / $(MESSAGES_TOTAL))"
+
+diff: $(addprefix diff-,$(locales))
+
+
+diff-%:
+	@svn diff trac/locale/$(*) \
+	    | grep -Ev '^([-+]#:|[@ ])' | grep -E '^[-+@]' || true
+
+clean-mo:
+	find trac/locale -name \*.mo -exec rm {} \;
+	find trac/htdocs/js/messages -name \*.js -exec rm {} \;
+
+
+# ----------------------------------------------------------------------------
+#
+# Testing related tasks
+
+.PHONY: test unit-test functional-test test-wiki
+
+test: unit-test functional-test
+
+unit-test: Trac.egg-info
+	python ./trac/test.py --skip-functional-tests $(testopts)
+
+functional-test: Trac.egg-info
+	python trac/tests/functional/__init__.py -v $(testopts)
+
+test-wiki:
+	python trac/tests/allwiki.py $(testopts)
+
+# ----------------------------------------------------------------------------
+#
+# Coverage related tasks
+#
+# (see http://nedbatchelder.com/code/coverage/)
+
+.PHONY: coverage clean-coverage show-coverage
+
+coverage: clean-coverage test-coverage show-coverage
+
+clean-coverage:
+	coverage erase
+	@rm -fr htmlcov
+
+ifdef test
+test-coverage:
+	coverage run $(test) $(testopts)
+else
+test-coverage: unit-test-coverage functional-test-coverage
+endif
+
+unit-test-coverage:
+	coverage run -a $(coverageopts) trac/test.py --skip-functional-tests
+
+functional-test-coverage:
+	FIGLEAF='coverage run -a $(coverageopts)' python \
+	    trac/tests/functional/testcases.py -v
+
+show-coverage: htmlcov/index.html
+	#coverage report
+
+htmlcov/index.html:
+	coverage html \
+	    --omit=$(subst $(space),$(comma),$(wildcard trac/*/templates)),trac/templates
+
+# ----------------------------------------------------------------------------
+#
+# Figleaf based coverage tasks 
+#
+# (see http://darcs.idyll.org/~t/projects/figleaf/doc/)
+#
+# ** NOTE: there are still several issues with this **
+#  - as soon as a DocTestSuite is run, figleaf gets confused
+#  - functional-test-figleaf is broken (no .figleaf generated)
+
+.PHONY: figleaf clean-figleaf show-figleaf
+
+figleaf: clean-figleaf test-figleaf show-figleaf
+
+clean-figleaf:
+	rm -f .figleaf* *.figleaf
+	rm -fr figleaf
+
+show-figleaf: figleaf/index.html
+
+figleaf/index.html: $(wildcard *.figleaf)
+	figleaf2html \
+	    --output-directory=figleaf \
+	    --exclude-patterns=trac/tests/figleaf-exclude \
+	    *.figleaf
+
+
+.PHONY: test-figleaf  unit-test-figleaf functional-test-figleaf
+
+test-figleaf: unit-test-figleaf functional-test-figleaf
+
+unit-test-figleaf: unit-test.figleaf
+
+functional-test-figleaf: functional-test.figleaf
+
+
+functional-test.figleaf: Trac.egg-info
+	rm -f .figleaf
+	FIGLEAF=figleaf python trac/tests/functional/testcases.py -v
+	@mv .figleaf $(@)
+
+unit-test.figleaf: Trac.egg-info
+	rm -f .figleaf
+	figleaf trac/test.py --skip-functional-tests
+	@mv .figleaf $(@)
+
+
+# ----------------------------------------------------------------------------
+#
+# Tracd related tasks
+
+port ?= 8000
+tracdopts ?= -r
+
+define server-options
+ $(if $(port),-p $(port))\
+ $(if $(auth),-a '$(auth)')\
+ $(tracdopts)\
+ $(if $(wildcard $(env)/VERSION),$(env),-e $(env))
+endef
+
+server: Trac.egg-info
+ifdef env
+	python trac/web/standalone.py $(server-options)
+else
+	@echo "\`env' variable was not specified. See \`make help'."
+endif
+
+# ----------------------------------------------------------------------------
+#
+# Setup environment variables
+
+python-home := $(python.$(if $(python),$(python),$($(db).python)))
+
+ifeq "$(OS)" "Windows_NT"
+    ifndef python-home
+        # Detect location of current python 
+        python-exe := $(shell python -c 'import sys; print sys.executable')
+        python-home := $(subst \python.exe,,$(python-exe))
+    endif
+    SEP = ;
+    python-bin = $(python-home)$(SEP)$(python-home)/Scripts
+else
+    SEP = :
+endif
+
+ifdef python-bin
+    export PATH := $(python-bin)$(SEP)$(PATH)
+endif
+export PYTHONPATH := .$(SEP)$(PYTHONPATH)
+export TRAC_TEST_DB_URI = $($(db).uri)
+
+# Misc.
+space = $(empty) $(empty)
+comma = ,
+# ----------------------------------------------------------------------------

File Makefile.cfg.sample

+# -*- Makefile -*- configuration file sample 
+#
+# Adapt to your local setting and copy to Makefile.cfg
+#
+# ----------------------------------------------------------------------------
+# Python Installations (select with `python=` on the `make` command line)
+
+python.23 =
+python.24 =
+python.25 = C:/Dev/Python254
+python.ap25 = C:/Dev/ActivePython254
+python.26 = C:/Dev/Python261
+python.27 =
+
+# default Python version (if not defined, pick the one from the path)
+.python =
+
+# ----------------------------------------------------------------------------
+# Database Backends (select with `db=` on the `make` command line)
+
+# db URIs 
+mysql.uri = mysql://tracuser:tracpassword@localhost/trac
+postgres.uri = postgres://tracuser:tracpassword@localhost:5432/trac?schema=tractest
+
+# default db backend (if not defined, use in-memory sqlite)
+.uri =
+
+# default Python versions to use when `db` is specified
+mysql.python = 25
+postgres.python = 26
+
+# ----------------------------------------------------------------------------
+# Settings for the test server
+
+env = ~/tracenvs
+auth = *,~/tracenvs/htdigest.realm,realm
+
+# ----------------------------------------------------------------------------
+# Custom rules 
+
+.PHONY: bigtest
+
+bigtest:
+	make python=24 test
+	make db=postgres test
+	make db=mysql test
+
+.PHONY: frup frcomp
+
+frup: stats-pot extraction update-fr stats-fr
+
+frcomp: check-fr compile-fr stats-fr stats-pot
 Release Notes for Trac 0.12 Babel Release
 =========================================
-''Month'' ''DD'', YYYY
+June 13, 2010
 
 Highlights
 ----------
- * Internationalization support and available translations in more than twenty languages 
- * ...
+ * Translation of Trac in your language using Babel (http://babel.edgewall.org)
+ * Multiple Repository Support per environment
+ * Improved Wiki, more powerful syntax and nicer user interface with 
+   automatic preview in side-by-side editing mode
+ * Improved Ticket user interface, with editable comments and 
+   automatic preview
 
 Detailed User Visible Changes
-=============================
+-----------------------------
 
-User Preferences
-----------------
-A new panel for selecting the prefered language has been added.
-
-Lots of other minor improvements
-
- * ...
-
-Caveats
--------
+A detailed view of the API changes since 0.11.x can be found in 
+TracDev/ReleaseNotes/0.12.
 
 Developer-visible changes
-=========================
+-------------------------
 
 A detailed view of the API changes since 0.11.x can be found in 
 TracDev/ApiChanges/0.12.
 Many thanks to the growing number of people who have, and continue to,
 support the project. Also our thanks to all people providing feedback and
 bug reports that helps us making Trac better, easier to use and more
-effective.
-
+effective. Starting with the 0.12 release, special thanks go to our
+many translators.
 Without your invaluable help, Trac would not evolve. Thank you all.
 
 Finally, we offer hope that Trac will prove itself useful to like-minded

File TESTING-README

File contents unchanged.
  * Ants Aasma                     ants.aasma@gmail.com
  * Pedro Algarvio (s0undt3ch)     ufs@ufsoft.org
  * Brad Anderson                  brad@dsource.org
+ * Roberto Aragón                 robarago@gmail.com
  * Christopher Armstrong          radix
  * Jani Averbach                  jaa@jaa.iki.fi
  * Juanma Barranquero             lektu@terra.es
  * Erik Bray                      hyugaricdeau@gmail.com
  * Toni Brkic                     toni.brkic@switchcore.com
  * Rocky Burt                     rocky.burt@myrealbox.com
+ * Tomáš Čapek                    soulcharmer@gmail.com
+ * Shane Caraveo                  shanec@activestate.com
  * Eli Carter                     eli.carter@commprove.com
+ * José manuel Castroagudín Silva
  * Michele Cella
  * Sergey S. Chernov              sergeych@tancher.com
  * Felix Colins                   felix@keyghost.com
  * Wesley Crucius                 wcrucius@sandc.com
+ * Wolfram Diestel                diestel@steloj.de
+ * Mujdat Dinc 
  * dju'                           
  * Juracy Filho                   juracy@gmail.com
  * Daragh Fitzpatrick             Daragh@i2i-Tech.com
  * Justin Francis
  * Markus Fuchs                   
  * Lele Gaifax
+ * Raúl García
  * Axel Gembe
  * Eric Gillespie                 epg@netbsd.org
  * Daniel Kahn Gillmor
  * Shun-ichi Goto                 gotoh@taiyo.co.jp
  * Heiko Graeber
  * Chris Green                    cmgreen@uab.edu
- * Gruffudd Prys                  cbs201@bangor.ac.uk
  * Mikael Hallendal               micke@imendio.com
  * Jeff Hammel                    jhammel@openplans.org
  * Stephen Hansen                 shansen@advpubtech.com
  * Laurie Harper                  zodiac@holoweb.net
  * Francois Harvey                fharvey@securiweb.net
  * Tim Hatch                      trac@timhatch.com
+ * Oren Held                      oren@held.org.il
  * Mikko Hellsing
  * Michael Hope                   michael.hope@hamjet.co.nz
+ * Laurens Holst                  laurens@grauw.nl
+ * David Huang                    khym@azeotrope.org
  * Zheng Hui Hu                   huzhengh@gmail.com
  * Richard Hult                   richard@imendio.com
+ * InterAct Trac-ja Team          trac-ja@i-act.co.jp
  * Paul Irish                     paul.irishEWWSPAM@gmail.com
+ * Masaharu Iwai
  * Noah Kantrowitz (coderanger)   coderanger@yahoo.com
+ * Alexey Kinyov
  * Tomas Kopecek
  * Waldemar Kornewald             wkornew@gmx.net
  * Nuutti Kotivuori               naked@iki.fi
  * Tilemahos Manolatos
  * Angel Marin                    anmar@gmx.net
  * Simon Martin
+ * Narine Martirosyan             narine_martirosyan@instigatedesign.com
+ * Mark Mc Mahon                  mark.m.mcmahon@gmail.com
  * Aristotelis Mertis
  * Wojciech Michalski
  * Keir Mierle                    keir@cs.utoronto.ca
  * Jennifer Murtell               jen@jmurtell.com
  * Jacob Norda                    jacobnorda@gmail.com
  * Dirkjan Ochtman                dirkjan@ochtman.nl
+ * Jun Omae                       jun66j5@gmail.com
+ * Itamar Ostricher               itamarost@gmail.com
+ * Bas van Oostveen               v.oostveen@gmail.com
  * Seungseo Park                  sseopark@gmail.com
  * Cap Petschulat                 cap@cdres.com
  * pkou                           pkou@ua.fm
+ * Alexandr Prudnikov             al.prudnikov@gmail.com
+ * Gruffudd Prys                  cbs201@bangor.ac.uk
  * Mikko Rantalainen
+ * Mikael Relbe                   mikael@relbe.se
  * Nicholas Riley                 sabi
  * Armin Ronacher (mitsuhiko)     armin.ronacher@active-4.com
  * Mark Rowe                      mark.rowe@bdash.net.nz
+ * Guy Rozendorn                  guy@rzn.co.il
  * Jeroen Ruigrok van der Werven  asmodai@in-nomine.org
  * Olliver Rutherfurd             ollie
  * Andres Salomon                 dilinger@athenacr.com
  * Michael Scherer                misc@mandrake.org
  * Andreas Schrattenecker         vittorio
+ * Jan Schukat                    shookie@email.de
+ * Felix Schwarz                  felix.schwarz@oss.schwarz.eu
  * Emmeran Seehuber               rototor@rototor.de
  * Odd Simon Simonsen             simon-code@bvnetwork.no
  * Noah Slater                    nslater@gmail.com
+ * Carlos Sobrinho
  * Bill Soudan                    bill@soudan.net
  * Ludvig Strigeus                
+ * Alexandru Szasz
  * Markus Tacker                  m@tacker.org
  * Kim Taedong                    tdkim@unimo.co.kr
  * Kyosuke Takayama               support@mc.neweb.ne.jp
  * Alec Thomas                    alec@swapoff.org
  * Jani Tiainen                   redetin@luukku.com
  * Ghassem Tofighi                tofighi@gmail.com
+ * Andrea Tomasini                andrea.tomasini@agile42.com
  * Zilvinas Valinskas             zilvinas@gemtek.lt
  * Jason Vasquez                  jason@mugfu.com
  * Venčeslav Vezjak
  * Leslie H. Watter
+ * Gregor Wegberg
  * Jeff Weiss                     trac@jeffweiss.org
  * Tính Trương Xuân
  * Dmitry Yusupov                 dmitry_yus@yahoo.com
 The following sections discuss any extra actions that may need to be taken
 to upgrade to specific versions of Trac.
 
+From 0.11.x to 0.12.x
+---------------------
+
+Really, go read trac/wiki/default-pages/TracUpgrade ...
+
 From 0.10.x to 0.11.x
 ---------------------
 

File contrib/bugzilla2trac.py

 Requires:  Trac 0.9b1 from http://trac.edgewall.org/
            Python 2.3 from http://www.python.org/
            MySQL >= 3.23 from http://www.mysql.org/
+           or PostGreSQL 8.4 from http://www.postgresql.org/
+           or SQLite 3 from http://www.sqlite.org/
 
 Thanks:    Mark Rowe <mrowe@bluewire.net.nz>
             for original TracDatabase class
 Many enhancements, Bill Soudan <bill@soudan.net>
 Other enhancements, Florent Guillaume <fg@nuxeo.com>
 Reworked, Jeroen Ruigrok van der Werven <asmodai@in-nomine.org>
+Jeff Moreland <hou5e@hotmail.com>
 
 $Id$
 """
 # Bugzilla version.  You can find this in Bugzilla's globals.pl file.
 #
 # Currently, the following bugzilla versions are known to work:
-#   2.11 (2110), 2.16.5 (2165), 2.18.3 (2183), 2.19.1 (2191), 2.23.3 (2233)
+#   2.11 (2110), 2.16.5 (2165), 2.16.7 (2167),  2.18.3 (2183), 2.19.1 (2191),
+#   2.23.3 (2233), 3.04.4 (3044)
 #
 # If you run this script on a version not listed here and it is successful,
-# please file a ticket at http://trac.edgewall.org/ and assign it to
-# jruigrok.
-BZ_VERSION = 2180
+# please file a ticket at http://trac.edgewall.org
+#
+BZ_VERSION = 3044
 
 # MySQL connection parameters for the Bugzilla database.  These can also
 # be specified on the command line.
 # These milestones are ignored
 IGNORE_MILESTONES = ["---"]
 
+# Don't import user names and passwords into htpassword if
+# user is disabled in bugzilla? (i.e. profiles.DisabledText<>'')
+IGNORE_DISABLED_USERS = True
+
 # These logins are converted to these user ids
 LOGIN_MAP = {
     #'some.user@example.com': 'someuser',
 # even if not mentionned in KEYWORDS_MAPPING.
 MAP_ALL_KEYWORDS = True
 
+# Custom field mappings
+CUSTOMFIELD_MAP = {
+    #'Bugzilla_field_name': 'Trac_customfield_name',
+    #'op_sys': 'os',
+    #'cf_featurewantedby': 'wanted_by',
+    #'product': 'product'
+}
 
 # Bug comments that should not be imported.  Each entry in list should
 # be a regular expression.
 IGNORED_ACTIVITY_FIELDS = ["everconfirmed"]
 
 # Regular expression and its replacement
-BUG_NO_RE = re.compile(r"\b(bug #?)([0-9])")
+# this expression will update references to bugs 1 - 99999 that
+# have the form "bug 1" or "bug #1"
+BUG_NO_RE = re.compile(r"\b(bug #?)([0-9]{1,5})\b", re.I)
 BUG_NO_REPL = r"#\2"
 
 ###
         self._db.autocommit = False
         self.loginNameCache = {}
         self.fieldNameCache = {}
+        from trac.db.api import DatabaseManager
+	self.using_postgres = DatabaseManager(self.env).connection_uri.startswith("postgres:")
 
     def db(self):
         return self._db
 
     def hasTickets(self):
         c = self.db().cursor()
-        c.execute("SELECT count(*) FROM Ticket")
+        c.execute("SELECT count(*) FROM ticket")
         return int(c.fetchall()[0][0]) > 0
 
     def assertNoTickets(self):
             print "  inserting severity '%s' - '%s'" % (value, i)
             c.execute("""INSERT INTO enum (type, name, value)
                                    VALUES (%s, %s, %s)""",
-                      ("severity", value.encode('utf-8'), i))
+                      ("severity", value, i))
         self.db().commit()
 
     def setPriorityList(self, s):
             print "  inserting priority '%s' - '%s'" % (value, i)
             c.execute("""INSERT INTO enum (type, name, value)
                                    VALUES (%s, %s, %s)""",
-                      ("priority", value.encode('utf-8'), i))
+                      ("priority", value, i))
         self.db().commit()
 
 
             print "  inserting component '%s', owner '%s'" % \
                             (comp[key], comp['owner'])
             c.execute("INSERT INTO component (name, owner) VALUES (%s, %s)",
-                      (comp[key].encode('utf-8'),
-                       comp['owner'].encode('utf-8')))
+                      (comp[key], comp['owner']))
         self.db().commit()
 
     def setVersionList(self, v, key):
         for vers in v:
             print "  inserting version '%s'" % (vers[key])
             c.execute("INSERT INTO version (name) VALUES (%s)",
-                      (vers[key].encode('utf-8'),))
+                      (vers[key],))
         self.db().commit()
 
     def setMilestoneList(self, m, key):
             milestone = ms[key]
             print "  inserting milestone '%s'" % (milestone)
             c.execute("INSERT INTO milestone (name) VALUES (%s)",
-                      (milestone.encode('utf-8'),))
+                      (milestone,))
         self.db().commit()
 
     def addTicket(self, id, time, changetime, component, severity, priority,
                   owner, reporter, cc, version, milestone, status, resolution,
-                  summary, description, keywords):
+                  summary, description, keywords, customfields):
         c = self.db().cursor()
 
-        desc = description.encode('utf-8')
+        desc = description
         type = "defect"
 
-        if severity.lower() == "enhancement":
+        if SEVERITIES:
+            if severity.lower() == "enhancement":
                 severity = "minor"
                 type = "enhancement"
 
+        else:
+            if priority.lower() == "enhancement":
+                priority = "minor"
+                type = "enhancement"
+
         if PREFORMAT_COMMENTS:
-          desc = '{{{\n%s\n}}}' % desc
+            desc = '{{{\n%s\n}}}' % desc
 
         if REPLACE_BUG_NO:
             if BUG_NO_RE.search(desc):
                                          keywords)
                                  VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s,
                                          %s, %s, %s, %s, %s, %s, %s, %s)""",
-                  (id, type.encode('utf-8'), datetime2epoch(time),
-                   datetime2epoch(changetime), component.encode('utf-8'),
-                   severity.encode('utf-8'), priority.encode('utf-8'), owner,
-                   reporter, cc, version, milestone.encode('utf-8'),
-                   status.lower(), resolution, summary.encode('utf-8'), desc,
+                  (id, type, datetime2epoch(time),
+                   datetime2epoch(changetime), component,
+                   severity, priority, owner,
+                   reporter, cc, version, milestone,
+                   status.lower(), resolution, summary, desc,
                    keywords))
 
         self.db().commit()
-        return self.db().get_last_id(c, 'ticket')
+        if self.using_postgres:
+            c.execute("""SELECT SETVAL('ticket_id_seq', MAX(id)) FROM ticket;
+              SELECT SETVAL('report_id_seq', MAX(id)) FROM report""")
+        ticket_id = self.db().get_last_id(c, 'ticket')
+
+        # add all custom fields to ticket
+        for name, value in customfields.iteritems():
+            self.addTicketCustomField(ticket_id, name, value)
+
+        return ticket_id
+
+    def addTicketCustomField(self, ticket_id, field_name, field_value):
+        c = self.db().cursor()
+
+        if field_value == None:
+            return
+
+        c.execute("""INSERT INTO ticket_custom (ticket, name, value)
+                                 VALUES (%s, %s, %s)""",
+                  (ticket_id, field_name, field_value))
+
+        self.db().commit()
 
     def addTicketComment(self, ticket, time, author, value):
-        comment = value.encode('utf-8')
+        comment = value
 
         if PREFORMAT_COMMENTS:
           comment = '{{{\n%s\n}}}' % comment
                                                 oldvalue, newvalue)
                                         VALUES (%s, %s, %s, %s, %s, %s)""",
                   (ticket, datetime2epoch(time), author, field,
-                   oldvalue.encode('utf-8'), newvalue.encode('utf-8')))
+                   oldvalue, newvalue))
         self.db().commit()
 
     def addAttachment(self, author, a):
-        description = a['description'].encode('utf-8')
-        id = a['bug_id']
-        filename = a['filename'].encode('utf-8')
-        filedata = StringIO.StringIO(a['thedata'])
-        filesize = len(filedata.getvalue())
-        time = a['creation_ts']
-        print "    ->inserting attachment '%s' for ticket %s -- %s" % \
-                (filename, id, description)
-
-        attachment = Attachment(self.env, 'ticket', id)
-        attachment.author = author
-        attachment.description = description
-        attachment.insert(filename, filedata, filesize, datetime2epoch(time))
-        del attachment
+        if a['filename'] != '':
+            description = a['description']
+            id = a['bug_id']
+            filename = a['filename']
+            filedata = StringIO.StringIO(a['thedata'])
+            filesize = len(filedata.getvalue())
+            time = a['creation_ts']
+            print "    ->inserting attachment '%s' for ticket %s -- %s" % \
+                    (filename, id, description)
+            attachment = Attachment(self.env, 'ticket', id)
+            attachment.author = author
+            attachment.description = description
+            attachment.insert(filename, filedata, filesize, datetime2epoch(time))
+            del attachment
 
     def getLoginName(self, cursor, userid):
         if userid not in self.loginNameCache:
         connector, op = ' OR ', '='
     clause = connector.join(["%s %s '%s'" % (fieldName, op, value) 
                              for value in values])
-    return ' ' + clause
+    return ' (' + clause + ')'
 
 def convert(_db, _host, _user, _password, _env, _force):
     activityFields = FieldTranslator()
             (_db, _host, _user, ("*" * len(_password)))
     mysql_con = MySQLdb.connect(host=_host,
                 user=_user, passwd=_password, db=_db, compress=1,
-                cursorclass=MySQLdb.cursors.DictCursor)
+                cursorclass=MySQLdb.cursors.DictCursor,
+                charset='utf8')
     mysql_cur = mysql_con.cursor()
 
     # init Trac environment
         c.execute("DELETE FROM ticket")
         trac.db().commit()
 
+        c.execute("DELETE FROM ticket_custom")
+        trac.db().commit()
+
         c.execute("DELETE FROM attachment")
 	attachments_dir = os.path.join(os.path.normpath(trac.env.path),
                                 "attachments")
             sql = ("SELECT p.name AS product, c.name AS comp, "
                    " c.initialowner AS owner "
                    "FROM components c, products p "
-                   "WHERE c.product_id = p.id and " + 
+                   "WHERE c.product_id = p.id AND" + 
                    makeWhereClause('p.name', PRODUCTS))
         else:
             sql = ("SELECT program AS product, value AS comp, "
 
     print "\n4. Import versions..."
     if BZ_VERSION >= 2180:
-        sql = """SELECT DISTINCTROW versions.value AS value
-                               FROM products, versions"""
-        sql += " WHERE" + makeWhereClause('products.name', PRODUCTS)
+        sql = """SELECT DISTINCTROW v.value AS value
+                               FROM products p, versions v"""
+        sql += " WHERE v.product_id = p.id AND"
+        sql += makeWhereClause('p.name', PRODUCTS)
     else:
         sql = "SELECT DISTINCTROW value FROM versions"
         sql += " WHERE" + makeWhereClause('program', PRODUCTS)
     trac.setMilestoneList(milestones, 'value')
 
     print "\n6. Retrieving bugs..."
-    sql = """SELECT DISTINCT b.*, c.name AS component, p.name AS product
-                        FROM bugs AS b, components AS c, products AS p """
-    sql += " WHERE (" + makeWhereClause('p.name', PRODUCTS)
-    sql += ") AND b.product_id = p.id"
-    sql += " AND b.component_id = c.id"
-    sql += " ORDER BY b.bug_id"
+    if BZ_VERSION >= 2180: 
+        sql = """SELECT DISTINCT b.*, c.name AS component, p.name AS product
+                            FROM bugs AS b, components AS c, products AS p """
+        sql += " WHERE" + makeWhereClause('p.name', PRODUCTS)
+        sql += " AND b.product_id = p.id"
+        sql += " AND b.component_id = c.id"
+        sql += " ORDER BY b.bug_id"
+    else:
+        sql = """SELECT DISTINCT b.*, c.value AS component, p.product AS product
+                            FROM bugs AS b, components AS c, products AS p """
+        sql += " WHERE" + makeWhereClause('p.product', PRODUCTS)
+        sql += " AND b.product = p.product"
+        sql += " AND b.component = c.value"
+        sql += " ORDER BY b.bug_id"
     mysql_cur.execute(sql)
     bugs = mysql_cur.fetchall()
 
 
     print "\n7. Import bugs and bug activity..."
     for bug in bugs:
+
         bugid = bug['bug_id']
 
         ticket = {}
             ticket['component'] = bug['product']
         else:
             ticket['component'] = bug['component']
-        ticket['severity'] = bug['bug_severity']
-        ticket['priority'] = bug['priority'].lower()
 
+        if SEVERITIES:
+            ticket['severity'] = bug['bug_severity']
+            ticket['priority'] = bug['priority'].lower()
+        else:
+            # use bugzilla severities as trac priorities, and ignore bugzilla
+            # priorities
+            ticket['severity'] = ''
+            ticket['priority'] = bug['bug_severity']
+        
         ticket['owner'] = trac.getLoginName(mysql_cur, bug['assigned_to'])
         ticket['reporter'] = trac.getLoginName(mysql_cur, bug['reporter'])
 
+        # pack bugzilla fields into dictionary of trac custom field
+        # names and values
+        customfields = {}
+        for bugfield, customfield in CUSTOMFIELD_MAP.iteritems():
+            customfields[customfield] = bug[bugfield]
+        ticket['customfields'] = customfields
+
         mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s", bugid)
         cc_records = mysql_cur.fetchall()
         cc_list = []
         for cc in cc_records:
             cc_list.append(trac.getLoginName(mysql_cur, cc['who']))
-        cc_list = [cc for cc in cc_list if '@' in cc and cc not in IGNORE_CC]
+        cc_list = [cc for cc in cc_list if cc not in IGNORE_CC]  
         ticket['cc'] = string.join(cc_list, ', ')
 
         ticket['version'] = bug['version']
 
             # convert bugzilla field names...
             if field_name == "bug_severity":
-                field_name = "severity"
+                if SEVERITIES:
+                    field_name = "severity"
+                else:
+                    field_name = "priority"
             elif field_name == "assigned_to":
                 field_name = "owner"
             elif field_name == "bug_status":
                   oldChange['oldvalue'] += " " + ticketChange['oldvalue']
                   oldChange['newvalue'] += " " + ticketChange['newvalue']
                   break
-              # cc sometime appear in different activities with same time
-              if (field_name == "cc" \
+              # cc and attachments.isobsolete sometime appear 
+              # in different activities with same time
+              if ((field_name == "cc" or field_name == "attachments.isobsolete") \
                   and oldChange['time'] == ticketChange['time']):
                   oldChange['newvalue'] += ", " + ticketChange['newvalue']
                   break
             trac.addAttachment(author, a)
 
     print "\n8. Importing users and passwords..."
-    if BZ_VERSION >= 2180:
-        mysql_cur.execute("SELECT login_name, cryptpassword FROM profiles")
+    if BZ_VERSION >= 2164:
+        selectlogins = "SELECT login_name, cryptpassword FROM profiles";
+        if IGNORE_DISABLED_USERS:
+            selectlogins = selectlogins + " WHERE disabledtext=''"
+        mysql_cur.execute(selectlogins)
         users = mysql_cur.fetchall()
+    else:
+        users = ()
     htpasswd = file("htpasswd", 'w')
     for user in users:
         if LOGIN_MAP.has_key(user['login_name']):
             login = LOGIN_MAP[user['login_name']]
         else:
             login = user['login_name']
+        
         htpasswd.write(login + ":" + user['cryptpassword'] + "\n")
 
     htpasswd.close()
 
 def datetime2epoch(dt) :
     import time
-    return time.mktime(dt.timetuple())
+    return time.mktime(dt.timetuple()) * 1000000
 
 def usage():
     print """bugzilla2trac - Imports a bug database from Bugzilla into Trac.
   -p | --passwd <MySQL password>   - Bugzilla's user password
   -c | --clean                     - Remove current Trac tickets before
                                      importing
+  -n | --noseverities              - import Bugzilla severities as Trac 
+                                     priorities and forget Bugzilla priorities
   --help | help                    - This help info
 
 Additional configuration options can be defined directly in the script.
 
 def main():
     global BZ_DB, BZ_HOST, BZ_USER, BZ_PASSWORD, TRAC_ENV, TRAC_CLEAN
+    global SEVERITIES, PRIORITIES, PRIORITIES_MAP
     if len (sys.argv) > 1:
     	if sys.argv[1] in ['--help','help'] or len(sys.argv) < 4:
     	    usage()
     	        iter = iter + 1
     	    elif sys.argv[iter] in ['-c', '--clean']:
     	        TRAC_CLEAN = 1
+            elif sys.argv[iter] in ['-n', '--noseverities']:
+                # treat Bugzilla severites as Trac priorities
+                PRIORITIES = SEVERITIES
+                SEVERITIES = []
+                PRIORITIES_MAP = {}
     	    else:
     	        print "Error: unknown parameter: " + sys.argv[iter]
     	        sys.exit(0)

File contrib/checkwiki.py

  "TracPlugins",
  "TracQuery",
  "TracReports",
+ "TracRepositoryAdmin",
  "TracRevisionLog",
  "TracRoadmap",
  "TracRss",
         print "\t-p prefix -- When downloading, prepend 'prefix/' to the page."
         sys.exit()
     get_page = get_page_from_file
-    prefix = None
+    prefix = ''
     check = True
     for o,a in opts:
         if o == '-d':

File contrib/emailfilter.py

 Copyright 2005, Daniel Lundin <daniel@edgewall.com>
 Copyright 2005, Edgewall Software
 
+Please note: 
+
+This is only a starting point. See
+ * http://trac.edgewall.org/ticket/5327 and
+ * http://trac-hacks.org/intertrac/EmailtoTracScript
+for more complete and advanced examples.
+
 The scripts reads emails from stdin and inserts directly into a Trac database.
 MIME headers are mapped as follows:
 

File contrib/sourceforge2trac.py

 """
 Import a Sourceforge project's tracker items into a Trac database.
 
-Requires:  Development version of Trac 0.7-pre from http://trac.edgewall.org/
-           ElementTree from effbot.org/zone/element.htm
-           Python 2.3 from http://www.python.org/
+Requires:
+   Trac 0.11 from http://trac.edgewall.org/
+   Python 2.5 from http://www.python.org/
            
-The Sourceforge tracker items can be exported from the 'Backup' page of the
-project admin section.
+The Sourceforge tracker items can be exported from the 'Backup' page
+of the project admin section. Substitute XXXXX with project id:
+https://sourceforge.net/export/xml_export2.php?group_id=XXXXX
 
+
+Initial version for Trac 0.7 and old artiface SF export format is
 Copyright 2004, Mark Rowe <mrowe@bluewire.net.nz>
+
+Version for Trac 0.11 and SF XML2 export format, completely rewritten
+except TracDatabase class is
+Copyright 2010, anatoly techtonik <techtonik@php.net>
+HGID: 92fd15e8398c
+
+$Id$
+
+
+Uses Trac 0.11 DB format version 21
+SourceForge XML Export format identified by the header:
+<!DOCTYPE project_export SYSTEM "http://sourceforge.net/export/sf_project_export_0.2.dtd">
+
+Works with all DB backends. Attachments are not downloaded, but inserted
+as links to SF tracker.
+
+
+Ticket Types, Priorities and Resolutions
+----------------------------------------
+Conversion kills default Trac ticket types:
+- defect      1
+- enhancement 2
+- task        3
+
+and priorities:
+- blocker  1
+- critical 2
+- major    3
+- minor    4
+- trivial  5
+
+and resolutions:
+- fixed      1
+- invalid    2
+- wontfix    3
+- duplicate  4
+- worksforme 5
+
+
+Versions and Milestones
+-----------------------
+Kills versions and milestones from existing Trac DB
+
+
+Mapping
+-------
+tracker_name == ticket_type
+group_name == version
+category_name == component
+
+user nobody == anonymous
+
+
+Not implemented (feature:reason)
+--------------------------------
+attachments:made as a comment with links to attachments stored on SF
+            (type,id,filename,size,time,description,author,ipnr)
+ticket_custom:unknown (ticket,name,value)
+history:imported only for summary, priority. closed date and owner fields
+
+severities:no field in source data
 """
 
-from elementtree.ElementTree import ElementTree
-from datetime import datetime
+
+#: rename users from SF to Trac
+user_map = {"nobody":"anonymous"}
+
+