You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2014/11/15 02:14:53 UTC

svn commit: r1639823 [24/29] - in /bloodhound/branches/trac-1.0.2-integration/trac: ./ contrib/ contrib/cgi-bin/ contrib/workflow/ doc/ doc/dev/ doc/utils/ sample-plugins/ sample-plugins/permissions/ sample-plugins/workflow/ trac/ trac/admin/ trac/admi...

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/chrome.py
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/chrome.py?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/chrome.py (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/chrome.py Sat Nov 15 01:14:46 2014
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2013 Edgewall Software
+# Copyright (C) 2005-2013 Edgewall Software
 # All rights reserved.
 #
 # This software is licensed as described in the file COPYING, which
@@ -11,23 +11,31 @@
 # individuals. For the exact contribution history, see the revision
 # history and logs, available at http://trac.edgewall.org/log/.
 
-from trac.core import Component, implements
-from trac.test import EnvironmentStub
+import os
+import shutil
+import tempfile
+import unittest
+
+import trac.tests.compat
+from trac.core import Component, TracError, implements
+from trac.test import EnvironmentStub, locale_en
 from trac.tests.contentgen import random_sentence
+from trac.util import create_file
 from trac.web.chrome import (
     Chrome, INavigationContributor, add_link, add_meta, add_notice, add_script,
     add_script_data, add_stylesheet, add_warning)
 from trac.web.href import Href
 
-import unittest
 
 class Request(object):
     locale = None
+    args = {}
     def __init__(self, **kwargs):
         self.chrome = {}
         for k, v in kwargs.items():
             setattr(self, k, v)
 
+
 class ChromeTestCase(unittest.TestCase):
 
     def setUp(self):
@@ -76,14 +84,24 @@ class ChromeTestCase(unittest.TestCase):
         add_script(req, 'common/js/trac.js')
         add_script(req, 'common/js/trac.js')
         add_script(req, 'http://example.com/trac.js')
+        add_script(req, '//example.com/trac.js')
+        add_script(req, '/dynamic.js')
+        add_script(req, 'plugin/js/plugin.js')
         scripts = req.chrome['scripts']
-        self.assertEqual(2, len(scripts))
+        self.assertEqual(5, len(scripts))
         self.assertEqual('text/javascript', scripts[0]['type'])
         self.assertEqual('/trac.cgi/chrome/common/js/trac.js',
                          scripts[0]['href'])
         self.assertEqual('text/javascript', scripts[1]['type'])
         self.assertEqual('http://example.com/trac.js',
                          scripts[1]['href'])
+        self.assertEqual('text/javascript', scripts[2]['type'])
+        self.assertEqual('//example.com/trac.js',
+                         scripts[2]['href'])
+        self.assertEqual('/trac.cgi/dynamic.js',
+                         scripts[3]['href'])
+        self.assertEqual('/trac.cgi/chrome/plugin/js/plugin.js',
+                         scripts[4]['href'])
 
     def test_add_script_data(self):
         req = Request(href=Href('/trac.cgi'))
@@ -97,14 +115,24 @@ class ChromeTestCase(unittest.TestCase):
         add_stylesheet(req, 'common/css/trac.css')
         add_stylesheet(req, 'common/css/trac.css')
         add_stylesheet(req, 'https://example.com/trac.css')
+        add_stylesheet(req, '//example.com/trac.css')
+        add_stylesheet(req, '/dynamic.css')
+        add_stylesheet(req, 'plugin/css/plugin.css')
         links = req.chrome['links']['stylesheet']
-        self.assertEqual(2, len(links))
+        self.assertEqual(5, len(links))
         self.assertEqual('text/css', links[0]['type'])
         self.assertEqual('/trac.cgi/chrome/common/css/trac.css',
                          links[0]['href'])
         self.assertEqual('text/css', links[1]['type'])
         self.assertEqual('https://example.com/trac.css',
                          links[1]['href'])
+        self.assertEqual('text/css', links[2]['type'])
+        self.assertEqual('//example.com/trac.css',
+                         links[2]['href'])
+        self.assertEqual('/trac.cgi/dynamic.css',
+                         links[3]['href'])
+        self.assertEqual('/trac.cgi/chrome/plugin/css/plugin.css',
+                         links[4]['href'])
 
     def test_add_stylesheet_media(self):
         req = Request(base_path='/trac.cgi', href=Href('/trac.cgi'))
@@ -152,8 +180,8 @@ class ChromeTestCase(unittest.TestCase):
         # Verify that no logo data is put in the HDF if no logo is configured
         self.env.config.set('header_logo', 'src', '')
         info = Chrome(self.env).prepare_request(req)
-        assert 'src' not in info['logo']
-        assert 'src_abs' not in info['logo']
+        self.assertNotIn('src', info['logo'])
+        self.assertNotIn('src_abs', info['logo'])
 
         # Test with a relative path to the logo image
         self.env.config.set('header_logo', 'src', 'foo.png')
@@ -204,8 +232,8 @@ class ChromeTestCase(unittest.TestCase):
         # No icon set in config, so no icon links
         self.env.config.set('project', 'icon', '')
         links = chrome.prepare_request(req)['links']
-        assert 'icon' not in links
-        assert 'shortcut icon' not in links
+        self.assertNotIn('icon', links)
+        self.assertNotIn('shortcut icon', links)
 
         # Relative URL for icon config option
         self.env.config.set('project', 'icon', 'foo.ico')
@@ -304,9 +332,60 @@ class ChromeTestCase(unittest.TestCase):
         self.assertEqual('test1', items[0]['name'])
         self.assertEqual('test2', items[1]['name'])
 
+    def test_add_jquery_ui_timezone_list_has_z(self):
+        chrome = Chrome(self.env)
+
+        req = Request(href=Href('/trac.cgi'), lc_time='iso8601')
+        chrome.add_jquery_ui(req)
+        self.assertIn({'value': 'Z', 'label': '+00:00'},
+                      req.chrome['script_data']['jquery_ui']['timezone_list'])
+
+        req = Request(href=Href('/trac.cgi'), lc_time=locale_en)
+        chrome.add_jquery_ui(req)
+        self.assertIn({'value': 'Z', 'label': '+00:00'},
+                      req.chrome['script_data']['jquery_ui']['timezone_list'])
+
+
+class ChromeTestCase2(unittest.TestCase):
+
+    def setUp(self):
+        self.env = EnvironmentStub(path=tempfile.mkdtemp())
+        self.chrome = Chrome(self.env)
+
+    def tearDown(self):
+        shutil.rmtree(self.env.path)
+
+    def test_malicious_filename_raises(self):
+        req = Request(path_info='/chrome/site/../conf/trac.ini')
+        self.assertTrue(self.chrome.match_request(req))
+        self.assertRaises(TracError, self.chrome.process_request, req)
+
+    def test_empty_shared_htdocs_dir_raises_file_not_found(self):
+        req = Request(path_info='/chrome/shared/trac_logo.png')
+        self.assertEqual('', self.chrome.shared_htdocs_dir)
+        self.assertTrue(self.chrome.match_request(req))
+        from trac.web.api import HTTPNotFound
+        self.assertRaises(HTTPNotFound, self.chrome.process_request, req)
+
+    def test_shared_htdocs_dir_file_is_found(self):
+        from trac.web.api import RequestDone
+        def send_file(path, mimetype):
+            raise RequestDone
+        req = Request(path_info='/chrome/shared/trac_logo.png',
+                      send_file=send_file)
+        shared_htdocs_dir = os.path.join(self.env.path, 'chrome', 'shared')
+        os.makedirs(shared_htdocs_dir)
+        create_file(os.path.join(shared_htdocs_dir, 'trac_logo.png'))
+        self.env.config.set('inherit', 'htdocs_dir', shared_htdocs_dir)
+        self.assertTrue(self.chrome.match_request(req))
+        self.assertRaises(RequestDone, self.chrome.process_request, req)
+
 
 def suite():
-    return unittest.makeSuite(ChromeTestCase, 'test')
+    suite = unittest.TestSuite()
+    suite.addTest(unittest.makeSuite(ChromeTestCase))
+    suite.addTest(unittest.makeSuite(ChromeTestCase2))
+    return suite
 
 if __name__ == '__main__':
     unittest.main(defaultTest='suite')

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/href.py
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/href.py?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/href.py (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/href.py Sat Nov 15 01:14:46 2014
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2005-2009 Edgewall Software
+# Copyright (C) 2005-2013 Edgewall Software
 # Copyright (C) 2005-2007 Christopher Lenz <cm...@gmx.de>
 # All rights reserved.
 #
@@ -15,6 +15,7 @@
 import doctest
 import unittest
 
+import trac.tests.compat
 import trac.web.href
 
 
@@ -36,9 +37,9 @@ class HrefTestCase(unittest.TestCase):
         self.assertEqual('/base/sub/other/', href('sub', 'other', ''))
         self.assertEqual('/base/with%20special%26chars',
                          href('with special&chars'))
-        assert href('page', param='value', other='other value', more=None) in [
+        self.assertIn(href('page', param='value', other='other value', more=None), [
             '/base/page?param=value&other=other+value',
-            '/base/page?other=other+value&param=value']
+            '/base/page?other=other+value&param=value'])
         self.assertEqual('/base/page?param=multiple&param=values',
                          href('page', param=['multiple', 'values']))
 
@@ -73,9 +74,10 @@ class HrefTestCase(unittest.TestCase):
         self.assertEqual('/sub/other/', href('sub', 'other', ''))
         self.assertEqual('/with%20special%26chars',
                          href('with special&chars'))
-        assert href('page', param='value', other='other value', more=None) in [
-            '/page?param=value&other=other+value',
-            '/page?other=other+value&param=value']
+        self.assertIn(
+            href('page', param='value', other='other value', more=None),
+            ['/page?param=value&other=other+value',
+             '/page?other=other+value&param=value'])
         self.assertEqual('/page?param=multiple&param=values',
                          href('page', param=['multiple', 'values']))
 
@@ -96,9 +98,9 @@ class HrefTestCase(unittest.TestCase):
                          href(param=MyList(['test', 'other'])))
         self.assertEqual('/base?param=test&param=other',
                          href(param=MyTuple(['test', 'other'])))
-        assert href(MyDict(param='value', other='other value')) in [
+        self.assertIn(href(MyDict(param='value', other='other value')), [
             '/base?param=value&other=other+value',
-            '/base?other=other+value&param=value']
+            '/base?other=other+value&param=value'])
         self.assertEqual('/base?param=value&other=other+value',
                          href(MyList([('param', 'value'), ('other', 'other value')])))
         self.assertEqual('/base?param=value&other=other+value',
@@ -108,7 +110,7 @@ class HrefTestCase(unittest.TestCase):
 def suite():
     suite = unittest.TestSuite()
     suite.addTest(doctest.DocTestSuite(trac.web.href))
-    suite.addTest(unittest.makeSuite(HrefTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(HrefTestCase))
     return suite
 
 if __name__ == '__main__':

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/main.py
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/main.py?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/main.py (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/main.py Sat Nov 15 01:14:46 2014
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2010 Edgewall Software
+# Copyright (C) 2010-2013 Edgewall Software
 # All rights reserved.
 #
 # This software is licensed as described in the file COPYING, which
@@ -11,12 +11,83 @@
 # individuals. For the exact contribution history, see the revision
 # history and logs, available at http://trac.edgewall.org/log/.
 
-from trac.util import create_file
-from trac.web.main import get_environments
-
+import os.path
 import tempfile
 import unittest
-import os.path
+
+from trac.core import Component, ComponentMeta, TracError, implements
+from trac.test import EnvironmentStub, Mock
+from trac.util import create_file
+from trac.web.auth import IAuthenticator
+from trac.web.main import RequestDispatcher, get_environments
+
+
+class AuthenticateTestCase(unittest.TestCase):
+
+    def setUp(self):
+        self.env = EnvironmentStub(disable=['trac.web.auth.LoginModule'])
+        self.request_dispatcher = RequestDispatcher(self.env)
+        self.req = Mock(chrome={'warnings': []})
+        # Make sure we have no external components hanging around in the
+        # component registry
+        self.old_registry = ComponentMeta._registry
+        ComponentMeta._registry = {}
+
+    def tearDown(self):
+        # Restore the original component registry
+        ComponentMeta._registry = self.old_registry
+
+    def test_authenticate_returns_first_successful(self):
+        class SuccessfulAuthenticator1(Component):
+            implements(IAuthenticator)
+            def authenticate(self, req):
+                return 'user1'
+        class SuccessfulAuthenticator2(Component):
+            implements(IAuthenticator)
+            def authenticate(self, req):
+                return 'user2'
+        self.assertEqual(2, len(self.request_dispatcher.authenticators))
+        self.assertIsInstance(self.request_dispatcher.authenticators[0],
+                              SuccessfulAuthenticator1)
+        self.assertIsInstance(self.request_dispatcher.authenticators[1],
+                              SuccessfulAuthenticator2)
+        self.assertEqual('user1',
+                         self.request_dispatcher.authenticate(self.req))
+
+    def test_authenticate_skips_unsuccessful(self):
+        class UnsuccessfulAuthenticator(Component):
+            implements(IAuthenticator)
+            def authenticate(self, req):
+                return None
+        class SuccessfulAuthenticator(Component):
+            implements(IAuthenticator)
+            def authenticate(self, req):
+                return 'user'
+        self.assertEqual(2, len(self.request_dispatcher.authenticators))
+        self.assertIsInstance(self.request_dispatcher.authenticators[0],
+                              UnsuccessfulAuthenticator)
+        self.assertIsInstance(self.request_dispatcher.authenticators[1],
+                              SuccessfulAuthenticator)
+        self.assertEqual('user',
+                         self.request_dispatcher.authenticate(self.req))
+
+    def test_authenticate_raises(self):
+        class RaisingAuthenticator(Component):
+            implements(IAuthenticator)
+            def authenticate(self, req):
+                raise TracError("Bad attempt")
+        class SuccessfulAuthenticator(Component):
+            implements(IAuthenticator)
+            def authenticate(self, req):
+                return 'user'
+        self.assertEqual(2, len(self.request_dispatcher.authenticators))
+        self.assertIsInstance(self.request_dispatcher.authenticators[0],
+                              RaisingAuthenticator)
+        self.assertIsInstance(self.request_dispatcher.authenticators[1],
+                              SuccessfulAuthenticator)
+        self.assertEqual('anonymous',
+                         self.request_dispatcher.authenticate(self.req))
+        self.assertEqual(1, len(self.req.chrome['warnings']))
 
 
 class EnvironmentsTestCase(unittest.TestCase):
@@ -51,32 +122,33 @@ class EnvironmentsTestCase(unittest.Test
                     for project in projects)
 
     def test_default_tracignore(self):
-        self.assertEquals(self.env_paths(['mydir1', 'mydir2']),
-                          get_environments(self.environ))
+        self.assertEqual(self.env_paths(['mydir1', 'mydir2']),
+                         get_environments(self.environ))
 
     def test_empty_tracignore(self):
         create_file(self.tracignore)
-        self.assertEquals(self.env_paths(['mydir1', 'mydir2', '.hidden_dir']),
-                          get_environments(self.environ))
+        self.assertEqual(self.env_paths(['mydir1', 'mydir2', '.hidden_dir']),
+                         get_environments(self.environ))
 
     def test_qmark_pattern_tracignore(self):
         create_file(self.tracignore, 'mydir?')
-        self.assertEquals(self.env_paths(['.hidden_dir']),
-                          get_environments(self.environ))
+        self.assertEqual(self.env_paths(['.hidden_dir']),
+                         get_environments(self.environ))
 
     def test_star_pattern_tracignore(self):
         create_file(self.tracignore, 'my*\n.hidden_dir')
-        self.assertEquals({}, get_environments(self.environ))
+        self.assertEqual({}, get_environments(self.environ))
 
     def test_combined_tracignore(self):
         create_file(self.tracignore, 'my*i?1\n\n#mydir2')
-        self.assertEquals(self.env_paths(['mydir2', '.hidden_dir']),
-                          get_environments(self.environ))
+        self.assertEqual(self.env_paths(['mydir2', '.hidden_dir']),
+                         get_environments(self.environ))
 
 
 def suite():
     suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(EnvironmentsTestCase, 'test'))
+    suite.addTest(unittest.makeSuite(AuthenticateTestCase))
+    suite.addTest(unittest.makeSuite(EnvironmentsTestCase))
     return suite
 
 

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/session.py
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/session.py?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/session.py (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/session.py Sat Nov 15 01:14:46 2014
@@ -1,3 +1,16 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2005-2013 Edgewall Software
+# All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://trac.edgewall.org/wiki/TracLicense.
+#
+# This software consists of voluntary contributions made by many
+# individuals. For the exact contribution history, see the revision
+# history and logs, available at http://trac.edgewall.org/log/.
+
 from __future__ import with_statement
 
 from Cookie import SimpleCookie as Cookie
@@ -5,6 +18,7 @@ import time
 from datetime import datetime
 import unittest
 
+import trac.tests.compat
 from trac.test import EnvironmentStub, Mock
 from trac.web.session import DetachedSession, Session, PURGE_AGE, \
                              UPDATE_INTERVAL, SessionAdmin
@@ -88,8 +102,8 @@ class SessionTestCase(unittest.TestCase)
         req = Mock(authname='anonymous', base_path='/', incookie=incookie,
                    outcookie=outcookie)
         session = Session(self.env, req)
-        self.assertEquals('123456', session.sid)
-        self.failIf(outcookie.has_key('trac_session'))
+        self.assertEqual('123456', session.sid)
+        self.assertNotIn('trac_session', outcookie)
 
     def test_authenticated_session(self):
         """
@@ -105,7 +119,7 @@ class SessionTestCase(unittest.TestCase)
         self.assertEqual('john', session.sid)
         session['foo'] = 'bar'
         session.save()
-        self.assertEquals(0, outcookie['trac_session']['expires'])
+        self.assertEqual(0, outcookie['trac_session']['expires'])
 
     def test_session_promotion(self):
         """
@@ -351,7 +365,7 @@ class SessionTestCase(unittest.TestCase)
         req = Mock(authname='anonymous', base_path='/', incookie=incookie,
                    outcookie=Cookie())
         session = Session(self.env, req)
-        self.assert_('foo' not in session)
+        self.assertTrue('foo' not in session)
         session['foo'] = 'baz'
         session.save()
 
@@ -572,8 +586,8 @@ class SessionTestCase(unittest.TestCase)
 
 
 def suite():
-    return unittest.makeSuite(SessionTestCase, 'test')
+    return unittest.makeSuite(SessionTestCase)
 
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest.main(defaultTest='suite')

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/wikisyntax.py
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/wikisyntax.py?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/wikisyntax.py (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/web/tests/wikisyntax.py Sat Nov 15 01:14:46 2014
@@ -1,3 +1,16 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2006-2013 Edgewall Software
+# All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://trac.edgewall.org/wiki/TracLicense.
+#
+# This software consists of voluntary contributions made by many
+# individuals. For the exact contribution history, see the revision
+# history and logs, available at http://trac.edgewall.org/log/.
+
 import unittest
 
 from trac.wiki.tests import formatter

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/web/wsgi.py
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/web/wsgi.py?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/web/wsgi.py (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/web/wsgi.py Sat Nov 15 01:14:46 2014
@@ -85,6 +85,7 @@ class WSGIGateway(object):
 
         self.headers_set = []
         self.headers_sent = []
+        self.use_chunked = False
 
     def run(self, application):
         """Start the gateway with the given WSGI application."""
@@ -98,8 +99,8 @@ class WSGIGateway(object):
                 for chunk in response:
                     if chunk:
                         self._write(chunk)
-                if not self.headers_sent:
-                    self._write('')
+                if not self.headers_sent or self.use_chunked:
+                    self._write('') # last chunk '\r\n0\r\n' if use_chunked
         finally:
             if hasattr(response, 'close'):
                 response.close()
@@ -193,9 +194,15 @@ class WSGIRequestHandler(BaseHTTPRequest
 
     def finish(self):
         """We need to help the garbage collector a little."""
-        BaseHTTPRequestHandler.finish(self)
-        self.wfile = None
-        self.rfile = None
+        try:
+            BaseHTTPRequestHandler.finish(self)
+        except (IOError, socket.error), e:
+            # ignore an exception if client disconnects
+            if e.args[0] not in (errno.EPIPE, errno.ECONNRESET, 10053, 10054):
+                raise
+        finally:
+            self.wfile = None
+            self.rfile = None
 
 
 class WSGIServerGateway(WSGIGateway):
@@ -212,12 +219,27 @@ class WSGIServerGateway(WSGIGateway):
 
         try:
             if not self.headers_sent:
+                # Worry at the last minute about Content-Length. If not
+                # yet set, use either chunked encoding or close connection
                 status, headers = self.headers_sent = self.headers_set
+                if any(n.lower() == 'content-length' for n, v in headers):
+                    self.use_chunked = False
+                else:
+                    self.use_chunked = (
+                        self.environ['SERVER_PROTOCOL'] >= 'HTTP/1.1' and
+                        self.handler.protocol_version >= 'HTTP/1.1')
+                    if self.use_chunked:
+                        headers.append(('Transfer-Encoding', 'chunked'))
+                    else:
+                        headers.append(('Connection', 'close'))
                 self.handler.send_response(int(status[:3]))
                 for name, value in headers:
                     self.handler.send_header(name, value)
                 self.handler.end_headers()
-            self.handler.wfile.write(data)
+            if self.use_chunked:
+                self.handler.wfile.write('%x\r\n%s\r\n' % (len(data), data))
+            else:
+                self.handler.wfile.write(data)
         except (IOError, socket.error), e:
             if e.args[0] in (errno.EPIPE, errno.ECONNRESET, 10053, 10054):
                 # client disconnect

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/__init__.py
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/__init__.py?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/__init__.py (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/__init__.py Sat Nov 15 01:14:46 2014
@@ -1,3 +1,16 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2005-2013 Edgewall Software
+# All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://trac.edgewall.com/license.html.
+#
+# This software consists of voluntary contributions made by many
+# individuals. For the exact contribution history, see the revision
+# history and logs, available at http://trac.edgewall.org/.
+
 from trac.wiki.api import *
 from trac.wiki.formatter import *
 from trac.wiki.intertrac import *

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/InterMapTxt
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/InterMapTxt?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/InterMapTxt (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/InterMapTxt Sat Nov 15 01:14:46 2014
@@ -38,22 +38,53 @@ Also note that !InterWiki prefixes are c
 == Prefix Definitions ==
 
 {{{
-PEP     http://www.python.org/peps/pep-$1.html    # Python Enhancement Proposal 
+PEP     http://www.python.org/dev/peps/pep-$1/    # Python Enhancement Proposal 
 PythonBug    http://bugs.python.org/issue$1       # Python Issue #$1
 Python-issue http://bugs.python.org/issue$1       # Python Issue #$1
 
 Trac-ML  http://thread.gmane.org/gmane.comp.version-control.subversion.trac.general/ # Message $1 in Trac Mailing List
 trac-dev http://thread.gmane.org/gmane.comp.version-control.subversion.trac.devel/   # Message $1 in Trac Development Mailing List
 
+apidoc http://www.edgewall.org/docs/trac-trunk/html/$1.html # $1 in the API documentation for Trac
+apiref http://www.edgewall.org/docs/trac-trunk/epydoc/$1.html # $1 in the Epydoc API reference for Trac
+
+bitten   http://bitten.edgewall.org/intertrac/    # Bitten's Trac
+
 Mercurial http://www.selenic.com/mercurial/wiki/index.cgi/ # the wiki for the Mercurial distributed SCM
+hg        http://www.selenic.com/hg/rev/$1?rev=$2          # Changeset $1 $2 in Mercurial repository
+hg-issue  http://mercurial.selenic.com/bts/issue           # Issue $1 in Mercurial BTS
 
 RFC       http://tools.ietf.org/html/rfc$1          # IETF's RFC $1
 ISO       http://en.wikipedia.org/wiki/ISO_         # ISO Standard $1 in Wikipedia
 kb        http://support.microsoft.com/kb/$1/en-us/ # Article $1 in Microsoft's Knowledge Base
 
+pypi        http://pypi.python.org/pypi/   # $1 package in the Python Package Index
+CheeseShop  http://pypi.python.org/pypi/           # $1 package in the Python Package Index
+peak        http://peak.telecommunity.com/DevCenter/     # $1 in Python Enterprise Application Kit's Wiki
+setuptools-issue http://bugs.python.org/setuptools/issue # issue$1 in legacy Setuptools tracker
+pypa-setuptools-issue https://bitbucket.org/pypa/setuptools/issue/ # issue #$1 in BitBucket Setuptools tracker
+
+SQLite      http://www.sqlite.org/cvstrac/wiki?p=$1     # $1 page in the CvsTrac for SQLite
+SQLiteTkt   http://www.sqlite.org/cvstrac/tktview?tn=$1 # Ticket $1 in the CvsTrac for SQLite
+
+mysql-bugs  http://bugs.mysql.com/bug.php?id=  # Bug #$1 in MySQL's bug database
+mysql-issue http://bugs.mysql.com/bug.php?id=  # Bug #$1 in MySQL's bug database
+
+MODPYTHON          http://issues.apache.org/jira/browse/MODPYTHON- # Issue $1 in mod_python's JIRA instance
+mod-python-issue   http://issues.apache.org/jira/browse/MODPYTHON- # Issue $1 in mod_python's JIRA instance
+
+SvnWiki     http://www.orcaware.com/svn/wiki/                        # Subversion Wiki
+svnissue    http://subversion.tigris.org/issues/show_bug.cgi?id=     # Subversion issue #$1
+svn-issue   http://subversion.tigris.org/issues/show_bug.cgi?id=     # Subversion issue #$1
+svncset     http://svn.collab.net/viewvc/svn?view=revision&revision= # Subversion [$1]
+
+mod-wsgi    http://code.google.com/p/modwsgi/wiki/                 # mod_wsgi Wiki on Google Code
+mod-wsgi-issue  http://code.google.com/p/modwsgi/issues/detail?id= # mod_wsgi Issue Tracker on Google Code
+
 chromium-issue  http://code.google.com/p/chromium/issues/detail?id=
 
 Django      http://code.djangoproject.com/intertrac/ # Django's Trac
+AgileTrac   http://www.agile-trac.org/intertrac/     # Plugin adding Iterations to Trac
 
 CreoleWiki   http://wikicreole.org/wiki/
 Creole1Wiki  http://wikicreole.org/wiki/

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/InterTrac
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/InterTrac?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/InterTrac (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/InterTrac Sat Nov 15 01:14:46 2014
@@ -42,8 +42,7 @@ It is necessary to setup a configuration
 This configuration has to be done in the TracIni file, `[intertrac]` section.
 
 Example configuration:
-{{{
-...
+{{{#!ini
 [intertrac]
 # -- Example of setting up an alias:
 t = trac
@@ -66,7 +65,7 @@ a ''compatibility'' mode:
    ([trac:r3526 r3526] to be precise), then it doesn't know how to dispatch an InterTrac 
    link, and it's up to the local Trac to prepare the correct link. 
    Not all links will work that way, but the most common do. 
-   This is called the compatibility mode, and is `true` by default. 
+   This is called the compatibility mode, and is `false` by default. 
  * If you know that the remote Trac knows how to dispatch InterTrac links, 
    you can explicitly disable this compatibility mode and then ''any'' 
    TracLinks can become an InterTrac link.

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/PageTemplates
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/PageTemplates?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/PageTemplates (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/PageTemplates Sat Nov 15 01:14:46 2014
@@ -1,6 +1,6 @@
 = Wiki Page Templates = 
 
-  ''(since [http://trac.edgewall.org/milestone/0.11 0.11])''
+  ''(since [trac:milestone:0.11 0.11])''
 
 The default content for a new wiki page can be chosen from a list of page templates. 
 

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracAccessibility
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracAccessibility?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracAccessibility (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracAccessibility Sat Nov 15 01:14:46 2014
@@ -4,9 +4,9 @@ Not every user has a graphic environment
 
 The keyboard shortcuts must be enabled for a session through the [/prefs/keybindings Keyboard Shortcuts] preferences panel.
 
-Trac supports accessibility keys for the most common operations.
+Trac supports accessibility keys for the most common operations. The access keys differ by browser and the following work for several browsers, but see [http://en.wikipedia.org/wiki/Access_key#Access_in_different_browsers access in different browsers] for more details.
  - on Linux platforms, press any of the keys listed below in combination with the `<Alt>` key 
- - on a Mac, use the `<ctrl>` key instead
+ - on a Mac, use the `<Ctrl>` + `<Opt>` key instead
  - on Windows, you need to hit `<Shift> + <Alt> + <Key>`. This works for most browsers (Firefox, Chrome, Safari and Internet Explorer)
 
 == Global Access Keys ==

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracAdmin
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracAdmin?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracAdmin (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracAdmin Sat Nov 15 01:14:46 2014
@@ -32,7 +32,7 @@ This subcommand is very important as it'
 
 [[TracAdminHelp(initenv)]]
 
-It supports an extra `--inherit` option, which can be used to specify a global configuration file which can be used share settings between several environments. You can also inherit from a shared configuration afterwards, by setting the `[inherit] file` option in the `conf/trac.ini` file in your newly created environment, but the advantage of specifying the inherited configuration file at environment creation time is that only the options ''not'' already specified in the global configuration file will be written in the created environment's `conf/trac.ini` file.
+It supports an extra `--inherit` option, which can be used to specify a global configuration file which can be used to share settings between several environments. You can also inherit from a shared configuration afterwards, by setting the `[inherit] file` option in the `conf/trac.ini` file in your newly created environment, but the advantage of specifying the inherited configuration file at environment creation time is that only the options ''not'' already specified in the global configuration file will be written in the created environment's `conf/trac.ini` file.
 See TracIni#GlobalConfiguration.
 
 Note that in version 0.11 of Trac, `initenv` lost an extra last argument `<templatepath>`, which was used in previous versions to point to the `templates` folder. If you are using the one-liner '`trac-admin /path/to/trac/ initenv <projectname> <db> <repostype> <repospath>`' in the above and getting an error that reads ''''`Wrong number of arguments to initenv: 4`'''', then this is because you're using a `trac-admin` script from an '''older''' version of Trac.

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBackup
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBackup?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBackup (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBackup Sat Nov 15 01:14:46 2014
@@ -8,17 +8,15 @@ Since Trac uses a database backend, some
 == Creating a Backup ==
 
 To create a backup of a live TracEnvironment, simply run:
-{{{
-
-  $ trac-admin /path/to/projenv hotcopy /path/to/backupdir
-
+ {{{#!sh
+$ trac-admin /path/to/projenv hotcopy /path/to/backupdir
 }}}
 
 [wiki:TracAdmin trac-admin] will lock the database while copying.''
 
 The resulting backup directory is safe to handle using standard file-based backup tools like `tar` or `dump`/`restore`.
 
-Please, note, that hotcopy command does not overwrite target directory and when such exists, hotcopy ends with error: `Command failed: [Errno 17] File exists:` This is discussed in [trac:ticket:3198 #3198].
+Please note, the `hotcopy` command will not overwrite a target directory and when such exists the operation ends with error: `Command failed: [Errno 17] File exists:` This is discussed in [trac:ticket:3198 #3198].
 
 === Restoring a Backup ===
 

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBatchModify
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBatchModify?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBatchModify (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBatchModify Sat Nov 15 01:14:46 2014
@@ -1,10 +1,14 @@
 = Trac Ticket Batch Modification =
 [[TracGuideToc]]
 
-From [wiki:TracQuery custom query] results Trac provides support for modifying a batch of tickets in one request.
+From [TracQuery custom query] results Trac provides support for modifying a batch of tickets in one request.
 
 To perform a batch modification select the tickets you wish to modify and set the new field values using the section underneath the query results. 
 
 == List fields
 
 The `Keywords` and `Cc` fields are treated as lists, where list items can be added and/or removed in addition of replacing the entire list value. All list field controls accept multiple items (i.e. multiple keywords or cc addresses).
+
+== Excluded fields
+
+Multi-line text fields are not supported, because no valid use-case has been presented for syncing them across several tickets. That restriction applies to the `Description` field as well as to any [TracTicketsCustomFields#AvailableFieldTypesandOptions custom field] of type 'textarea'. However in conjunction with more suitable actions like 'prepend', 'append' or search & replace ([http://trac-hacks.org/ticket/2415 th:#2415]) this could change in future Trac versions.
\ No newline at end of file

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBrowser
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBrowser?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBrowser (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracBrowser Sat Nov 15 01:14:46 2014
@@ -52,20 +52,15 @@ for more advanced cases.
 If you're using a Javascript enabled browser, you'll be able to expand and 
 collapse directories in-place by clicking on the arrow head at the right side of a 
 directory. Alternatively, the [trac:TracKeys keyboard] can also be used for this: 
- - use `'j'` and `'k'` to select the next or previous entry, starting with the first
- - `'o'` (open) to toggle between expanded and collapsed state of the selected 
+ - use `j` and `k` to select the next or previous entry, starting with the first
+ - `o` ('''o'''pen) to toggle between expanded and collapsed state of the selected 
    directory or for visiting the selected file 
- - `'v'` (view, visit) and `'<Enter>'`, same as above
- - `'r'` can be used to force the reload of an already expanded directory
- - `'A'` can be used to directly visit a file in annotate (blame) mode
- - `'L'` to view the log for the selected entry
-If no row has been selected using `'j'` or `'k'` these keys will operate on the entry under the mouse.
+ - `v` ('''v'''iew, '''v'''isit) and `<Enter>`, same as above
+ - `r` can be used to force the '''r'''eload of an already expanded directory
+ - `a` can be used to directly visit a file in '''a'''nnotate (blame) mode
+ - `l` to view the '''l'''og for the selected entry
+If no row has been selected using `j` or `k` these keys will operate on the entry under the mouse.
 
-{{{#!comment
-MMM: I guess that some keys are upper case and some lower to avoid conflicts with browser defined keys.
-I find for example in Firefox and IE on windows that 'a' works as well as 'A' but 'l' does not work for 'L'.
- cboos: 'l' is reserved for Vim like behavior, see #7867
-}}}
 
 For the Subversion backend, some advanced additional features are available:
  - The `svn:needs-lock` property will be displayed

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracCgi
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracCgi?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracCgi (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracCgi Sat Nov 15 01:14:46 2014
@@ -1,39 +1,38 @@
-= Installing Trac as CGI =
+= Installing Trac as CGI
 
-{{{
-#!div class=important
+{{{#!div class=important
   ''Please note that using Trac via CGI is the slowest deployment method available. It is slower than [TracModPython mod_python], [TracFastCgi FastCGI] and even [trac:TracOnWindowsIisAjp IIS/AJP] on Windows.''
 }}}
 
 CGI script is the entrypoint that web-server calls when a web-request to an application is made. To generate the `trac.cgi` script run:
-{{{
+{{{#!sh
 trac-admin /path/to/env deploy /path/to/www/trac
 }}}
 `trac.cgi` will be in the `cgi-bin` folder inside the given path. ''Make sure it is executable by your web server''. This command also copies `static resource` files to a `htdocs` directory of a given destination.
 
-== Apache web-server configuration ==
+== Apache web-server configuration
 
 In [http://httpd.apache.org/ Apache] there are two ways to run Trac as CGI:
 
  1. Use a `ScriptAlias` directive that maps an URL to the `trac.cgi` script (recommended)
- 2. Copy the `trac.cgi` file into the directory for CGI executables used by your web server (commonly named `cgi-bin`). You can also create a symbolic link, but in that case make sure that the `FollowSymLinks` option is enabled for the `cgi-bin` directory.
+ 1. Copy the `trac.cgi` file into the directory for CGI executables used by your web server (commonly named `cgi-bin`). You can also create a symbolic link, but in that case make sure that the `FollowSymLinks` option is enabled for the `cgi-bin` directory.
 
 To make Trac available at `http://yourhost.example.org/trac` add `ScriptAlias` directive to Apache configuration file, changing `trac.cgi` path to match your installation:
-{{{
+{{{#!sh
 ScriptAlias /trac /path/to/www/trac/cgi-bin/trac.cgi
 }}}
 
  ''Note that this directive requires enabled `mod_alias` module.''
 
 If you're using Trac with a single project you need to set its location using the `TRAC_ENV` environment variable:
-{{{
+{{{#!apache
 <Location "/trac">
   SetEnv TRAC_ENV "/path/to/projectenv"
 </Location>
 }}}
 
 Or to use multiple projects you can specify their common parent directory using the `TRAC_ENV_PARENT_DIR` variable:
-{{{
+{{{#!apache
 <Location "/trac">
   SetEnv TRAC_ENV_PARENT_DIR "/path/to/project/parent/dir"
 </Location>
@@ -41,31 +40,31 @@ Or to use multiple projects you can spec
 
  ''Note that the `SetEnv` directive requires enabled `mod_env` module. It is also possible to set TRAC_ENV in trac.cgi. Just add the following code between "try:" and "from trac.web ...":''
 
-{{{
+{{{#!python
     import os
     os.environ['TRAC_ENV'] = "/path/to/projectenv"
 }}}
 
  '' Or for TRAC_ENV_PARENT_DIR: ''
 
-{{{
+{{{#!python
     import os
     os.environ['TRAC_ENV_PARENT_DIR'] = "/path/to/project/parent/dir"
 }}}
 
-If you are using the [http://httpd.apache.org/docs/suexec.html Apache suEXEC] feature please see [http://trac.edgewall.org/wiki/ApacheSuexec].
+If you are using the [http://httpd.apache.org/docs/suexec.html Apache suEXEC] feature please see [trac:ApacheSuexec].
 
 On some systems, you ''may'' need to edit the shebang line in the `trac.cgi` file to point to your real Python installation path. On a Windows system you may need to configure Windows to know how to execute a .cgi file (Explorer -> Tools -> Folder Options -> File Types -> CGI).
 
-=== Using WSGI ===
+=== Using WSGI
 
 You can run a [http://henry.precheur.org/python/how_to_serve_cgi WSGI handler] [http://pythonweb.org/projects/webmodules/doc/0.5.3/html_multipage/lib/example-webserver-web-wsgi-simple-cgi.html under CGI].  You can [wiki:TracModWSGI#Thetrac.wsgiscript write your own application function], or use the deployed trac.wsgi's application.
 
-== Mapping Static Resources ==
+== Mapping Static Resources
 
 See TracInstall#MappingStaticResources.
 
-== Adding Authentication ==
+== Adding Authentication
 
 See TracInstall#ConfiguringAuthentication.
 

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracEnvironment
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracEnvironment?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracEnvironment (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracEnvironment Sat Nov 15 01:14:46 2014
@@ -13,6 +13,9 @@ $ trac-admin /path/to/myproject initenv
 database connection string (explained below).
 
 === Some Useful Tips
+
+ - Place your environment's directory on a filesystem which supports sub-second timestamps, as Trac monitors the timestamp of its configuration files and changes happening on a filesystem with too coarse-grained timestamp resolution may go undetected in Trac < 1.0.2 (this is also true for the location of authentication files when using TracStandalone).
+
  - The user under which the web server runs will require file system write permission to 
  the environment directory and all the files inside. Please remember to set
  the appropriate permissions. The same applies to the source code repository, 
@@ -35,6 +38,8 @@ to use SQLite, which is probably suffici
 file is then stored in the environment directory, and can easily be 
 [wiki:TracBackup backed up] together with the rest of the environment.
 
+Note that if the username or password of the connection string (if applicable) contains the `:`, `/` or `@` characters, they need to be URL encoded.
+
 === SQLite Connection String ===
 The connection string for an SQLite database is:
 {{{
@@ -50,7 +55,6 @@ user `johndoe` with the password `letmei
 {{{
 postgres://johndoe:letmein@localhost/trac
 }}}
-''Note that due to the way the above string is parsed, the "/" and "@" characters cannot be part of the password.''
 
 If PostgreSQL is running on a non-standard port (for example 9342), use:
 {{{
@@ -91,9 +95,8 @@ postgres://user:pass@server/database?sch
 
 === MySQL Connection String ===
 
-If you want to use MySQL instead, you'll have to use a
-different connection string. For example, to connect to a MySQL
-database on the same machine called `trac`, that allows access to the
+The format of the MySQL connection string is similar to the examples presented for PostgreSQL, with the `postgres` schema being replaced by `mysql`. For example, to connect to a MySQL
+database on the same machine called `trac`, allowing access to the
 user `johndoe` with the password `letmein`, the mysql connection string is:
 {{{
 mysql://johndoe:letmein@localhost:3306/trac
@@ -153,4 +156,4 @@ It happens that the structure for a Trac
 structure, but those are two disjoint entities and they are not and ''must not'' be located at the same place.
 
 ----
-See also: TracAdmin, TracBackup, TracIni, TracGuide
+See also: TracAdmin, TracBackup, TracIni, TracGuide
\ No newline at end of file

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracFastCgi
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracFastCgi?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracFastCgi (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracFastCgi Sat Nov 15 01:14:46 2014
@@ -370,7 +370,7 @@ http://yourdomain.com/trac/
 Nginx is able to communicate with FastCGI processes, but can not spawn them. So you need to start FastCGI server for Trac separately.
 
  1. Nginx configuration with basic authentication handled by Nginx - confirmed to work on 0.6.32
-{{{
+ {{{
     server {
         listen       10.9.8.7:443;
         server_name  trac.example;
@@ -414,7 +414,7 @@ Nginx is able to communicate with FastCG
             # WSGI application name - trac instance prefix.
 	    # (Or ``fastcgi_param  SCRIPT_NAME  /some/prefix``.)
             fastcgi_param  SCRIPT_NAME        "";
-            fastcgi_param  PATH_INFO          $path_info;
+            fastcgi_param  PATH_INFO           $fastcgi_script_name;
 
             ## WSGI NEEDED VARIABLES - trac warns about them
             fastcgi_param  REQUEST_METHOD     $request_method;
@@ -437,10 +437,8 @@ Nginx is able to communicate with FastCG
         }
     }
 }}}
-
- 2. Modified trac.fcgi:
-
-{{{
+ 1. Modified trac.fcgi:
+ {{{
 #!/usr/bin/env python
 import os
 sockaddr = '/home/trac/run/instance.sock'
@@ -471,10 +469,8 @@ except Exception, e:
     print tb.getvalue()
 
 }}}
-
- 3. reload nginx and launch trac.fcgi like that:
-
-{{{
+ 1. reload nginx and launch trac.fcgi like that: 
+ {{{#!sh
 trac@trac.example ~ $ ./trac-standalone-fcgi.py 
 }}}
 

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracFineGrainedPermissions
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracFineGrainedPermissions?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracFineGrainedPermissions (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracFineGrainedPermissions Sat Nov 15 01:14:46 2014
@@ -16,9 +16,9 @@ Which policies are currently active is d
 e.g.
 {{{
 [trac]
-permission_policies = AuthzSourcePolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy
+permission_policies = ReadonlyWikiPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy
 }}}
-This lists the [#AuthzSourcePolicy] described below as the first policy, followed by the !DefaultPermissionPolicy which checks for the traditional coarse grained style permissions described in TracPermissions, and the !LegacyAttachmentPolicy which knows how to use the coarse grained permissions for checking the permissions available on attachments.
+This lists the [#ReadonlyWikiPolicy] which controls readonly access to wiki pages, followed by the !DefaultPermissionPolicy which checks for the traditional coarse grained style permissions described in TracPermissions, and the !LegacyAttachmentPolicy which knows how to use the coarse grained permissions for checking the permissions available on attachments.
 
 Among the possible optional choices, there is [#AuthzPolicy], a very generic permission policy, based on an Authz-style system. See
 [trac:source:branches/0.12-stable/tracopt/perm/authz_policy.py authz_policy.py] for details. 
@@ -30,15 +30,15 @@ See also [trac:source:branches/0.12-stab
 
 === !AuthzPolicy === 
 ==== Configuration ====
-* Install [http://www.voidspace.org.uk/python/configobj.html ConfigObj] (still needed for 0.12).
-* Copy authz_policy.py into your plugins directory (only for Trac 0.11).
+* Install [http://www.voidspace.org.uk/python/configobj.html ConfigObj] (still needed for 0.12 and later).
+* Copy [browser:/trunk/tracopt/perm/authz_policy.py /tracopt/perm/authz_policy.py] to your environment's plugins directory (only for Trac 0.11).
 * Put a [http://swapoff.org/files/authzpolicy.conf authzpolicy.conf] file somewhere, preferably on a secured location on the server, not readable for others than the webuser. If the  file contains non-ASCII characters, the UTF-8 encoding should be used.
 * Update your `trac.ini`:
   1. modify the [TracIni#trac-section permission_policies] entry in the `[trac]` section
 {{{
 [trac]
 ...
-permission_policies = AuthzPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy
+permission_policies = AuthzPolicy, ReadonlyWikiPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy
 }}}
   1. add a new `[authz_policy]` section
 {{{
@@ -90,14 +90,14 @@ jack = WIKI_VIEW
 [wiki:WikiStart]
 }}}
 
-  Example: Match the attachment `wiki:WikiStart@117/attachment/FOO.JPG@*`
+  Example: Match the attachment `wiki:WikiStart@117/attachment:FOO.JPG@*`
   on WikiStart
 {{{
 [wiki:*]
 [wiki:WikiStart*]
 [wiki:WikiStart@*]
-[wiki:WikiStart@*/attachment/*]
-[wiki:WikiStart@117/attachment/FOO.JPG]
+[wiki:WikiStart@*/attachment:*]
+[wiki:WikiStart@117/attachment:FOO.JPG]
 }}}
 
 * Sections are checked against the current Trac resource descriptor '''IN ORDER''' of
@@ -160,10 +160,15 @@ Some repository examples (Browse Source 
 john = BROWSER_VIEW, FILE_VIEW
 # John has BROWSER_VIEW and FILE_VIEW for the entire test_repo
 
+# The default repository (requires Trac 1.0.2 or later):
+[repository:@*]
+john = BROWSER_VIEW, FILE_VIEW
+# John has BROWSER_VIEW and FILE_VIEW for the entire default repository
+
 # All repositories:
 [repository:*@*]
 jack = BROWSER_VIEW, FILE_VIEW
-# John has BROWSER_VIEW and FILE_VIEW for all repositories
+# Jack has BROWSER_VIEW and FILE_VIEW for all repositories
 }}}
 
 Very fine grain repository access:
@@ -271,7 +276,7 @@ As of version 0.12, make sure you have '
 
 {{{ 
 [trac]
-permission_policies = AuthzSourcePolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy
+permission_policies = AuthzSourcePolicy, ReadonlyWikiPolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy
 }}}
 
 ==== Subversion Configuration ====
@@ -289,6 +294,35 @@ The same access file is typically applie
 
 For information about how to restrict access to entire projects in a multiple project environment see [trac:wiki:TracMultipleProjectsSVNAccess]
 
+=== ReadonlyWikiPolicy
+
+Since 1.1.2, the read-only attribute of wiki pages is enabled and enforced when `ReadonlyWikiPolicy` is in the list of active permission policies. The default for new Trac installations in 1.1.2 and later is:
+{{{
+[trac]
+permission_policies = ReadonlyWikiPolicy,
+ DefaultPermissionPolicy,
+ LegacyAttachmentPolicy
+}}}
+
+When upgrading from earlier versions of Trac, `ReadonlyWikiPolicy` will be appended to the list of `permission_policies` when upgrading the environment, provided that `permission_policies` has the default value. If any non-default `permission_polices` are active, `ReadonlyWikiPolicy` **will need to be manually added** to the list. A message will be echoed to the console when upgrading the environment, indicating if any action needs to be taken.
+
+**!ReadonlyWikiPolicy must be listed //before// !DefaultPermissionPolicy**. The latter returns `True` to allow modify, delete or rename actions when the user has the respective `WIKI_*` permission, without consideration for the read-only attribute.
+
+The `ReadonlyWikiPolicy` returns `False` to deny modify, delete and rename actions on wiki pages when the page has the read-only attribute set and the user does not have `WIKI_ADMIN`, regardless of `WIKI_MODIFY`, `WIKI_DELETE` and `WIKI_RENAME` permissions. It returns `None` for all other cases.
+
+When active, the [#AuthzPolicy] should therefore come before `ReadonlyWikiPolicy`, allowing it to grant or deny the actions on individual resources, which is the usual ordering for `AuthzPolicy` in the `permission_policies` list.
+{{{
+[trac]
+permission_policies = AuthzPolicy,
+ ReadonlyWikiPolicy,
+ DefaultPermissionPolicy,
+ LegacyAttachmentPolicy
+}}}
+
+The placement of [#AuthzSourcePolicy] relative to `ReadonlyWikiPolicy` does not matter since they don't perform checks on the same realms.
+
+For all other permission policies, the user will need to decide the proper ordering. Generally, if the permission policy should be capable of overriding the check performed by `ReadonlyWikiPolicy`, it should come before `ReadonlyWikiPolicy` in the list. If the `ReadonlyWikiPolicy` should override the check performed by another permission policy, as is the case for `DefaultPermissionPolicy`, then `ReadonlyWikiPolicy` should come first.
+
 == Debugging permissions
 In trac.ini set:
 {{{
@@ -305,7 +339,6 @@ tail -n 0 -f log/trac.log | egrep '\[per
 
 to understand what checks are being performed. See the sourced documentation of the plugin for more info.
 
-
 ----
 See also: TracPermissions,
 [http://trac-hacks.org/wiki/FineGrainedPageAuthzEditorPlugin TracHacks:FineGrainedPageAuthzEditorPlugin] for a simple editor plugin.
\ No newline at end of file

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracGuide
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracGuide?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracGuide (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracGuide Sat Nov 15 01:14:46 2014
@@ -60,4 +60,4 @@ Trac allows wiki markup in issue descrip
  * [trac:TracDev] and [trac:TracDev/ApiDocs API docs] — Trac Developer documentation
  * TracSupport — How to get more information
 
-If you are looking for a good place to ask a question about Trac, look no further than the [http://trac.edgewall.org/wiki/MailingList MailingList]. It provides a friendly environment to discuss openly among Trac users and developers.
+If you are looking for a good place to ask a question about Trac, look no further than the [trac:MailingList MailingList]. It provides a friendly environment to discuss openly among Trac users and developers.

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracImport
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracImport?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracImport (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracImport Sat Nov 15 01:14:46 2014
@@ -18,7 +18,7 @@ Below, follows a collection of some of t
 
  [http://trac-hacks.org/wiki/BugzillaIssueTrackingPlugin BugzillaIssueTrackingPlugin] :: integrates Bugzilla into Trac keeping TracLinks
 
-Ticket data can be imported from Bugzilla using the [http://trac.edgewall.org/browser/trunk/contrib/bugzilla2trac.py bugzilla2trac.py] script, available in the contrib/ directory of the Trac distribution.
+Ticket data can be imported from Bugzilla using the [trac:browser:trunk/contrib/bugzilla2trac.py bugzilla2trac.py] script, available in the contrib/ directory of the Trac distribution.
 
 {{{
 $ bugzilla2trac.py
@@ -83,14 +83,14 @@ For more details on the available option
 
  [http://trac-hacks.org/wiki/SfnToTracScript SfnToTracScript] :: importer of !SourceForge's new backup file (originated from #Trac3521)
 
-Also, ticket data can be imported from Sourceforge using the [http://trac.edgewall.org/browser/trunk/contrib/sourceforge2trac.py sourceforge2trac.py] script, available in the contrib/ directory of the Trac distribution.
+Also, ticket data can be imported from Sourceforge using the [trac:browser:trunk/contrib/sourceforge2trac.py sourceforge2trac.py] script, available in the contrib/ directory of the Trac distribution.
 
 == Other ==
 
 Since trac uses a SQL database to store the data, you can import from other systems by examining the database tables. Just go into [http://www.sqlite.org/sqlite.html sqlite] command line to look at the tables and import into them from your application.
 
 === Comma delimited file - CSV ===
-See [http://trac.edgewall.org/attachment/wiki/TracSynchronize/csv2trac.2.py csv2trac.2.py] for details.  This approach is particularly useful if one needs to enter a large number of tickets by hand. (note that the ticket type type field, (task etc...) is also needed for this script to work with more recent Trac releases)
+See [trac:attachment:csv2trac.2.py:wiki:TracSynchronize csv2trac.2.py] for details.  This approach is particularly useful if one needs to enter a large number of tickets by hand. (note that the ticket type type field, (task etc...) is also needed for this script to work with more recent Trac releases)
 Comments on script: The script has an error on line 168, ('Ticket' needs to be 'ticket').  Also, the listed values for severity and priority are swapped. 
 
 ----

Modified: bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracIni
URL: http://svn.apache.org/viewvc/bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracIni?rev=1639823&r1=1639822&r2=1639823&view=diff
==============================================================================
--- bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracIni (original)
+++ bloodhound/branches/trac-1.0.2-integration/trac/trac/wiki/default-pages/TracIni Sat Nov 15 01:14:46 2014
@@ -11,7 +11,7 @@ The `trac.ini` configuration file and it
 
 == Global Configuration ==
 
-In versions prior to 0.11, the global configuration was by default located in `$prefix/share/trac/conf/trac.ini` or /etc/trac/trac.ini, depending on the distribution. If you're upgrading, you may want to specify that file to inherit from.  Literally, when you're upgrading to 0.11, you have to add an `[inherit]` section to your project's `trac.ini` file. Additionally, you have to move your customized templates and common images from `$prefix/share/trac/...` to the new location.
+In versions prior to 0.11, the global configuration was by default located in `$prefix/share/trac/conf/trac.ini` or `/etc/trac/trac.ini`, depending on the distribution. If you're upgrading, you may want to specify that file to inherit from.  Literally, when you're upgrading to 0.11, you have to add an `[inherit]` section to your project's `trac.ini` file. Additionally, you have to move your customized templates and common images from `$prefix/share/trac/...` to the new location.
 
 Global options will be merged with the environment-specific options, where local options override global options. The options file is specified as follows:
 {{{
@@ -30,7 +30,21 @@ Note that the templates found in the `te
 
 This is a brief reference of available configuration options, and their default settings.
 
+ ''Note that the [hg], [spam-filter], [translatedpages], [vote], [wikiextras] and [wikiextras-symbols] sections below are added by plugins enabled on this Trac, and therefore won't be part of a default installation.''
+
+{{{ 
+#!comment 
+Suggest your documentation fixes in the Discussion section at  
+the bottom of the page, or better send us patches against 
+the corresponding docstrings you'll find in the code!
+
+Please don't waste your time by editing the HTML code below, changes won't be picked up. 
+}}}
 [[TracIni]]
 
+== Discussion == 
+''Please discuss documentation changes here. Even better, send us documentation patches against the code, either on Trac-dev or on new tickets.'' 
+
+
 ----
 See also: TracGuide, TracAdmin, TracEnvironment