You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/01/06 16:17:51 UTC

[01/50] git commit: [#4812] Style tweaks

Updated Branches:
  refs/heads/cj/6992 a57573c90 -> d2baf30fc (forced update)


[#4812] Style tweaks

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/7bea0768
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7bea0768
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7bea0768

Branch: refs/heads/cj/6992
Commit: 7bea0768fa3fc5fd33c26b0b08d5178d2b8eec32
Parents: f21c43e
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Wed Jan 1 05:35:14 2014 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Wed Jan 1 05:35:37 2014 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/templates/tracker/new_ticket.html | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7bea0768/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/new_ticket.html b/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
index 4af4b6f..dd9f5e9 100644
--- a/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
@@ -38,12 +38,13 @@
   }
 
   .new-ticket-title {
-    top: 5px;
+    top: 7px;
     position: absolute;
     z-index: 21;
   }
   .new-ticket-title label {
-    color: #ffffff;
+    color: #ffffff !important;
+    padding-right: 10px;
   }
 </style>
 {% endblock %}


[23/50] git commit: [#6388] wrapper script to run call_counts.py for a range of git commits

Posted by jo...@apache.org.
[#6388] wrapper script to run call_counts.py for a range of git commits


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/15225cd8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/15225cd8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/15225cd8

Branch: refs/heads/cj/6992
Commit: 15225cd831b0baa70ee11256061fc4dda7773780
Parents: 78c0364
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri Dec 20 19:02:51 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:21 2014 +0000

----------------------------------------------------------------------
 scripts/perf/call_count_walk_git.sh | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/15225cd8/scripts/perf/call_count_walk_git.sh
----------------------------------------------------------------------
diff --git a/scripts/perf/call_count_walk_git.sh b/scripts/perf/call_count_walk_git.sh
new file mode 100755
index 0000000..8bb41ba
--- /dev/null
+++ b/scripts/perf/call_count_walk_git.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+if [[ $@ ]]
+then
+    revs=$@
+else
+    revs='HEAD -n 10'
+    echo "No git revision range given, using $revs"
+    echo "Other range formats like bdde98d..HEAD work too"
+    echo
+fi
+
+current=`git rev-parse --abbrev-ref HEAD`
+git rev-list --reverse $revs --oneline | while read commit
+do
+    echo $commit
+    sha=${commit:0:7}
+    git checkout -q $sha || { echo "Could not check out $sha, stopping.  You started on $current"; break; }
+    ./call_count.py --id "$commit"
+done
+git checkout -q $current
\ No newline at end of file


[21/50] git commit: [#6388] remove unnecessary wiki page lookup from sidebar (last needed in baa85e8)

Posted by jo...@apache.org.
[#6388] remove unnecessary wiki page lookup from sidebar (last needed in baa85e8)


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/84d6afcc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/84d6afcc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/84d6afcc

Branch: refs/heads/cj/6992
Commit: 84d6afcc2991000dd9369d7d02ac7b7ef688aa5c
Parents: cdb91d5
Author: Dave Brondsema <da...@brondsema.net>
Authored: Fri Dec 20 14:22:32 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:21 2014 +0000

----------------------------------------------------------------------
 ForgeWiki/forgewiki/wiki_main.py | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/84d6afcc/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 55ee9a3..e2112b6 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -228,12 +228,6 @@ class ForgeWikiApp(Application):
 
     @h.exceptionless([], log)
     def sidebar_menu(self):
-        try:
-            page = request.path_info.split(self.url)[-1].split('/')[-2]
-            page = h.really_unicode(page)
-            page = WM.Page.query.find(dict(app_config_id=self.config._id, title=page, deleted=False)).first()
-        except:
-            page = None
         return self.create_common_wiki_menu(has_access(self, 'create'),c.app.url,'add_wiki_page')
 
     def install(self, project):


[32/50] git commit: [#5424] specify syntax highlighting

Posted by jo...@apache.org.
[#5424] specify syntax highlighting


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e0e9df27
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e0e9df27
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e0e9df27

Branch: refs/heads/cj/6992
Commit: e0e9df274d24c72157da7b31f7b2f252c1f638ee
Parents: de9c818
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri Dec 13 16:06:14 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:34 2014 +0000

----------------------------------------------------------------------
 Allura/docs/administration.rst | 10 +++--
 Allura/docs/extending.rst      |  4 +-
 Allura/docs/installation.rst   | 32 +++++++++------
 Allura/docs/scm_host.rst       | 77 ++++++++++++++++++++++++++++---------
 4 files changed, 90 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e0e9df27/Allura/docs/administration.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/administration.rst b/Allura/docs/administration.rst
index 303d778..b4f69f5 100644
--- a/Allura/docs/administration.rst
+++ b/Allura/docs/administration.rst
@@ -70,9 +70,11 @@ from an Allura server.  They do require various python packages to be installed
 and possibly a local Allura codebase set up.
 
 One such script is `wiki-copy.py` which reads the wiki pages from one Allura wiki
-instance and uploads them to another Allura wiki instance.  It can be run as::
+instance and uploads them to another Allura wiki instance.  It can be run as:
 
-$ python scripts/wiki-copy.py --help
+.. code-block:: console
+
+    $ python scripts/wiki-copy.py --help
 
 
 Site Notifications
@@ -80,7 +82,9 @@ Site Notifications
 
 Allura has support for site-wide notifications that appear below the site header,
 but there is currently no UI for managing them.  They can easily be inserted via
-manual mongo queries, however::
+manual mongo queries, however:
+
+.. code-block:: console
 
     > db.site_notification.insert({
     ... active: true,

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e0e9df27/Allura/docs/extending.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/extending.rst b/Allura/docs/extending.rst
index c241d5f..7fb46da 100644
--- a/Allura/docs/extending.rst
+++ b/Allura/docs/extending.rst
@@ -40,7 +40,9 @@ A listing of available 3rd-party extensions is at https://forge-allura.apache.or
 
 To disable any Allura entry point, simply add an entry in your ``.ini`` config file
 with names and values corresponding to entry points defined in any ``setup.py`` file.
-For example if you have ForgeImporter set up, but want to disable the google code importers::
+For example if you have ForgeImporter set up, but want to disable the google code importers:
+
+.. code-block:: ini
 
     disable_entry_points.allura.project_importers = google-code
     disable_entry_points.allura.importers = google-code-tracker, google-code-repo

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e0e9df27/Allura/docs/installation.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/installation.rst b/Allura/docs/installation.rst
index aaa6de6..ef41f15 100644
--- a/Allura/docs/installation.rst
+++ b/Allura/docs/installation.rst
@@ -31,13 +31,19 @@ Configuring Optional Features
 The `development.ini` file has many options you can explore and configure.  It is geared towards development, so you will want to review
 carefully and make changes for production use.
 
+To run SVN and Git services, see the :doc:`scm_host` page.
+
+Some features may be added as separate `Allura extensions <https://forge-allura.apache.org/p/allura/wiki/Extensions/>`_
+
 Enabling inbound email
 ^^^^^^^^^^^^^^^^^^^^^^
 
 Allura can listen for email messages and update tools and artifacts.  For example, every ticket has an email address, and
-emails sent to that address will be added as comments on the ticket.  To set up the SMTP listener, run::
+emails sent to that address will be added as comments on the ticket.  To set up the SMTP listener, run:
+
+.. code-block:: shell-session
 
-(env-allura)~/src/forge/Allura$ nohup paster smtp_server development.ini > ~/logs/smtp.log &
+    (env-allura)~/src/forge/Allura$ nohup paster smtp_server development.ini > ~/logs/smtp.log &
 
 By default this uses port 8825.  Depending on your mail routing, you may need to change that port number.
 And if the port is in use, this command will fail.  You can check the log file for any errors.
@@ -47,17 +53,21 @@ Enabling RabbitMQ
 ^^^^^^^^^^^^^^^^^^
 
 For faster notification of background jobs, you can use RabbitMQ.  Assuming a base setup from the INSTALL, run these commands
-to install rabbitmq and set it up::
+to install rabbitmq and set it up:
 
-(env-allura)~$ sudo aptitude install rabbitmq-server
-(env-allura)~$ sudo rabbitmqctl add_user testuser testpw
-(env-allura)~$ sudo rabbitmqctl add_vhost testvhost
-(env-allura)~$ sudo rabbitmqctl set_permissions -p testvhost testuser ""  ".*" ".*"
-(env-allura)~$ pip install amqplib==0.6.1 kombu==1.0.4
+.. code-block:: shell-session
+
+    (env-allura)~$ sudo aptitude install rabbitmq-server
+    (env-allura)~$ sudo rabbitmqctl add_user testuser testpw
+    (env-allura)~$ sudo rabbitmqctl add_vhost testvhost
+    (env-allura)~$ sudo rabbitmqctl set_permissions -p testvhost testuser ""  ".*" ".*"
+    (env-allura)~$ pip install amqplib==0.6.1 kombu==1.0.4
 
 Then edit Allura/development.ini and change `amqp.enabled = false` to `amqp.enabled = true` and uncomment the other `amqp` settings.
 
-If your `paster taskd` process is still running, restart it::
+If your `paster taskd` process is still running, restart it:
+
+.. code-block:: shell-session
 
-(env-allura)~/src/forge/Allura$ pkill -f taskd
-(env-allura)~/src/forge/Allura$ nohup paster taskd development.ini > ~/logs/taskd.log &
+    (env-allura)~/src/forge/Allura$ pkill -f taskd
+    (env-allura)~/src/forge/Allura$ nohup paster taskd development.ini > ~/logs/taskd.log &

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e0e9df27/Allura/docs/scm_host.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/scm_host.rst b/Allura/docs/scm_host.rst
index 090cd70..10532f4 100644
--- a/Allura/docs/scm_host.rst
+++ b/Allura/docs/scm_host.rst
@@ -15,6 +15,8 @@
        specific language governing permissions and limitations
        under the License.
 
+.. _scm_hosting:
+
 Git and Subversion Hosting Installation
 ==========================================================
 
@@ -29,11 +31,16 @@ Git
 We'll cover the basics to get you going.  For additional options and details,
 see http://git-scm.com/docs/git-http-backend and http://git-scm.com/book/en/Git-on-the-Server
 and subsequent chapters.  The instructions here assume an
-Ubuntu system, but should be similar on other systems::
+Ubuntu system, but should be similar on other systems.
+
+.. code-block:: console
 
     sudo a2enmod proxy rewrite
     sudo vi /etc/apache2/sites-available/default
-    # and add the following within the <VirtualHost block
+
+And add the following text within the `<VirtualHost>` block:
+
+.. code-block:: apache
 
     SetEnv GIT_PROJECT_ROOT /srv/git
     SetEnv GIT_HTTP_EXPORT_ALL
@@ -54,6 +61,10 @@ Ubuntu system, but should be similar on other systems::
         Satisfy Any
     </LocationMatch>
 
+Then exit vim (`<esc> :wq`) and run:
+
+.. code-block:: shell-session
+
     sudo service apache2 reload
 
 To test that it's working, run: `git ls-remote http://localhost/git/p/test/git/`
@@ -129,7 +140,9 @@ These instructions are based on the documentation in `Debootstrap Chroot`_.  and
 
 #. Install debootstrap schroot
 
-#. Append the following text to the file /etc/schroot/schroot.conf::
+#. Append the following text to the file /etc/schroot/schroot.conf
+
+.. code-block:: ini
 
     [scm]
     description=Ubuntu Chroot for SCM Hosting
@@ -137,7 +150,9 @@ These instructions are based on the documentation in `Debootstrap Chroot`_.  and
     directory=/var/chroots/scm
     script-config=scm/config
 
-#. Create a directory /etc/schroot/scm and populate it with some files::
+#. Create a directory /etc/schroot/scm and populate it with some files:
+
+.. code-block:: console
 
     # mkdir /etc/schroot/scm
     # cat > /etc/schroot/scm/config <<EOF
@@ -161,12 +176,16 @@ These instructions are based on the documentation in `Debootstrap Chroot`_.  and
     hosts
     EOF
 
-#. Create a directory /var/chroots/scm and create the bootstrap environment.  (You may substitute a mirror from the  `ubuntu mirror list`_ for archive.ubuntu.com::
+#. Create a directory /var/chroots/scm and create the bootstrap environment.  (You may substitute a mirror from the  `ubuntu mirror list`_ for archive.ubuntu.com)
+
+.. code-block:: console
 
     $ sudo mkdir -p /var/chroots/scm
     $ sudo debootstrap --variant=buildd --arch amd64 --components=main,universe --include=git,mercurial,subversion,openssh-server,slapd,ldap-utils,ldap-auth-client,curl maverick /var/chroots/scm http://archive.ubuntu.com/ubuntu/
 
-#. Test that the chroot is installed by entering it::
+#. Test that the chroot is installed by entering it:
+
+.. code-block:: console
 
     # schroot -c scm -u root
     (scm) # logout
@@ -174,20 +193,26 @@ These instructions are based on the documentation in `Debootstrap Chroot`_.  and
 Configure OpenLDAP in the Chroot
 --------------------------------------------------------------
 
-#. Copy the ldap-setup script into the chroot environment::
+#. Copy the ldap-setup script into the chroot environment:
+
+.. code-block:: console
 
     $ sudo cp Allura/ldap-setup.py Allura/ldap-userconfig.py /var/chroots/scm
     $ sudo chmod +x /var/chroots/scm/ldap-*.py
 
-#. Log in to the chroot environment::
+#. Log in to the chroot environment:
+
+.. code-block:: console
 
     # schroot -c scm -u root
 
-#. Run the setup script, following the prompts::
+#. Run the setup script, following the prompts:
+
+.. code-block:: console
 
     (scm) # python /ldap-setup.py
 
-In particular, you will need to anwer the following questions (substitute your custom suffix if you are not using dc=localdomain):
+In particular, you will need to answer the following questions (substitute your custom suffix if you are not using dc=localdomain):
 
 * Should debconf manage LDAP configuration? **yes**
 * LDAP server Uniform Resource Identifier: **ldapi:///**
@@ -203,7 +228,9 @@ In particular, you will need to anwer the following questions (substitute your c
 Update the chroot ssh configuration
 -------------------------------------------------
 
-* Update the file /var/chroot/scm/etc/ssh/sshd_config, changing the port directive::
+* Update the file /var/chroot/scm/etc/ssh/sshd_config, changing the port directive:
+
+.. code-block:: guess
 
     # Port 22
     Port 8022
@@ -211,37 +238,51 @@ Update the chroot ssh configuration
 Setup the Custom FUSE Driver
 -------------------------------------
 
-#. Copy the accessfs script into the chroot environment::
+#. Copy the accessfs script into the chroot environment:
+
+.. code-block:: console
 
     $ sudo cp fuse/accessfs.py /var/chroots/scm
 
-#. Configure allura to point to the chrooted scm environment::
+#. Configure allura to point to the chrooted scm environment:
+
+.. code-block:: console
 
     $ sudo ln -s /var/chroots/scm /git
     $ sudo ln -s /var/chroots/scm /hg
     $ sudo ln -s /var/chroots/scm /svn
 
-#. Log in to the chroot environment & install packages::
+#. Log in to the chroot environment & install packages:
+
+.. code-block:: console
 
     # schroot -c scm -u root
     (scm) # apt-get install python-fuse
 
-#. Create the SCM directories::
+#. Create the SCM directories:
+
+.. code-block:: console
 
     (scm) # mkdir /scm /scm-repo
 
-#. Mount the FUSE filesystem::
+#. Mount the FUSE filesystem:
+
+.. code-block:: console
 
     (scm) # python /accessfs.py /scm-repo -o allow_other -s -o root=/scm
 
-#. Start the SSH daemon::
+#. Start the SSH daemon:
+
+.. code-block:: console
 
     (scm) # /etc/init.d/ssh start
 
 Configure Allura to Use the LDAP Server
 ------------------------------------------------
 
-Set the following values in your .ini file::
+Set the following values in your .ini file:
+
+.. code-block:: ini
 
     auth.method = ldap
 


[30/50] git commit: [#5424] change theme to nature (looks nicer; TOC menu on left)

Posted by jo...@apache.org.
[#5424] change theme to nature (looks nicer; TOC menu on left)


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ca0d9d45
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ca0d9d45
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ca0d9d45

Branch: refs/heads/cj/6992
Commit: ca0d9d4577f07a3fe34d6c018b7942773efd8b1d
Parents: a8cca91
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Nov 19 17:44:19 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:33 2014 +0000

----------------------------------------------------------------------
 Allura/docs/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ca0d9d45/Allura/docs/conf.py
----------------------------------------------------------------------
diff --git a/Allura/docs/conf.py b/Allura/docs/conf.py
index f7d8757..3029c64 100644
--- a/Allura/docs/conf.py
+++ b/Allura/docs/conf.py
@@ -108,7 +108,7 @@ pygments_style = 'sphinx'
 
 # The theme to use for HTML and HTML Help pages.  Major themes that come with
 # Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'sphinxdoc'
+html_theme = 'nature'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the


[44/50] git commit: [#4091] completely remove database_uri

Posted by jo...@apache.org.
[#4091] completely remove database_uri

A few very old migrations will fail, but they are extremely old and not
relevant any more.


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e33a527d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e33a527d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e33a527d

Branch: refs/heads/cj/6992
Commit: e33a527d948e4cb27a57514e9c8560a7a6334561
Parents: 0e8e6de
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Jan 2 20:43:04 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Jan 2 20:55:05 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/project.py | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e33a527d/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 1e5ff19..36e29ab 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -232,10 +232,6 @@ class Project(MappedClass, ActivityNode, ActivityObject):
         '''ACL processing should proceed up the project hierarchy.'''
         return self.parent_project
 
-    @classmethod
-    def database_uri(cls):
-        return config.get('ming.project.uri')
-
     @LazyProperty
     def allowed_tool_status(self):
         return ['production'] + self._extra_tool_status


[04/50] git commit: [#4812] ticket:506 Added title to ticket name field and changed initial focusing to search field

Posted by jo...@apache.org.
[#4812] ticket:506 Added title to ticket name field and changed initial focusing to search field


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/8039b3d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8039b3d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8039b3d8

Branch: refs/heads/cj/6992
Commit: 8039b3d88d06188fa6b5f0a654e98de6c284141b
Parents: 65ca68f
Author: Yaroslav Sokolovsky <ya...@gmail.com>
Authored: Tue Dec 24 13:57:59 2013 +0200
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Wed Jan 1 05:35:37 2014 +0000

----------------------------------------------------------------------
 .../forgetracker/templates/tracker/new_ticket.html        | 10 +++++++++-
 .../templates/tracker_widgets/ticket_form.html            |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8039b3d8/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/new_ticket.html b/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
index fd75006..649bb6e 100644
--- a/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
@@ -35,19 +35,27 @@
 <style type="text/css">
   input[name='ticket_form.summary']{
     top: 5px;
+    left: 100px;
     position: absolute;
     z-index: 21;
   }
   .markdown_edit textarea {
     height: 100px;
   }
+
+  .new-ticket-title {
+    top: 9px;
+    position: absolute;
+    z-index: 21;
+    color: #FFFFFF !important;
+  }
 </style>
 {% endblock %}
 
 {% block extra_js %}
 <script type="text/javascript">
   $(document).ready(function(){
-    $('input[name="ticket_form.summary"]').focus();
+    $('input[name="q"]').focus();
   });
 </script>
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8039b3d8/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html b/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
index 93f5fcc..e73bc18 100644
--- a/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
+++ b/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
@@ -23,7 +23,7 @@
     <div id="new-ticket-help-msg" class="grid-19 info">{{g.markdown.convert(help_msg)}}</div>
   {% endif %}
   <div class="grid-18">
-      {{widget.display_field_by_name('summary')|safe}}
+      <label class="new-ticket-title">Create Ticket:</label>{{widget.display_field_by_name('summary')|safe}}
   </div>
     {% if widget.fields['_milestone'] %}
       <div class="grid-6">


[06/50] git commit: [#6848] ticket:483 Fix test failing due to a new trove categories

Posted by jo...@apache.org.
[#6848] ticket:483 Fix test failing due to a new trove categories


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/73379476
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/73379476
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/73379476

Branch: refs/heads/cj/6992
Commit: 73379476372a45cf8d80b65139e58c584cb59b01
Parents: 350faaa
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri Dec 27 15:15:19 2013 +0200
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 14:52:06 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tests/functional/test_admin.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/73379476/Allura/allura/tests/functional/test_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_admin.py b/Allura/allura/tests/functional/test_admin.py
index bf09009..5919bb9 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -520,17 +520,17 @@ class TestProjectAdmin(TestController):
         # add a cat
         with audits('add trove root_database: Database Environment :: Database API'):
             form = r.forms['add_trove_root_database']
-            form['new_trove'].value = '499'
+            form['new_trove'].value = '506'
             r = form.submit().follow()
         # make sure it worked
         assert 'No Database Environment categories have been selected.' not in r
-        assert '<span class="trove_fullpath">Database Environment :: Database API</span>' in r
+        assert '<span class="trove_fullpath">Database Environment :: Database API :: Python Database API</span>' in r
         # delete the cat
         with audits('remove trove root_database: Database Environment :: Database API'):
-            r = r.forms['delete_trove_root_database_499'].submit().follow()
+            r = r.forms['delete_trove_root_database_506'].submit().follow()
         # make sure it worked
         assert 'No Database Environment categories have been selected.' in r
-        assert '<span class="trove_fullpath">Database Environment :: Database API</span>' not in r
+        assert '<span class="trove_fullpath">Database Environment :: Database API :: Python Database API</span>' not in r
 
     def test_add_remove_label(self):
         r = self.app.get('/admin/trove')


[38/50] git commit: [#5424] bump docutils>=0.9 for :code:

Posted by jo...@apache.org.
[#5424] bump docutils>=0.9 for :code:


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/94ae6ddb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/94ae6ddb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/94ae6ddb

Branch: refs/heads/cj/6992
Commit: 94ae6ddba6c0f4428e90786e5c59c74f4ee857f3
Parents: 85c1c7c
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Mon Dec 16 17:15:28 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:35 2014 +0000

----------------------------------------------------------------------
 requirements-common.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/94ae6ddb/requirements-common.txt
----------------------------------------------------------------------
diff --git a/requirements-common.txt b/requirements-common.txt
index 5184ad4..7f48285 100644
--- a/requirements-common.txt
+++ b/requirements-common.txt
@@ -8,8 +8,8 @@ colander==0.9.3
 # dep of pypeline
 Creoleparser==0.7.3
 decorator==3.3.2
-# dep of pypeline
-docutils==0.8.1
+# dep of pypeline, sphinx
+docutils==0.9
 EasyWidgets==0.2dev-20130716
 faulthandler==2.1
 feedparser==5.0.1


[46/50] git commit: [#5424] add apache license header

Posted by jo...@apache.org.
[#5424] add apache license header


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/7642892c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7642892c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7642892c

Branch: refs/heads/cj/6992
Commit: 7642892cd7599336b69d35e12f7a8717f2dc35b9
Parents: e33a527
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Jan 2 21:20:35 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Jan 2 21:20:35 2014 +0000

----------------------------------------------------------------------
 Allura/docs/_templates/layout.html  | 18 ++++++++++++++++++
 scripts/perf/call_count_walk_git.sh | 16 ++++++++++++++++
 2 files changed, 34 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7642892c/Allura/docs/_templates/layout.html
----------------------------------------------------------------------
diff --git a/Allura/docs/_templates/layout.html b/Allura/docs/_templates/layout.html
index d098c91..5079c7d 100644
--- a/Allura/docs/_templates/layout.html
+++ b/Allura/docs/_templates/layout.html
@@ -1,3 +1,21 @@
+{#-
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+-#}
 {% extends "!layout.html" %}
 {% block rootrellink %}
     <li><a href="https://forge-allura.apache.org/p/allura/">Allura Home</a> &raquo;</li>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7642892c/scripts/perf/call_count_walk_git.sh
----------------------------------------------------------------------
diff --git a/scripts/perf/call_count_walk_git.sh b/scripts/perf/call_count_walk_git.sh
index 8bb41ba..65a459b 100755
--- a/scripts/perf/call_count_walk_git.sh
+++ b/scripts/perf/call_count_walk_git.sh
@@ -1,4 +1,20 @@
 #!/bin/bash
+#       Licensed to the Apache Software Foundation (ASF) under one
+#       or more contributor license agreements.  See the NOTICE file
+#       distributed with this work for additional information
+#       regarding copyright ownership.  The ASF licenses this file
+#       to you under the Apache License, Version 2.0 (the
+#       "License"); you may not use this file except in compliance
+#       with the License.  You may obtain a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#       Unless required by applicable law or agreed to in writing,
+#       software distributed under the License is distributed on an
+#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#       KIND, either express or implied.  See the License for the
+#       specific language governing permissions and limitations
+#       under the License.
 
 if [[ $@ ]]
 then


[33/50] git commit: [#5424] WIP: instructions for git & svn

Posted by jo...@apache.org.
[#5424] WIP: instructions for git & svn


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/de9c8180
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/de9c8180
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/de9c8180

Branch: refs/heads/cj/6992
Commit: de9c8180be92c539180032a23940524f02ea81f8
Parents: 1491189
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Dec 12 18:19:14 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:34 2014 +0000

----------------------------------------------------------------------
 Allura/docs/scm_host.rst | 102 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 101 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/de9c8180/Allura/docs/scm_host.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/scm_host.rst b/Allura/docs/scm_host.rst
index e3379bf..090cd70 100644
--- a/Allura/docs/scm_host.rst
+++ b/Allura/docs/scm_host.rst
@@ -15,9 +15,109 @@
        specific language governing permissions and limitations
        under the License.
 
-SCM (Git, Mercurial, Subversion) Hosting Installation
+Git and Subversion Hosting Installation
 ==========================================================
 
+Allura can manage and display Git and SVN repositories, but it doesn't
+automatically run the git and svn services for you.  Here we'll describe how
+to set up standard git and svn services to work with Allura, so that you can
+checkout and commit code with those repositories.
+
+Git
+--------------
+
+We'll cover the basics to get you going.  For additional options and details,
+see http://git-scm.com/docs/git-http-backend and http://git-scm.com/book/en/Git-on-the-Server
+and subsequent chapters.  The instructions here assume an
+Ubuntu system, but should be similar on other systems::
+
+    sudo a2enmod proxy rewrite
+    sudo vi /etc/apache2/sites-available/default
+    # and add the following within the <VirtualHost block
+
+    SetEnv GIT_PROJECT_ROOT /srv/git
+    SetEnv GIT_HTTP_EXPORT_ALL
+    ProxyPass /git/ !
+    ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
+
+    RewriteCond %{QUERY_STRING} service=git-receive-pack [OR]
+    RewriteCond %{REQUEST_URI} /git-receive-pack$
+    RewriteRule ^/git/ - [E=AUTHREQUIRED:yes]
+
+    <LocationMatch "^/git/">
+        Order Deny,Allow
+        Deny from env=AUTHREQUIRED
+
+        AuthType Basic
+        AuthName "Git Access"
+        Require group committers
+        Satisfy Any
+    </LocationMatch>
+
+    sudo service apache2 reload
+
+To test that it's working, run: `git ls-remote http://localhost/git/p/test/git/`
+(if using vagrant, use localhost:8088 on your host machine).  If there is no output,
+that is fine (it'll list git heads once the repo has commits in it).
+
+Note that this has no authentication and is suitable for development only.
+
+If you want to run a separate readonly git service, using the git protocol instead of http,
+run: `git daemon --reuseaddr --export-all --base-path=/srv/git /srv/git`  It can
+be accessed at `git://localhost/p/test/git`
+
+Depending on the hostname and ports you use, you may need to change the `scm.host.*`
+settings in `development.ini`.
+
+
+Subversion
+--------------
+
+
+Temp Notes:
+--------------
+
+
+STRUCTURE:
+separate authentication (ldap, allura) vs authorization (via allura API)
+different protocol (svn:// & git:// vs http)
+    http://svnbook.red-bean.com/en/1.8/svn.serverconfig.choosing.html
+    http://git-scm.com/book/ch4-1.html
+
+TODO:
+    disable scm.host.https* in .ini?
+    remove /home/vagrant/scm/ symlinks?
+
+SVN
+    `sudo aptitude install libapache2-svn`
+    test http://localhost:80/ (8088 if vagrant)
+    `vi /etc/apache2/mods-available/dav_svn.conf`
+        uncomment things
+        Have to do a location & parentpath for each project, e.g "test" project
+        <Location /svn/p/test>
+        SVNParentPath /srv/svn/p/test
+        todo: Auth* directives
+    `service apache2 reload`
+    test http://localhost:80/svn/p/test/code/ (8088 if vagrant)
+    Now can change scm.host.(https|https_anon).svn to "http://localhost:80/svn$path/" (8088 if vagrant) for checkout instructions
+        scm.host.(ro|rw) are intended for svn:// protocol
+    make SVNParentPath recursive:
+        http://subversion.tigris.org/issues/show_bug.cgi?id=3588
+        https://sourceforge.net/p/allura/pastebin/517557273e5e837ec65122c1
+        latest: https://trac.sdot.me/git/?p=srpmtree.git;a=blob_plain;f=subversion-recursive-parentpath.patch;hb=refs/heads/sog/subversion
+        need to update it for trunk/1.8.x
+        http://subversion.apache.org/docs/community-guide/general.html#patches
+        http://subversion.apache.org/docs/community-guide/conventions.html
+
+    svnserve shouldn't have parentpath restrictions, it allows complete access to a dir
+        svnserve -d -r /srv/svn -R
+        test: svn info svn://localhost/p/test/code/
+        killall svnserve
+        more info: http://svnbook.red-bean.com/en/1.8/svn.serverconfig.svnserve.html
+
+
+~~~~~~~
+
 The following instructions assume you are using a version of Ubuntu Linux with
 support for schroot and debootstrap.  We will use a chroot jail to allow users to
 access their repositories via ssh.


[26/50] git commit: [#6388] fix location lookup of tests that explicitly use test.ini

Posted by jo...@apache.org.
[#6388] fix location lookup of tests that explicitly use test.ini


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/58ab8ee8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/58ab8ee8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/58ab8ee8

Branch: refs/heads/cj/6992
Commit: 58ab8ee836995387695cccb93cd1883cab3600e7
Parents: 1bb460c
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Jan 2 17:10:17 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Jan 2 17:10:17 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tests/test_commands.py                      |  8 +++++---
 ForgeBlog/forgeblog/tests/test_commands.py                | 10 ++++------
 .../forgetracker/tests/command/test_fix_discussion.py     |  4 +++-
 3 files changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/58ab8ee8/Allura/allura/tests/test_commands.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_commands.py b/Allura/allura/tests/test_commands.py
index b290380..5187d14 100644
--- a/Allura/allura/tests/test_commands.py
+++ b/Allura/allura/tests/test_commands.py
@@ -20,6 +20,7 @@ from datadiff.tools import assert_equal
 from ming.orm import ThreadLocalORMSession
 from mock import Mock, call, patch
 import pymongo
+import pkg_resources
 
 from alluratest.controller import setup_basic_test, setup_global_objects
 from allura.command import base, script, set_neighborhood_features, \
@@ -29,7 +30,8 @@ from forgeblog import model as BM
 from allura.lib.exceptions import InvalidNBFeatureValueError
 from allura.tests import decorators as td
 
-test_config = 'test.ini#main'
+test_config = pkg_resources.resource_filename('allura', '../test.ini') + '#main'
+
 
 class EmptyClass(object): pass
 
@@ -41,8 +43,8 @@ def setUp(self):
 
 def test_script():
     cmd = script.ScriptCommand('script')
-    cmd.run([test_config, 'allura/tests/tscript.py' ])
-    assert_raises(ValueError, cmd.run, [test_config, 'allura/tests/tscript_error.py' ])
+    cmd.run([test_config, pkg_resources.resource_filename('allura', 'tests/tscript.py') ])
+    assert_raises(ValueError, cmd.run, [test_config, pkg_resources.resource_filename('allura','tests/tscript_error.py') ])
 
 def test_set_neighborhood_max_projects():
     neighborhood = M.Neighborhood.query.find().first()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/58ab8ee8/ForgeBlog/forgeblog/tests/test_commands.py
----------------------------------------------------------------------
diff --git a/ForgeBlog/forgeblog/tests/test_commands.py b/ForgeBlog/forgeblog/tests/test_commands.py
index 0b2804a..569470e 100644
--- a/ForgeBlog/forgeblog/tests/test_commands.py
+++ b/ForgeBlog/forgeblog/tests/test_commands.py
@@ -18,22 +18,20 @@
 from datetime import datetime, timedelta
 from pylons import tmpl_context as c, app_globals as g
 from datadiff.tools import assert_equal
-
 from IPython.testing.decorators import module_not_available, skipif
+import pkg_resources
+import mock
+import feedparser
 
 from ming.orm.ormsession import ThreadLocalORMSession
 
 from alluratest.controller import setup_basic_test, setup_global_objects
 from allura import model as M
-from allura.lib import security
-from allura.lib import helpers as h
 from forgeblog import model as BM
 
-import mock
 
-import feedparser
+test_config = pkg_resources.resource_filename('allura', '../test.ini') + '#main'
 
-test_config = 'test.ini#main'
 
 def setUp():
     setup_basic_test()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/58ab8ee8/ForgeTracker/forgetracker/tests/command/test_fix_discussion.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/command/test_fix_discussion.py b/ForgeTracker/forgetracker/tests/command/test_fix_discussion.py
index 330146f..d0cc4d3 100644
--- a/ForgeTracker/forgetracker/tests/command/test_fix_discussion.py
+++ b/ForgeTracker/forgetracker/tests/command/test_fix_discussion.py
@@ -17,6 +17,7 @@
 
 from ming.orm import session
 from nose.tools import assert_equal, assert_not_equal
+import pkg_resources
 
 from alluratest.controller import setup_basic_test, setup_global_objects
 from forgetracker.command import fix_discussion
@@ -24,7 +25,8 @@ from allura.tests.decorators import with_tracker
 from allura import model as M
 from forgetracker import model as TM
 
-test_config = 'test.ini#main'
+
+test_config = pkg_resources.resource_filename('allura', '../test.ini') + '#main'
 
 
 def setUp(self):


[39/50] git commit: [#5424] remove unused scm dirs from vagrant config

Posted by jo...@apache.org.
[#5424] remove unused scm dirs from vagrant config


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/85c1c7c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/85c1c7c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/85c1c7c6

Branch: refs/heads/cj/6992
Commit: 85c1c7c6e630364fceb097827621f5a68333b988
Parents: b48aac4
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri Dec 13 17:27:23 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:35 2014 +0000

----------------------------------------------------------------------
 vagrant/manifests/ubuntu-1204-server-amd64.pp | 31 ----------------------
 1 file changed, 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/85c1c7c6/vagrant/manifests/ubuntu-1204-server-amd64.pp
----------------------------------------------------------------------
diff --git a/vagrant/manifests/ubuntu-1204-server-amd64.pp b/vagrant/manifests/ubuntu-1204-server-amd64.pp
index ead0205..b93456e 100644
--- a/vagrant/manifests/ubuntu-1204-server-amd64.pp
+++ b/vagrant/manifests/ubuntu-1204-server-amd64.pp
@@ -115,40 +115,9 @@ file { '/home/vagrant/env-allura/lib/python2.7/site-packages/pysvn':
 }
 
 # create SCM repo dirs
-file { [ "/home/vagrant/scm", "/home/vagrant/scm/git", "/home/vagrant/scm/hg", "/home/vagrant/scm/svn" ]:
-  ensure => "directory",
-  owner => "vagrant",
-  group => "vagrant",
-  mode   => 777,
-}
-
-# create symlinks to repo dirs
-file { '/git':
-  ensure => "link",
-  target => "/home/vagrant/scm/git",
-  owner => "vagrant",
-  group => "vagrant",
-}
-
-file { '/hg':
-  ensure => "link",
-  target => "/home/vagrant/scm/hg",
-  owner => "vagrant",
-  group => "vagrant",
-}
-
-file { '/svn':
-  ensure => "link",
-  target => "/home/vagrant/scm/svn",
-  owner => "vagrant",
-  group => "vagrant",
-}
-
-# create SCM repo dirs
 file { [ "/srv/git", "/srv/hg", "/srv/svn" ]:
   ensure => "directory",
   owner => "vagrant",
   group => "vagrant",
   mode   => 770,
 }
-


[02/50] git commit: [#4812] ticket:506 Fix layout in different browsers

Posted by jo...@apache.org.
[#4812] ticket:506 Fix layout in different browsers


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/f21c43e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/f21c43e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/f21c43e1

Branch: refs/heads/cj/6992
Commit: f21c43e1276141422b596950be5ee15b736da153
Parents: 3a9db46
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed Dec 25 14:32:31 2013 +0200
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Wed Jan 1 05:35:37 2014 +0000

----------------------------------------------------------------------
 .../forgetracker/templates/tracker/new_ticket.html    | 14 +++++---------
 .../forgetracker/templates/tracker/ticket.html        |  1 +
 .../templates/tracker_widgets/ticket_form.html        |  4 +++-
 3 files changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f21c43e1/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/new_ticket.html b/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
index c984ecd..4af4b6f 100644
--- a/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
@@ -25,7 +25,7 @@
 {% block edit_box %}
 <div class="editbox">
   <div class="form_holder">
-      {{c.ticket_form.display(action=action, value=dict(description=description, 
+      {{c.ticket_form.display(action=action, value=dict(description=description,
                               summary=summary, labels=labels), help_msg=help_msg)}}
   </div>
 </div>
@@ -33,21 +33,17 @@
 
 {% block extra_css %}
 <style type="text/css">
-  input[name='ticket_form.summary']{
-    top: 5px;
-    left: 100px;
-    position: absolute;
-    z-index: 21;
-  }
   .markdown_edit textarea {
     height: 100px;
   }
 
   .new-ticket-title {
-    top: 9px;
+    top: 5px;
     position: absolute;
     z-index: 21;
-    color: #FFFFFF !important;
+  }
+  .new-ticket-title label {
+    color: #ffffff;
   }
 </style>
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f21c43e1/ForgeTracker/forgetracker/templates/tracker/ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/ticket.html b/ForgeTracker/forgetracker/templates/tracker/ticket.html
index 508c2c6..4592f72 100644
--- a/ForgeTracker/forgetracker/templates/tracker/ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/ticket.html
@@ -245,6 +245,7 @@
 <style type="text/css">
   input[name='ticket_form.summary']{
     top: 5px;
+    left: 10px;
     position: absolute;
     z-index: 21;
   }

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f21c43e1/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html b/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
index e73bc18..63a448d 100644
--- a/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
+++ b/ForgeTracker/forgetracker/templates/tracker_widgets/ticket_form.html
@@ -23,7 +23,9 @@
     <div id="new-ticket-help-msg" class="grid-19 info">{{g.markdown.convert(help_msg)}}</div>
   {% endif %}
   <div class="grid-18">
-      <label class="new-ticket-title">Create Ticket:</label>{{widget.display_field_by_name('summary')|safe}}
+    <div class="new-ticket-title">
+      <label>Create Ticket:</label>{{widget.display_field_by_name('summary')|safe}}
+    </div>
   </div>
     {% if widget.fields['_milestone'] %}
       <div class="grid-6">


[29/50] git commit: [#5424] fix rst syntax

Posted by jo...@apache.org.
[#5424] fix rst syntax


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a8cca912
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a8cca912
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a8cca912

Branch: refs/heads/cj/6992
Commit: a8cca912ef57c9c3cae7b607856e0420b5b2825f
Parents: 81cf8e4
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Nov 19 17:43:59 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:33 2014 +0000

----------------------------------------------------------------------
 Allura/docs/administration.rst |  2 +-
 Allura/docs/scm_host.rst       | 18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a8cca912/Allura/docs/administration.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/administration.rst b/Allura/docs/administration.rst
index eaf9387..19c2e53 100644
--- a/Allura/docs/administration.rst
+++ b/Allura/docs/administration.rst
@@ -80,7 +80,7 @@ Site Notifications
 
 Allura has support for site-wide notifications that appear below the site header,
 but there is currently no UI for managing them.  They can easily be inserted via
-manual mongo queries, however:
+manual mongo queries, however::
 
     > db.site_notification.insert({
     ... active: true,

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a8cca912/Allura/docs/scm_host.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/scm_host.rst b/Allura/docs/scm_host.rst
index fa61ef7..e3379bf 100644
--- a/Allura/docs/scm_host.rst
+++ b/Allura/docs/scm_host.rst
@@ -79,11 +79,11 @@ Configure OpenLDAP in the Chroot
     $ sudo cp Allura/ldap-setup.py Allura/ldap-userconfig.py /var/chroots/scm
     $ sudo chmod +x /var/chroots/scm/ldap-*.py
 
-#. Log in to the chroot environment:
+#. Log in to the chroot environment::
 
     # schroot -c scm -u root
 
-#. Run the setup script, following the prompts.
+#. Run the setup script, following the prompts::
 
     (scm) # python /ldap-setup.py
 
@@ -111,37 +111,37 @@ Update the chroot ssh configuration
 Setup the Custom FUSE Driver
 -------------------------------------
 
-#. Copy the accessfs script into the chroot environment
+#. Copy the accessfs script into the chroot environment::
 
     $ sudo cp fuse/accessfs.py /var/chroots/scm
 
-#. Configure allura to point to the chrooted scm environment
+#. Configure allura to point to the chrooted scm environment::
 
     $ sudo ln -s /var/chroots/scm /git
     $ sudo ln -s /var/chroots/scm /hg
     $ sudo ln -s /var/chroots/scm /svn
 
-#. Log in to the chroot environment & install packages:
+#. Log in to the chroot environment & install packages::
 
     # schroot -c scm -u root
     (scm) # apt-get install python-fuse
 
-#. Create the SCM directories
+#. Create the SCM directories::
 
     (scm) # mkdir /scm /scm-repo
 
-#. Mount the FUSE filesystem
+#. Mount the FUSE filesystem::
 
     (scm) # python /accessfs.py /scm-repo -o allow_other -s -o root=/scm
 
-#. Start the SSH daemon
+#. Start the SSH daemon::
 
     (scm) # /etc/init.d/ssh start
 
 Configure Allura to Use the LDAP Server
 ------------------------------------------------
 
-Set the following values in your .ini file:
+Set the following values in your .ini file::
 
     auth.method = ldap
 


[16/50] git commit: [#6388] start capturing verbose logging in perf script

Posted by jo...@apache.org.
[#6388] start capturing verbose logging in perf script


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/dccd0006
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/dccd0006
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/dccd0006

Branch: refs/heads/cj/6992
Commit: dccd000647ce8128053bbb4be5020fdb78051eff
Parents: 8ddd143
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Dec 18 22:39:51 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:20 2014 +0000

----------------------------------------------------------------------
 scripts/perf/call_count.py | 46 ++++++++++++++++++++++++++++++++---------
 1 file changed, 36 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dccd0006/scripts/perf/call_count.py
----------------------------------------------------------------------
diff --git a/scripts/perf/call_count.py b/scripts/perf/call_count.py
index 2b8e15c..718f5b0 100755
--- a/scripts/perf/call_count.py
+++ b/scripts/perf/call_count.py
@@ -18,10 +18,15 @@
 #       under the License.
 
 import json
-from pprint import pprint
+import logging
+import random
+import string
 
 from pylons import tmpl_context as c
 from testfixtures import LogCapture
+from mock import patch
+import timermiddleware
+from ming.odm import ThreadLocalODMSession
 
 from allura import model as M
 from allura.lib.helpers import push_config
@@ -35,16 +40,22 @@ def main():
     test = TestController()
     setup(test)
     url = generate_wiki_thread(test)
-    load_page(test, url)
-    load_page(test, url)
+    ThreadLocalODMSession.close_all()  # make sure ODM sessions won't get re-used
     load_page(test, url)
     test.tearDown()
 
 
 def setup(test):
     # includes setting up mim
-    with patch_middleware_config({'stats.sample_rate': 1}):
-       test.setUp()
+    with patch_middleware_config({'stats.sample_rate': 1,
+                                  'stats.debug_line_length': 1000,
+                                  }), \
+         patch('timermiddleware.log.isEnabledFor', return_value=True):  # can't set this via logging configuration since setUp() will load a logging config and then start using it before we have a good place to tweak it
+        test.setUp()
+
+    tmw_log = logging.getLogger('timermiddleware')
+    tmw_log.disabled = 0  # gets disabled when .ini file is loaded; dumb.
+    tmw_log.setLevel(logging.DEBUG)
 
 
 def generate_wiki_thread(test):
@@ -65,16 +76,31 @@ def generate_wiki_thread(test):
         with push_config(c, user=M.User.query.get(username='test-user')):
             thread.add_post(text='I disagree')
 
+    ThreadLocalODMSession.flush_all()
+
     url = '/p/test/wiki/_discuss/thread/{}/'.format(thread._id)
     return url
 
 
-def load_page(test, url):
-    with LogCapture('stats') as l:
-        print url, test.app.get(url, extra_environ=dict(username='*anonymous')).status
-    for r in l.records:
-        timings = json.loads(r.message)
+def load_page(test, url, verbose=False, debug_html=False):
+
+    with LogCapture('stats') as stats, LogCapture('timermiddleware') as calls:
+        resp = test.app.get(url, extra_environ=dict(username='*anonymous'))
+        print url, resp.status
+        if debug_html:
+            debug_filename = 'call-{}.html'.format(''.join([random.choice(string.ascii_letters + string.digits) for n in xrange(10)]))
+            with open(debug_filename, 'w') as out:
+                out.write(resp.body)
+            print debug_filename
+
+    if verbose:
+        for r in calls.records:
+            print r.getMessage()
+
+    for r in stats.records:
+        timings = json.loads(r.getMessage())
         print json.dumps(timings['call_counts'])
 
+
 if __name__ == '__main__':
     main()


[36/50] git commit: [#5424] store repos on /srv instead of /tmp so they don't disappear after reboot on most systems

Posted by jo...@apache.org.
[#5424] store repos on /srv instead of /tmp so they don't disappear after reboot on most systems


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/14911893
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/14911893
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/14911893

Branch: refs/heads/cj/6992
Commit: 14911893ee50d96390ae98bc56a3ac0269919153
Parents: 8666d13
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Dec 12 18:18:47 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:34 2014 +0000

----------------------------------------------------------------------
 Allura/development.ini                        | 16 ++++++++--------
 INSTALL.markdown                              | 11 +++++++++++
 vagrant/manifests/ubuntu-1204-server-amd64.pp |  9 +++++++++
 3 files changed, 28 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/14911893/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 5a3d83f..edfb794 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -109,14 +109,14 @@ static.url_base = /nf/%(build_key)s/_static_/
 ew.extra_headers = [ ('Access-Control-Allow-Origin', '*') ]
 
 # SCM settings for local development
-scm.host.ro.git = /tmp/git$path
-scm.host.rw.git = /tmp/git$path
+scm.host.ro.git = /srv/git$path
+scm.host.rw.git = /srv/git$path
 # remote access varies by configuration.  If you are using a vagrant VM, this should work:
-#scm.host.rw.git = ssh://vagrant@localhost:2222/tmp/git$path
-scm.host.ro.hg = /tmp/hg$path
-scm.host.rw.hg = /tmp/hg$path
-scm.host.ro.svn = file:///tmp/svn$path/
-scm.host.rw.svn = file:///tmp/svn$path/
+#scm.host.rw.git = ssh://vagrant@localhost:2222/srv/git$path
+scm.host.ro.hg = /srv/hg$path
+scm.host.rw.hg = /srv/hg$path
+scm.host.ro.svn = file:///srv/svn$path/
+scm.host.rw.svn = file:///srv/svn$path/
 
 # SCM settings for chroot + ldap configuration.  See Allura/docs/scm_host.rst
 # scm.host.ro.git = git://git.localhost$path
@@ -145,7 +145,7 @@ scm.new_refresh = true
 
 gitweb.cgi = /usr/lib/cgi-bin/gitweb.cgi
 
-scm.repos.root = /tmp
+scm.repos.root = /srv
 scm.repos.tarball.enable = false
 scm.repos.tarball.root = /usr/share/nginx/www/
 scm.repos.tarball.url_prefix = http://localhost/

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/14911893/INSTALL.markdown
----------------------------------------------------------------------
diff --git a/INSTALL.markdown b/INSTALL.markdown
index f8afa23..cce192e 100644
--- a/INSTALL.markdown
+++ b/INSTALL.markdown
@@ -114,6 +114,17 @@ We have a custom config ready for use.
     (env-allura)~/src/apache-solr-4.2.1/example/$ nohup java -jar start.jar > ~/logs/solr.log &
 
 
+### Create code repo directories
+
+The default configuration stores repos in `/srv`, so we need to create those directories:
+
+    sudo mkdir /srv/{git,svn,hg}
+    sudo chown $USER /srv/{git,svn,hg}
+
+If you don't have `sudo` permission or just want to store them somewhere else, change the `/srv` paths in `development.ini`
+
+If you want to set up remote access to the repositories, see <http://allura.sourceforge.net/docs/scm_host.html>
+
 ### Allura task processing
 
 Allura uses a background task service called "taskd" to do async tasks like sending emails, and indexing data into solr, etc.  Let's get it running

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/14911893/vagrant/manifests/ubuntu-1204-server-amd64.pp
----------------------------------------------------------------------
diff --git a/vagrant/manifests/ubuntu-1204-server-amd64.pp b/vagrant/manifests/ubuntu-1204-server-amd64.pp
index be00025..ead0205 100644
--- a/vagrant/manifests/ubuntu-1204-server-amd64.pp
+++ b/vagrant/manifests/ubuntu-1204-server-amd64.pp
@@ -143,3 +143,12 @@ file { '/svn':
   owner => "vagrant",
   group => "vagrant",
 }
+
+# create SCM repo dirs
+file { [ "/srv/git", "/srv/hg", "/srv/svn" ]:
+  ensure => "directory",
+  owner => "vagrant",
+  group => "vagrant",
+  mode   => 770,
+}
+


[13/50] git commit: [#6388] avoid 1 mongo query in test controller setup

Posted by jo...@apache.org.
[#6388] avoid 1 mongo query in test controller setup


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/78c03646
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/78c03646
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/78c03646

Branch: refs/heads/cj/6992
Commit: 78c036468c2f803075af82872f5410fca49ee7f5
Parents: a7ab2f3
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Dec 19 18:30:41 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:20 2014 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/basetest_project_root.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/78c03646/Allura/allura/controllers/basetest_project_root.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/basetest_project_root.py b/Allura/allura/controllers/basetest_project_root.py
index b73a851..ceb597b 100644
--- a/Allura/allura/controllers/basetest_project_root.py
+++ b/Allura/allura/controllers/basetest_project_root.py
@@ -67,9 +67,12 @@ class BasetestProjectRootController(WsgiDispatchController, ProjectController):
 
     def __init__(self):
         for n in M.Neighborhood.query.find():
-            if n.url_prefix.startswith('//'): continue
+            if n.url_prefix.startswith('//'):
+                continue
             n.bind_controller(self)
-        self.p_nbhd = M.Neighborhood.query.get(name='Projects')
+            if n.url_prefix == '/p/':
+                self.p_nbhd = n
+
         proxy_root = RootController()
         self.dispatch = DispatchTest()
         self.security = SecurityTests()


[12/50] git commit: [#6388] separate out timermiddleware logging into stats.log

Posted by jo...@apache.org.
[#6388] separate out timermiddleware logging into stats.log


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/c9f595a6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c9f595a6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c9f595a6

Branch: refs/heads/cj/6992
Commit: c9f595a6c6743032e25cd1194eb1f2214bcff963
Parents: 7337947
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Dec 17 17:43:57 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:19 2014 +0000

----------------------------------------------------------------------
 Allura/development.ini | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c9f595a6/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index b9df222..930bbb8 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -333,13 +333,13 @@ override_root = task
 # http://docs.python.org/lib/logging-config-fileformat.html
 
 [loggers]
-keys = root, allura, sqlalchemy, paste, amqp, pylons, taskdstatus
+keys = root, allura, sqlalchemy, paste, amqp, pylons, taskdstatus, timermiddleware
 
 [handlers]
-keys = console, stats, taskdstatus
+keys = console, stats, taskdstatus, timermiddleware
 
 [formatters]
-keys = generic, stats
+keys = generic, stats, timermiddleware
 
 # If you create additional loggers, add them as a key to [loggers]
 [logger_root]
@@ -379,6 +379,12 @@ level = INFO
 qualname = taskdstatus
 handlers = taskdstatus
 
+[logger_timermiddleware]
+level = INFO
+handlers = timermiddleware
+qualname = stats
+propagate = 0
+
 # If you create additional handlers, add them as a key to [handlers]
 [handler_console]
 class = StreamHandler
@@ -398,6 +404,14 @@ args = ('taskd_status.log', 'a')
 level = NOTSET
 formatter = generic
 
+[handler_timermiddleware]
+class = handlers.WatchedFileHandler
+# if you run 'paster serve' in allura/Allura/ then that's where this file will be
+# you may want to hard-code a specific directory here.
+args = ('stats.log', 'a')
+level = NOTSET
+formatter = timermiddleware
+
 # If you create additional formatters, add them as a key to [formatters]
 [formatter_generic]
 format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
@@ -406,3 +420,7 @@ datefmt = %H:%M:%S
 [formatter_stats]
 format = %(asctime)s %(created)d %(kwpairs)s
 datefmt = %d/%b/%Y:%H:%M:%S UTC
+
+[formatter_timermiddleware]
+format = {"time": "%(asctime)s,%(msecs)03d", "level": "%(levelname)-5.5s", "name": "%(name)s", "message": %(message)s}
+datefmt = %Y-%m-%d %H:%M:%S
\ No newline at end of file


[25/50] git commit: [#6388] fix capitalization in module lookup

Posted by jo...@apache.org.
[#6388] fix capitalization in module lookup


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1bb460c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1bb460c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1bb460c6

Branch: refs/heads/cj/6992
Commit: 1bb460c6e7e4329ee0c698f04b28758231136d7b
Parents: 84d6afc
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Jan 2 15:50:57 2014 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:21 2014 +0000

----------------------------------------------------------------------
 AlluraTest/alluratest/controller.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1bb460c6/AlluraTest/alluratest/controller.py
----------------------------------------------------------------------
diff --git a/AlluraTest/alluratest/controller.py b/AlluraTest/alluratest/controller.py
index 62cc03c..0017c48 100644
--- a/AlluraTest/alluratest/controller.py
+++ b/AlluraTest/alluratest/controller.py
@@ -57,7 +57,7 @@ def get_config_file(config=None):
     try:
         conf_dir = tg.config.here
     except AttributeError:
-        conf_dir = pkg_resources.resource_filename('Allura', '..')
+        conf_dir = pkg_resources.resource_filename('allura', '..')
     return os.path.join(conf_dir, config)
 
 


[20/50] git commit: [#6388] add args, write to csv

Posted by jo...@apache.org.
[#6388] add args, write to csv


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1cff564a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1cff564a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1cff564a

Branch: refs/heads/cj/6992
Commit: 1cff564a94b62d093ca1347ee5d7a17b1678b5d6
Parents: dccd000
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri Dec 20 17:15:47 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:20 2014 +0000

----------------------------------------------------------------------
 scripts/perf/call_count.py | 54 +++++++++++++++++++++++++++++++++++------
 1 file changed, 46 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1cff564a/scripts/perf/call_count.py
----------------------------------------------------------------------
diff --git a/scripts/perf/call_count.py b/scripts/perf/call_count.py
index 718f5b0..0c93705 100755
--- a/scripts/perf/call_count.py
+++ b/scripts/perf/call_count.py
@@ -17,10 +17,12 @@
 #       specific language governing permissions and limitations
 #       under the License.
 
+import argparse
 import json
 import logging
 import random
 import string
+import csv
 
 from pylons import tmpl_context as c
 from testfixtures import LogCapture
@@ -36,12 +38,32 @@ from allura.tests.decorators import patch_middleware_config
 from forgewiki import model as WM
 
 
-def main():
+def parse_args():
+    parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter,
+                                     description='Count number of expensive calls (mongo, markdown, etc) for a standard page.')
+    parser.add_argument('--verbose', '-v', action='store_true', default=False,
+                        help='Show call details')
+    parser.add_argument('--debug-html', action='store_true', default=False,
+                        help='Save HTML responses as local files')
+    parser.add_argument('--data-file', default='call_counts.csv', type=argparse.FileType('a'),
+                        help='CSV file that is appended to')
+    parser.add_argument('--id', default='',
+                        help='An identifier for this run.  Examples:\n'
+                             '`git rev-parse --short HEAD` for current hash\n'
+                             '`git log -1 --oneline` for hash + message')
+    return parser.parse_args()
+
+
+def main(args):
     test = TestController()
     setup(test)
+
     url = generate_wiki_thread(test)
     ThreadLocalODMSession.close_all()  # make sure ODM sessions won't get re-used
-    load_page(test, url)
+
+    counts = count_page(test, url, verbose=args.verbose, debug_html=args.debug_html)
+    print json.dumps(counts)
+    write_csv(counts, args.id, args.data_file)
     test.tearDown()
 
 
@@ -67,7 +89,7 @@ def generate_wiki_thread(test):
 
     page = WM.Page.query.get(app_config_id=app.config._id, title='Home')
     thread = page.discussion_thread
-    # create 3 posts by 2 users
+    # create a few posts by a few users
     with push_config(c, user=M.User.query.get(username='test-admin'),
                         app=app,
                         project=project):
@@ -75,6 +97,8 @@ def generate_wiki_thread(test):
         thread.add_post(text="But it's not **super** helpful")
         with push_config(c, user=M.User.query.get(username='test-user')):
             thread.add_post(text='I disagree')
+        with push_config(c, user=M.User.query.get(username='test-user-1')):
+            thread.add_post(text='But what about foo?')
 
     ThreadLocalODMSession.flush_all()
 
@@ -82,7 +106,7 @@ def generate_wiki_thread(test):
     return url
 
 
-def load_page(test, url, verbose=False, debug_html=False):
+def count_page(test, url, verbose=False, debug_html=False):
 
     with LogCapture('stats') as stats, LogCapture('timermiddleware') as calls:
         resp = test.app.get(url, extra_environ=dict(username='*anonymous'))
@@ -97,10 +121,24 @@ def load_page(test, url, verbose=False, debug_html=False):
         for r in calls.records:
             print r.getMessage()
 
-    for r in stats.records:
-        timings = json.loads(r.getMessage())
-        print json.dumps(timings['call_counts'])
+    assert len(stats.records) == 1
+    timings = json.loads(stats.records[0].getMessage())
+    del timings['call_counts']['total']  # total is always 1, which is misleading
+    return timings['call_counts']
+
+
+def write_csv(counts, id, data_file):
+    cols = sorted(counts.keys())
+    row = counts
+    if id:
+        cols = ['id'] + cols
+        row = dict(counts, id=id)
+    csv_out = csv.DictWriter(data_file, cols)
+    if data_file.tell() == 0:
+        csv_out.writeheader()
+    csv_out.writerow(row)
+    data_file.close()
 
 
 if __name__ == '__main__':
-    main()
+    main(parse_args())


[41/50] git commit: [#5749] fix HTML bug; make default be an option for new milestones

Posted by jo...@apache.org.
[#5749] fix HTML bug; make default be an option for new milestones


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/515a7b1c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/515a7b1c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/515a7b1c

Branch: refs/heads/cj/6992
Commit: 515a7b1c8d860ca538bda985431438591ce1ee8c
Parents: c67efb5
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Dec 17 22:30:09 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:33:25 2014 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/templates/tracker/milestones.html | 7 ++++---
 ForgeTracker/forgetracker/tracker_main.py                   | 4 +++-
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/515a7b1c/ForgeTracker/forgetracker/templates/tracker/milestones.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/milestones.html b/ForgeTracker/forgetracker/templates/tracker/milestones.html
index 37bd20f..3dc748c 100644
--- a/ForgeTracker/forgetracker/templates/tracker/milestones.html
+++ b/ForgeTracker/forgetracker/templates/tracker/milestones.html
@@ -42,7 +42,7 @@
     <tbody>
       {% for m in milestones %}
       <tr class="{{loop.index0%2 and 'even' or ''}}">
-        <td><input type="radio" name="milestones-{{loop.index0}}.default" class="default-milestone" disabled="disabled" {%if m.default %} checked {%endif%}>
+        <td><input type="radio" name="milestones-{{loop.index0}}.default" class="default-milestone" disabled="disabled" {%if m.default %} checked {%endif%}></td>
         <td class="view">
           <input type="hidden" name="milestones-{{loop.index0}}.old_name" value="{{m.name}}">
           <strong><a href="{{c.app.url}}milestone/{{h.urlquote(m.name)}}/">{{m.name}}</a></strong></td>
@@ -75,6 +75,9 @@
       {% set num_milestones = milestones.__len__() %}
       <tr class="new_milestone" style="display:none">
         <td>
+            <input type="radio" name="milestones-{{num_milestones}}.default" class="default-milestone">
+        </td>
+        <td>
           <input type="hidden" name="milestones-{{num_milestones}}.old_name">
           <input type="text" name="milestones-{{num_milestones}}.new_name" placeholder="Title">
         </td>
@@ -163,5 +166,3 @@
   }
 </style>
 {% endblock %}
-
-

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/515a7b1c/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index ca3587f..34267cf 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -702,7 +702,9 @@ class RootController(BaseController, FeedController):
                             name=new['new_name'],
                             description = new['description'],
                             due_date = new['due_date'],
-                            complete = new['complete'] == 'Closed'))
+                            complete = new['complete'] == 'Closed',
+                            default = new.get('default', False),
+                        ))
                         update_counts = True
         if update_counts:
             c.app.globals.invalidate_bin_counts()


[34/50] git commit: [#5424] reorganize doc TOC, remove old stuff, add links to external documentation

Posted by jo...@apache.org.
[#5424] reorganize doc TOC, remove old stuff, add links to external documentation


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ea26b2a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ea26b2a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ea26b2a8

Branch: refs/heads/cj/6992
Commit: ea26b2a8a1f3d82f5a3478268eb1ab9f821bad1b
Parents: 6221342
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Nov 19 18:56:12 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:34 2014 +0000

----------------------------------------------------------------------
 Allura/docs/administration.rst      | 15 ++++++
 Allura/docs/index.rst               | 29 ++++-------
 Allura/docs/tutorials/tool.rst      | 58 +++++++++++++++++++++
 Allura/docs/tutorials/wiki-tool.rst | 87 --------------------------------
 4 files changed, 84 insertions(+), 105 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ea26b2a8/Allura/docs/administration.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/administration.rst b/Allura/docs/administration.rst
index 19c2e53..303d778 100644
--- a/Allura/docs/administration.rst
+++ b/Allura/docs/administration.rst
@@ -93,3 +93,18 @@ user closes it manually.  An `impressions` value of 0 will show the notification
 indefinitely (until closed).  The notification content can contain HTML.  Only the
 most recent notification will be shown, unless it has `active:false`, in which case
 no notification will be shown.
+
+
+Using Projects and Tools
+------------------------
+
+We currently don't have any further documentation for basic operations of managing
+users, projects, and tools on Allura.  However, SourceForge has help docs that cover
+these functions https://sourceforge.net/p/forge/documentation/Docs%20Home/  Note
+that this documentation also covers some SourceForge features that are not part of Allura.
+
+
+Public API Documentation
+------------------------
+
+Allura's web api is currently documented at https://sourceforge.net/p/forge/documentation/Allura%20API/

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ea26b2a8/Allura/docs/index.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/index.rst b/Allura/docs/index.rst
index ebbd0bf..81c4426 100644
--- a/Allura/docs/index.rst
+++ b/Allura/docs/index.rst
@@ -20,7 +20,7 @@
    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.
 
-Introducing the *Allura* Platform:
+Introduction
 =====================================================================
 
 .. toctree::
@@ -28,7 +28,7 @@ Introducing the *Allura* Platform:
 
    intro
 
-Getting Started
+Running Allura
 =====================================================================
 
 .. toctree::
@@ -36,29 +36,29 @@ Getting Started
 
    installation
    administration
-   platform_tour
    scm_host
    migration
 
-Writing a Allura based app
+Developing Allura
 =====================================================================
 
 .. toctree::
    :maxdepth: 3
 
-   tutorials/wiki-tool
+   platform
+   platform_tour
+   guides/message_bus
+   guides/email
+   guides/permissions
 
-Inside the Platform Components
+Extending Allura
 =====================================================================
 
 .. toctree::
    :maxdepth: 3
 
-   platform
-   guides/message_bus
-   guides/email
-   guides/permissions
    extending
+   tutorials/tool
 
 API Documentation
 ==================
@@ -69,19 +69,12 @@ API Documentation
 
    api/*
 
-Frequently Asked Questions
+Background Info
 =====================================================================
 .. toctree::
    :maxdepth: 1
 
    faq
-
-Project References
-=====================================================================
-
-.. toctree::
-   :maxdepth: 1
-
    online
 
 Indices and tables

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ea26b2a8/Allura/docs/tutorials/tool.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/tutorials/tool.rst b/Allura/docs/tutorials/tool.rst
new file mode 100644
index 0000000..2ab768d
--- /dev/null
+++ b/Allura/docs/tutorials/tool.rst
@@ -0,0 +1,58 @@
+..     Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+
+Creating your first Allura Tool
+=====================================================================
+
+Tim Van Steenburgh has written a `series of posts guiding you through
+writing an Allura tool <https://sourceforge.net/u/vansteenburgh/allura-plugin-development/>`_.
+There is also a `companion git repo <https://sourceforge.net/u/vansteenburgh/plugin-tutorial/ci/master/tree/>`_.
+
+
+Testing your Tool
+===========================
+
+Testing the controllers and models of an Allura tool is fairly
+straightforward.  Generally, you should follow the example of tests in the
+`allura/tests/functional` directory for controller tests and
+`allura.tests.model` for model tests.  For functional tests, the Allura platform
+provides a convenient "test harness" :class:`allura.controllers.test.TestController` controller
+class which is used as the application root for the
+:class:`allura.tests.TestController` class.
+
+In order to test your new tool controllers, you simply need to use the `self.app.get()`
+and `self.app.post()` methods of your test controller.  The test harness makes
+all the tools available in the system available under the URL /*entry point
+name*/.  So to test the :mod:`allura.ext.project_home` tool, for instance, we
+need only write the following::
+
+    from allura.tests import TestController
+
+    class TestProjectHome(TestController):
+
+        def test_home(self):
+            r = self.app.get('/home/')
+
+Whenever you use the :class:`allura.tests.TestController` app property, the
+test harness sets up the context so that `c.project` is always the
+`projects/test` project and whichever tool name you request is mounted at its
+entry point (so the Wiki tool will be mounted at /Wiki/).  `c.user` is always
+set to the `test-admin` user to avoid authentication issues.
+
+The framework used to generate the WSGI environment for testing your tools is
+provided by the `WebTest <http://pythonpaste.org/webtest/>`_ module, where you can
+find further documentation for the `.get()` and `.post()` methods.

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ea26b2a8/Allura/docs/tutorials/wiki-tool.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/tutorials/wiki-tool.rst b/Allura/docs/tutorials/wiki-tool.rst
deleted file mode 100644
index 1e5d4ff..0000000
--- a/Allura/docs/tutorials/wiki-tool.rst
+++ /dev/null
@@ -1,87 +0,0 @@
-..     Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
-
-Creating your first Allura Tool
-=====================================================================
-
-Adding your Allura Tool to a Allura Install
-=====================================================================
-
-Writing a Wiki Tool Part 1: Pages
-=====================================================================
-
-Writing a wiki Tool Part 2: Links
-=====================================================================
-
-Writing a wiki Tool Part 3: Revisions
-=====================================================================
-
-Testing your Tool
-===========================
-
-Testing the controllers and models of an Allura tool is fairly
-straightforward.  Generally, you should follow the example of tests in the
-`allura/tests/functional` directory for controller tests and
-`allura.tests.model` for model tests.  For functional tests, the Allura platform
-provides a convenient "test harness" :class:`allura.controllers.test.TestController` controller
-class which is used as the application root for the
-:class:`allura.tests.TestController` class.
-
-In order to test your new tool controllers, you simply need to use the `self.app.get()`
-and `self.app.post()` methods of your test controller.  The test harness makes
-all the tools available in the system available under the URL /*entry point
-name*/.  So to test the :mod:`allura.ext.project_home` tool, for instance, we
-need only write the following::
-
-    from allura.tests import TestController
-
-    class TestProjectHome(TestController):
-
-        def test_home(self):
-            r = self.app.get('/home/')
-
-Whenever you use the :class:`allura.tests.TestController` app property, the
-test harness sets up the context so that `c.project` is always the
-`projects/test` project and whichever tool name you request is mounted at its
-entry point (so the Wiki tool will be mounted at /Wiki/).  `c.user` is always
-set to the `test-admin` user to avoid authentication issues.
-
-The framework used to generate the WSGI environment for testing your tools is
-provided by the `WebTest <http://pythonpaste.org/webtest/>`_ module, where you can
-find further documentation for the `.get()` and `.post()` methods.
-
-Testing Allura models is also straightforward, though it usually requires
-setting the pylons context object `c` before your test.  An example of this
-technique follows::
-
-    import mock
-    from pylons import tmpl_context as c, app_globals as g
-
-    from allura.lib.app_globals import Globals
-    from allura import model as M
-
-    def setUp():
-        g._push_object(Globals())
-        c._push_object(mock.Mock())
-        g.set_project('projects/test')
-        g.set_app('hello')
-        c.user = M.User.query.get(username='test-admin')
-
-Testing the tasks and events is  similar to testing models.  Generally, you will
-simply want to call your `@task` and `@event_handler` methods directly rather
-than setting up a full mocking infrastructure, though it is possible to use the
-MonQTask model in the allura model if you wish to do more functional/integration testing.


[18/50] git commit: [#6388] remove unneeded special nbhd handling for tests

Posted by jo...@apache.org.
[#6388] remove unneeded special nbhd handling for tests

The special config tweaking inspired the creation of patch_middleware_config
but turned out to be all unneeded; tests pass without all this.


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/8ddd1432
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8ddd1432
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8ddd1432

Branch: refs/heads/cj/6992
Commit: 8ddd1432e100aeba4117342286d6405800795378
Parents: 497a734
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Dec 18 20:12:20 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:20 2014 +0000

----------------------------------------------------------------------
 .../controllers/basetest_neighborhood_root.py   | 191 -------------------
 .../tests/functional/test_neighborhood.py       |  14 +-
 2 files changed, 1 insertion(+), 204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8ddd1432/Allura/allura/controllers/basetest_neighborhood_root.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/basetest_neighborhood_root.py b/Allura/allura/controllers/basetest_neighborhood_root.py
deleted file mode 100644
index 6244645..0000000
--- a/Allura/allura/controllers/basetest_neighborhood_root.py
+++ /dev/null
@@ -1,191 +0,0 @@
-# -*- coding: utf-8 -*-
-
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-
-"""Main Controller"""
-import os
-import logging
-from urllib import unquote
-
-import pkg_resources
-from pylons import tmpl_context as c, app_globals as g
-from pylons import request, response
-from webob import exc
-from tg import expose, redirect
-from tg.decorators import without_trailing_slash
-
-import  ming.orm.ormsession
-
-import allura
-from allura.lib.base import WsgiDispatchController
-from allura.lib.security import require, require_authenticated, require_access, has_access
-from allura.lib import helpers as h
-from allura.lib import plugin
-from allura import model as M
-from .root import RootController
-from .project import NeighborhoodController, ProjectController
-from .auth import AuthController
-from .static import NewForgeController
-from .search import SearchController
-from .error import ErrorController
-from .rest import RestController
-
-__all__ = ['RootController']
-
-log = logging.getLogger(__name__)
-
-class BasetestNeighborhoodRootController(WsgiDispatchController, NeighborhoodController):
-    '''Root controller for testing -- it behaves just like a
-    NeighborhoodController for test/ except that all tools are mounted,
-    on-demand, at the mount point that is the same as their entry point
-    name.
-
-    Also, the test-admin is perpetually logged in here.
-
-    The name of this controller is dictated by the override_root setting
-    in development.ini and the magical import rules of TurboGears.  The
-    override_root setting has to match the name of this file, which has
-    to match (less underscores, case changes, and the addition of
-    "Controller") the name of this class.  It will then be registered
-    as the root controller instead of allura.controllers.root.RootController.
-    '''
-
-    def __init__(self):
-        for n in M.Neighborhood.query.find():
-            if n.url_prefix.startswith('//'): continue
-            n.bind_controller(self)
-        proxy_root = RootController()
-        self.dispatch = DispatchTest()
-        self.security = SecurityTests()
-        for attr in ('index', 'browse', 'auth', 'nf', 'error'):
-            setattr(self, attr, getattr(proxy_root, attr))
-        self.gsearch = proxy_root.search
-        self.rest = RestController()
-        p_nbhd = M.Neighborhood.query.get(name='Projects')
-        super(BasetestNeighborhoodRootController, self).__init__(p_nbhd)
-
-    def _setup_request(self):
-        pass
-
-    def _cleanup_request(self):
-        pass
-
-    @expose()
-    def _lookup(self, pname, *remainder):
-        pname = unquote(pname)
-        if not h.re_project_name.match(pname):
-            raise exc.HTTPNotFound, pname
-        project = M.Project.query.get(shortname=self.prefix + pname, neighborhood_id=self.neighborhood._id)
-        if project is None:
-            project = self.neighborhood.neighborhood_project
-            c.project = project
-            return ProjectController()._lookup(pname, *remainder)
-        if project.database_configured == False:
-            if remainder == ('user_icon',):
-                redirect(g.forge_static('images/user.png'))
-            elif c.user.username == pname:
-                log.info('Configuring %s database for access to %r',
-                         pname, remainder)
-                project.configure_project(is_user_project=True)
-            else:
-                raise exc.HTTPNotFound, pname
-        c.project = project
-        if project is None or (project.deleted and not has_access(c.project, 'update')()):
-            raise exc.HTTPNotFound, pname
-        if project.neighborhood.name != self.neighborhood_name:
-            redirect(project.url())
-        return ProjectController(), remainder
-
-    def __call__(self, environ, start_response):
-        c.app = None
-        c.user = plugin.AuthenticationProvider.get(request).by_username(
-            environ.get('username', 'test-admin'))
-        if not c.user:
-            c.user = M.User.anonymous()
-        return WsgiDispatchController.__call__(self, environ, start_response)
-
-class DispatchTest(object):
-
-    @expose()
-    def _lookup(self, *args):
-        if args:
-            return NamedController(args[0]), args[1:]
-        else:
-            raise exc.HTTPNotFound()
-
-class NamedController(object):
-
-    def __init__(self, name):
-        self.name = name
-
-    @expose()
-    def index(self, **kw):
-        return 'index ' + self.name
-
-    @expose()
-    def _default(self, *args):
-        return 'default(%s)(%r)' % (self.name, args)
-
-class SecurityTests(object):
-
-    @expose()
-    def _lookup(self, name, *args):
-        name = unquote(name)
-        if name == '*anonymous':
-            c.user = M.User.anonymous()
-        return SecurityTest(), args
-
-class SecurityTest(object):
-
-    def __init__(self):
-        from forgewiki import model as WM
-        c.app = c.project.app_instance('wiki')
-        self.page = WM.Page.query.get(app_config_id=c.app.config._id, title='Home')
-
-    @expose()
-    def forbidden(self):
-        require(lambda:False, 'Never allowed')
-        return ''
-
-    @expose()
-    def needs_auth(self):
-        require_authenticated()
-        return ''
-
-    @expose()
-    def needs_project_access_fail(self):
-        require_access(c.project, 'no_such_permission')
-        return ''
-
-    @expose()
-    def needs_project_access_ok(self):
-        pred = has_access(c.project, 'read')
-        if not pred():
-            log.info('Inside needs_project_access, c.user = %s' % c.user)
-        require(pred)
-        return ''
-
-    @expose()
-    def needs_artifact_access_fail(self):
-        require_access(self.page, 'no_such_permission')
-        return ''
-
-    @expose()
-    def needs_artifact_access_ok(self):
-        require_access(self.page, 'read')
-        return ''

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8ddd1432/Allura/allura/tests/functional/test_neighborhood.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_neighborhood.py b/Allura/allura/tests/functional/test_neighborhood.py
index 2b165a3..7fe3916 100644
--- a/Allura/allura/tests/functional/test_neighborhood.py
+++ b/Allura/allura/tests/functional/test_neighborhood.py
@@ -32,20 +32,8 @@ from allura.tests import TestController
 from allura.tests import decorators as td
 from allura.lib import helpers as h
 
-class TestNeighborhood(TestController):
 
-    def setUp(self):
-        # change the override_root config value to change which root controller the test uses
-        self._make_app = allura.config.middleware.make_app
-        def make_app(global_conf, full_stack=True, **app_conf):
-            app_conf['override_root'] = 'basetest_neighborhood_root'
-            return self._make_app(global_conf, full_stack, **app_conf)
-        allura.config.middleware.make_app = make_app
-        super(TestNeighborhood, self).setUp()
-
-    def tearDown(self):
-        super(TestNeighborhood, self).tearDown()
-        allura.config.middleware.make_app = self._make_app
+class TestNeighborhood(TestController):
 
     def test_home_project(self):
         r = self.app.get('/adobe/wiki/')


[03/50] git commit: [#4812] ticket:506 Removed form submit on enter for title field

Posted by jo...@apache.org.
[#4812] ticket:506 Removed form submit on enter for title field


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3a9db46f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3a9db46f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3a9db46f

Branch: refs/heads/cj/6992
Commit: 3a9db46fdc59ad97bb1b43349498a2705b9bd756
Parents: 8039b3d
Author: Yaroslav Sokolovsky <ya...@gmail.com>
Authored: Tue Dec 24 14:55:36 2013 +0200
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Wed Jan 1 05:35:37 2014 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/templates/tracker/new_ticket.html | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3a9db46f/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/new_ticket.html b/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
index 649bb6e..c984ecd 100644
--- a/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/new_ticket.html
@@ -55,7 +55,8 @@
 {% block extra_js %}
 <script type="text/javascript">
   $(document).ready(function(){
-    $('input[name="q"]').focus();
+    $('input[name="ticket_form.summary"]').focus();
   });
+  $('input[name="ticket_form.summary"]').keypress(function(event) { return event.keyCode != 13; });
 </script>
 {% endblock %}


[15/50] git commit: [#6388] don't instrument ming session.get

Posted by jo...@apache.org.
[#6388] don't instrument ming session.get

It is often a no-op, if the object is already in the identity map.  And
when it's not in the identity map and a mongo query does happen, its
covered by session.find instrumentation


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/b97e47f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b97e47f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b97e47f2

Branch: refs/heads/cj/6992
Commit: b97e47f27f54b3def8bddfd1a434b6f2c06fc841
Parents: ec1e8d0
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Dec 19 17:12:27 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:20 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/custom_middleware.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b97e47f2/Allura/allura/lib/custom_middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/custom_middleware.py b/Allura/allura/lib/custom_middleware.py
index 498a614..d7cbdc9 100644
--- a/Allura/allura/lib/custom_middleware.py
+++ b/Allura/allura/lib/custom_middleware.py
@@ -194,8 +194,7 @@ class AlluraTimerMiddleware(TimerMiddleware):
             Timer('markdown', markdown.Markdown, 'convert'),
             Timer('ming', ming.odm.odmsession.ODMCursor, 'next',  # FIXME: this may captures timings ok, but is misleading for counts
                   debug_each_call=False),
-            Timer('ming', ming.odm.odmsession.ODMSession, 'flush', 'find',
-                'get'),
+            Timer('ming', ming.odm.odmsession.ODMSession, 'flush', 'find'),
             Timer('ming', ming.schema.Document, 'validate',
                 debug_each_call=False),
             Timer('ming', ming.schema.FancySchemaItem, '_validate_required',


[28/50] git commit: [#5424] minor improvements to installation text

Posted by jo...@apache.org.
[#5424] minor improvements to installation text


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/81cf8e4d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/81cf8e4d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/81cf8e4d

Branch: refs/heads/cj/6992
Commit: 81cf8e4d95758841aac7284cc90400df3208e194
Parents: 58ab8ee
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Nov 19 17:25:52 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:33 2014 +0000

----------------------------------------------------------------------
 Allura/docs/installation.rst | 6 +++---
 INSTALL.markdown             | 5 ++---
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/81cf8e4d/Allura/docs/installation.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/installation.rst b/Allura/docs/installation.rst
index c8eba12..48d4eef 100644
--- a/Allura/docs/installation.rst
+++ b/Allura/docs/installation.rst
@@ -18,12 +18,12 @@
 Installation
 =================
 
-Easy Setup
+Installation
 ---------------
 
-Our easy setup instructions are in our INSTALL.markdown file.  You can read it online at https://forge-allura.apache.org/p/allura/git/ci/master/tree/INSTALL.markdown
+Our step-by-step setup instructions are in our INSTALL.markdown file.  You can read it online at https://forge-allura.apache.org/p/allura/git/ci/master/tree/INSTALL.markdown  You should be able to get Allura up and running in well under an hour by following those instructions.
 
-You should be able to get Allura up and running in well under an hour by following those instructions.
+For a faster and easier setup, see our `Vagrant/VirtualBox installation guide <https://forge-allura.apache.org/p/allura/wiki/Install%20and%20Run%20Allura%20-%20Vagrant/>`_
 
 Enabling inbound email
 ----------------------

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/81cf8e4d/INSTALL.markdown
----------------------------------------------------------------------
diff --git a/INSTALL.markdown b/INSTALL.markdown
index 000ce36..f8afa23 100644
--- a/INSTALL.markdown
+++ b/INSTALL.markdown
@@ -42,9 +42,7 @@ Before we begin, you'll need to install some system packages.
 
     ~$ sudo aptitude install git-core default-jre-headless python-dev libssl-dev libldap2-dev libsasl2-dev libjpeg8-dev zlib1g-dev
 
-To install MongoDB 2.2.3, follow the instructions here:
-
-   <http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/>
+To install MongoDB, follow the instructions here: <http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/>
 
 Optional, for SVN support:
 
@@ -148,6 +146,7 @@ register a new project in your own forge, visit /p/add_project
 
 * Read more documentation: <http://allura.sourceforge.net/docs/>
     * Including how to enable extra features: <http://allura.sourceforge.net/docs/installation.html>
+* Ask questions and discuss Allura on the <http://mail-archives.apache.org/mod_mbox/incubator-allura-dev/>
 * Run the test suite (slow): `$ ALLURA_VALIDATION=none ./run_tests`
 * File bug reports at <https://sourceforge.net/p/allura/tickets/new/> (login required)
 * Contribute code according to this guide: <https://forge-allura.apache.org/p/allura/wiki/Contributing%20Code/>


[07/50] git commit: [#6848] ticket:483 Delete trove migration scripts

Posted by jo...@apache.org.
[#6848] ticket:483 Delete trove migration scripts


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/350faaae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/350faaae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/350faaae

Branch: refs/heads/cj/6992
Commit: 350faaae13433e34f3b161aa9beacdf7ee933f0a
Parents: 77fb5d8
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri Dec 27 13:20:18 2013 +0200
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 14:52:06 2014 +0000

----------------------------------------------------------------------
 .../migrations/014-add-trove-category-agpl.py   |  39 ---
 .../migrations/016-add-trove-category-lppl.py   |  89 -------
 scripts/migrations/017-sync-trove-categories.py | 255 -------------------
 .../migrations/019-set-parent-only-troves.py    |  46 ----
 .../021-add-new-trove-license-categories.py     |  54 ----
 .../023-add-new-trove-license-category.py       |  38 ---
 .../migrations/030-set-trove-show_as_skill.py   |  38 ---
 7 files changed, 559 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/350faaae/scripts/migrations/014-add-trove-category-agpl.py
----------------------------------------------------------------------
diff --git a/scripts/migrations/014-add-trove-category-agpl.py b/scripts/migrations/014-add-trove-category-agpl.py
deleted file mode 100644
index 317cc0d..0000000
--- a/scripts/migrations/014-add-trove-category-agpl.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-
-import sys
-import logging
-
-from pylons import tmpl_context as c
-from ming.orm import session
-from ming.orm.ormsession import ThreadLocalORMSession
-
-from allura import model as M
-
-log = logging.getLogger(__name__)
-
-def main():
-    M.TroveCategory(trove_cat_id=670,
-                    trove_parent_id=14,
-                    shortname="agpl",
-                    fullname="Affero GNU Public License",
-                    fullpath="License :: OSI-Approved Open Source :: Affero GNU Public License")
-    ThreadLocalORMSession.flush_all()
-    ThreadLocalORMSession.close_all()
-
-if __name__ == '__main__':
-    main()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/350faaae/scripts/migrations/016-add-trove-category-lppl.py
----------------------------------------------------------------------
diff --git a/scripts/migrations/016-add-trove-category-lppl.py b/scripts/migrations/016-add-trove-category-lppl.py
deleted file mode 100644
index 642b61b..0000000
--- a/scripts/migrations/016-add-trove-category-lppl.py
+++ /dev/null
@@ -1,89 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-
-import sys
-import logging
-
-from pylons import tmpl_context as c
-from ming.orm import session
-from ming.orm.ormsession import ThreadLocalORMSession
-
-from allura import model as M
-
-log = logging.getLogger(__name__)
-
-def main():
-    M.TroveCategory(trove_cat_id=862,
-                    trove_parent_id=14,
-                    shortname="lppl",
-                    fullname="LaTeX Project Public License",
-                    fullpath="License :: OSI-Approved Open Source :: LaTeX Project Public License")
-    M.TroveCategory(trove_cat_id=655,
-                    trove_parent_id=432,
-                    shortname="win64",
-                    fullname="64-bit MS Windows",
-                    fullpath="Operating System :: Grouping and Descriptive Categories :: 64-bit MS Windows")
-    M.TroveCategory(trove_cat_id=657,
-                    trove_parent_id=418,
-                    shortname="vista",
-                    fullname="Vista",
-                    fullpath="Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Vista")
-    M.TroveCategory(trove_cat_id=851,
-                    trove_parent_id=418,
-                    shortname="win7",
-                    fullname="Windows 7",
-                    fullpath="Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Windows 7")
-    M.TroveCategory(trove_cat_id=728,
-                    trove_parent_id=315,
-                    shortname="android",
-                    fullname="Android",
-                    fullpath="Operating System :: Handheld/Embedded Operating Systems :: Android")
-    M.TroveCategory(trove_cat_id=780,
-                    trove_parent_id=315,
-                    shortname="ios",
-                    fullname="Apple iPhone",
-                    fullpath="Operating System :: Handheld/Embedded Operating Systems :: Apple iPhone")
-    M.TroveCategory(trove_cat_id=863,
-                    trove_parent_id=534,
-                    shortname="architects",
-                    fullname="Architects",
-                    fullpath="Intended Audience :: by End-User Class :: Architects")
-    M.TroveCategory(trove_cat_id=864,
-                    trove_parent_id=534,
-                    shortname="auditors",
-                    fullname="Auditors",
-                    fullpath="Intended Audience :: by End-User Class :: Auditors")
-    M.TroveCategory(trove_cat_id=865,
-                    trove_parent_id=534,
-                    shortname="testers",
-                    fullname="Testers",
-                    fullpath="Intended Audience :: by End-User Class :: Testers")
-    M.TroveCategory(trove_cat_id=866,
-                    trove_parent_id=534,
-                    shortname="secpros",
-                    fullname="Security Professionals",
-                    fullpath="Intended Audience :: by End-User Class :: Security Professionals")
-    M.TroveCategory(trove_cat_id=867,
-                    trove_parent_id=535,
-                    shortname="secindustry",
-                    fullname="Security",
-                    fullpath="Intended Audience :: by Industry or Sector :: Security")
-    ThreadLocalORMSession.flush_all()
-    ThreadLocalORMSession.close_all()
-
-if __name__ == '__main__':
-    main()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/350faaae/scripts/migrations/017-sync-trove-categories.py
----------------------------------------------------------------------
diff --git a/scripts/migrations/017-sync-trove-categories.py b/scripts/migrations/017-sync-trove-categories.py
deleted file mode 100644
index 0189d7f..0000000
--- a/scripts/migrations/017-sync-trove-categories.py
+++ /dev/null
@@ -1,255 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-
-import sys
-import logging
-
-from pylons import tmpl_context as c
-from ming.orm import session
-from ming.orm.ormsession import ThreadLocalORMSession
-
-from allura import model as M
-
-log = logging.getLogger(__name__)
-
-def create_trove_cat(cat_data):
-    M.TroveCategory(trove_cat_id=cat_data[0], trove_parent_id=cat_data[1],
-                    shortname=cat_data[2], fullname=cat_data[3], fullpath=cat_data[4])
-
-def main():
-    create_trove_cat((639,14,"cpal","Common Public Attribution License 1.0 (CPAL)","License :: OSI-Approved Open Source :: Common Public Attribution License 1.0 (CPAL)"))
-    create_trove_cat((640,99,"dvd","DVD","Topic :: Multimedia :: DVD"))
-    create_trove_cat((641,576,"workflow","Workflow","Topic :: Office/Business :: Enterprise :: Workflow"))
-    create_trove_cat((642,292,"linuxdrivers","Linux","Topic :: System :: Hardware :: Hardware Drivers :: Linux"))
-    create_trove_cat((643,582,"uml","UML","Topic :: Software Development :: Design :: UML"))
-    create_trove_cat((644,92,"cms","CMS Systems","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CMS Systems"))
-    create_trove_cat((645,92,"blogging","Blogging","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Blogging"))
-    create_trove_cat((646,52,"subversion","Subversion","Topic :: Software Development :: Version Control :: Subversion"))
-    create_trove_cat((647,612,"webservices","Web Services","Topic :: Formats and Protocols :: Protocols :: Web Services"))
-    create_trove_cat((648,554,"json","JSON","Topic :: Formats and Protocols :: Data Formats :: JSON"))
-    create_trove_cat((649,100,"imagegalleries","Image Galleries","Topic :: Multimedia :: Graphics :: Image Galleries"))
-    create_trove_cat((650,612,"ajax","AJAX","Topic :: Formats and Protocols :: Protocols :: AJAX"))
-    create_trove_cat((651,92,"wiki","Wiki","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Wiki"))
-    create_trove_cat((652,45,"appservers","Application Servers","Topic :: Software Development :: Application Servers"))
-    create_trove_cat((653,20,"rssreaders","RSS Feed Readers","Topic :: Communications :: RSS Feed Readers"))
-    create_trove_cat((654,129,"ecommerce","E-Commerce / Shopping","Topic :: Office/Business :: E-Commerce / Shopping"))
-    create_trove_cat((656,99,"htpc","Home Theater PC","Topic :: Multimedia :: Home Theater PC"))
-    create_trove_cat((658,22,"jabber","Jabber","Topic :: Communications :: Chat :: Jabber"))
-    create_trove_cat((659,576,"enterprisebpm","Business Performance Management","Topic :: Office/Business :: Enterprise :: Business Performance Management"))
-    create_trove_cat((660,576,"enterprisebi","Business Intelligence","Topic :: Office/Business :: Enterprise :: Business Intelligence"))
-    create_trove_cat((661,75,"budgetingandforecasting","Budgeting and Forecasting","Topic :: Office/Business :: Financial :: Budgeting and Forecasting"))
-    create_trove_cat((662,497,"ingres","Ingres","Database Environment :: Network-based DBMS :: Ingres"))
-    create_trove_cat((663,92,"socialnetworking","Social Networking","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Social Networking"))
-    create_trove_cat((664,199,"virtualization","Virtualization","Operating System :: Virtualization"))
-    create_trove_cat((665,664,"vmware","VMware","Operating System :: Virtualization :: VMware"))
-    create_trove_cat((666,664,"xen","Xen","Operating System :: Virtualization :: Xen"))
-    create_trove_cat((667,247,"voip","VoIP","Topic :: Communications :: Telephony :: VoIP"))
-    create_trove_cat((668,92,"ticketing","Ticketing Systems","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Ticketing Systems"))
-    create_trove_cat((669,315,"blackberryos","Blackberry RIM OS","Operating System :: Handheld/Embedded Operating Systems :: Blackberry RIM OS"))
-    create_trove_cat((671,14,"ms-pl","Microsoft Public License","License :: OSI-Approved Open Source :: Microsoft Public License"))
-    create_trove_cat((672,14,"ms-rl","Microsoft Reciprocal License","License :: OSI-Approved Open Source :: Microsoft Reciprocal License"))
-    create_trove_cat((673,576,"bsm","Business Service Management","Topic :: Office/Business :: Enterprise :: Business Service Management"))
-    create_trove_cat((674,673,"servicesupport","Service Support","Topic :: Office/Business :: Enterprise :: Business Service Management :: Service Support"))
-    create_trove_cat((675,673,"serviceassurance","Service Assurance","Topic :: Office/Business :: Enterprise :: Business Service Management :: Service Assurance"))
-    create_trove_cat((676,673,"serviceautomation","Service Automation","Topic :: Office/Business :: Enterprise :: Business Service Management :: Service Automation"))
-    create_trove_cat((677,14,"artisticv2","Artistic License 2.0","License :: OSI-Approved Open Source :: Artistic License 2.0"))
-    create_trove_cat((678,14,"boostlicense","Boost Software License (BSL1.0)","License :: OSI-Approved Open Source :: Boost Software License (BSL1.0)"))
-    create_trove_cat((679,14,"gplv3","GNU General Public License version 3.0 (GPLv3)","License :: OSI-Approved Open Source :: GNU General Public License version 3.0 (GPLv3)"))
-    create_trove_cat((680,14,"lgplv3","GNU Library or ""Lesser"" General Public License version 3.0 (LGPLv3)","License :: OSI-Approved Open Source :: GNU Library or ""Lesser"" General Public License version 3.0 (LGPLv3)"))
-    create_trove_cat((681,14,"isclicense","ISC License","License :: OSI-Approved Open Source :: ISC License"))
-    create_trove_cat((682,14,"multicslicense","Multics License","License :: OSI-Approved Open Source :: Multics License"))
-    create_trove_cat((683,14,"ntplicense","NTP License","License :: OSI-Approved Open Source :: NTP License"))
-    create_trove_cat((684,14,"nposl3","Non-Profit Open Software License 3.0 (Non-Profit OSL 3.0)","License :: OSI-Approved Open Source :: Non-Profit Open Software License 3.0 (Non-Profit OSL 3.0)"))
-    create_trove_cat((685,14,"rpl15","Reciprocal Public License 1.5 (RPL1.5)","License :: OSI-Approved Open Source :: Reciprocal Public License 1.5 (RPL1.5)"))
-    create_trove_cat((686,14,"splicense2","Simple Public License 2.0","License :: OSI-Approved Open Source :: Simple Public License 2.0"))
-    create_trove_cat((687,673,"cmdb","Configuration Management Database (CMDB)","Topic :: Office/Business :: Enterprise :: Business Service Management :: Configuration Management Database (CMDB)"))
-    create_trove_cat((688,18,"mobileapps","Mobile","Topic :: Mobile"))
-    create_trove_cat((689,315,"winmobile","Windows Mobile","Operating System :: Handheld/Embedded Operating Systems :: Windows Mobile"))
-    create_trove_cat((690,315,"brew","BREW (Binary Runtime Environment for Wireless)","Operating System :: Handheld/Embedded Operating Systems :: BREW (Binary Runtime Environment for Wireless)"))
-    create_trove_cat((691,315,"j2me","J2ME (Java Platform, Micro Edition)","Operating System :: Handheld/Embedded Operating Systems :: J2ME (Java Platform, Micro Edition)"))
-    create_trove_cat((692,315,"maemo","Maemo","Operating System :: Handheld/Embedded Operating Systems :: Maemo"))
-    create_trove_cat((693,315,"limo","LiMo (Linux Mobile)","Operating System :: Handheld/Embedded Operating Systems :: LiMo (Linux Mobile)"))
-    create_trove_cat((694,160,"clean","Clean","Programming Language :: Clean"))
-    create_trove_cat((695,160,"lasso","Lasso","Programming Language :: Lasso"))
-    create_trove_cat((696,160,"turing","Turing","Programming Language :: Turing"))
-    create_trove_cat((697,160,"glsl","GLSL (OpenGL Shading Language)","Programming Language :: GLSL (OpenGL Shading Language)"))
-    create_trove_cat((698,160,"lazarus","Lazarus","Programming Language :: Lazarus"))
-    create_trove_cat((699,160,"freepascal","Free Pascal","Programming Language :: Free Pascal"))
-    create_trove_cat((700,160,"scriptol","Scriptol","Programming Language :: Scriptol"))
-    create_trove_cat((701,160,"pl-i","PL/I (Programming Language One)","Programming Language :: PL/I (Programming Language One)"))
-    create_trove_cat((702,160,"oz","Oz","Programming Language :: Oz"))
-    create_trove_cat((703,160,"limbo","Limbo","Programming Language :: Limbo"))
-    create_trove_cat((704,160,"scala","Scala","Programming Language :: Scala"))
-    create_trove_cat((705,160,"blitzmax","BlitzMax","Programming Language :: BlitzMax"))
-    create_trove_cat((706,160,"xbaseclipper","XBase/Clipper","Programming Language :: XBase/Clipper"))
-    create_trove_cat((707,160,"curl","Curl","Programming Language :: Curl"))
-    create_trove_cat((708,160,"flex","Flex","Programming Language :: Flex"))
-    create_trove_cat((709,160,"mathematica","Mathematica","Programming Language :: Mathematica"))
-    create_trove_cat((710,160,"visualdataflex","Visual DataFlex","Programming Language :: Visual DataFlex"))
-    create_trove_cat((711,160,"fenix","Fenix","Programming Language :: Fenix"))
-    create_trove_cat((713,456,"vexi","Vexi","User Interface :: Graphical :: Vexi"))
-    create_trove_cat((714,160,"kaya","Kaya","Programming Language :: Kaya"))
-    create_trove_cat((715,160,"transcript-revolution","Transcript/Revolution","Programming Language :: Transcript/Revolution"))
-    create_trove_cat((716,160,"haXe","haXe","Programming Language :: haXe"))
-    create_trove_cat((717,160,"proglangmeta","Project is a programming language","Programming Language :: Project is a programming language"))
-    create_trove_cat((718,634,"msxb360","Microsoft Xbox 360","Operating System :: Other Operating Systems :: Console-based Platforms :: Microsoft Xbox 360"))
-    create_trove_cat((719,634,"nintendogc","Nintendo GameCube","Operating System :: Other Operating Systems :: Console-based Platforms :: Nintendo GameCube"))
-    create_trove_cat((720,634,"nintendowii","Nintendo Wii","Operating System :: Other Operating Systems :: Console-based Platforms :: Nintendo Wii"))
-    create_trove_cat((721,634,"sonyps3","Sony PlayStation 3","Operating System :: Other Operating Systems :: Console-based Platforms :: Sony PlayStation 3"))
-    create_trove_cat((722,634,"sonypsp","Sony PlayStation Portable (PSP)","Operating System :: Other Operating Systems :: Console-based Platforms :: Sony PlayStation Portable (PSP)"))
-    create_trove_cat((723,160,"scilab","Scilab","Programming Language :: Scilab"))
-    create_trove_cat((724,160,"scicos","Scicos","Programming Language :: Scicos"))
-    create_trove_cat((725,534,"management","Management","Intended Audience :: by End-User Class :: Management"))
-    create_trove_cat((726,71,"edadministration","Administration","Topic :: Education :: Administration"))
-    create_trove_cat((727,97,"mechcivileng","Mechanical and Civil Engineering","Topic :: Scientific/Engineering :: Mechanical and Civil Engineering"))
-    create_trove_cat((729,535,"audienceengineering","Engineering","Intended Audience :: by Industry or Sector :: Engineering"))
-    create_trove_cat((730,274,"basque","Basque (Euskara)","Translations :: Basque (Euskara)"))
-    create_trove_cat((731,14,"classpath","GNU General Public License with Classpath exception (Classpath::License)","License :: OSI-Approved Open Source :: GNU General Public License with Classpath exception (Classpath::License)"))
-    create_trove_cat((732,727,"caddcam","Computer-aided technologies (CADD/CAM/CAE)","Topic :: Scientific/Engineering :: Mechanical and Civil Engineering :: Computer-aided technologies (CADD/CAM/CAE)"))
-    create_trove_cat((733,576,"humanresources","Human Resources","Topic :: Office/Business :: Enterprise :: Human Resources"))
-    create_trove_cat((734,554,"mcml","Media Center Markup Language (MCML)","Topic :: Formats and Protocols :: Data Formats :: Media Center Markup Language (MCML)"))
-    create_trove_cat((735,461,"nsis","Nullsoft Scriptable Install System (NSIS)","User Interface :: Plugins :: Nullsoft Scriptable Install System (NSIS)"))
-    create_trove_cat((736,97,"scada","SCADA","Topic :: Scientific/Engineering :: SCADA"))
-    create_trove_cat((737,461,"autohotkey","AutoHotkey","User Interface :: Plugins :: AutoHotkey"))
-    create_trove_cat((738,160,"autoit","AutoIt","Programming Language :: AutoIt"))
-    create_trove_cat((739,132,"humanitarianism","Humanitarianism","Topic :: Religion and Philosophy :: Humanitarianism"))
-    create_trove_cat((740,129,"insurance","Insurance","Topic :: Office/Business :: Insurance"))
-    create_trove_cat((741,97,"linguistics","Linguistics","Topic :: Scientific/Engineering :: Linguistics"))
-    create_trove_cat((742,741,"machinetranslation","Machine Translation","Topic :: Scientific/Engineering :: Linguistics :: Machine Translation"))
-    create_trove_cat((743,43,"antispam","Anti-Spam","Topic :: Security :: Anti-Spam"))
-    create_trove_cat((744,43,"antivirus","Anti-Virus","Topic :: Security :: Anti-Virus"))
-    create_trove_cat((745,43,"antimalware","Anti-Malware","Topic :: Security :: Anti-Malware"))
-    create_trove_cat((746,554,"autocaddxf","AutoCAD DXF","Topic :: Formats and Protocols :: Data Formats :: AutoCAD DXF"))
-    create_trove_cat((747,75,"billing","Billing","Topic :: Office/Business :: Financial :: Billing"))
-    create_trove_cat((748,576,"processmanagement","Business Process Management","Topic :: Office/Business :: Enterprise :: Business Process Management"))
-    create_trove_cat((749,136,"embedded","Embedded systems","Topic :: System :: Embedded systems"))
-    create_trove_cat((750,456,"magicui","Magic User Interface (MUI)","User Interface :: Graphical :: Magic User Interface (MUI)"))
-    create_trove_cat((751,237,"xul","XUL","User Interface :: Web-based :: XUL"))
-    create_trove_cat((752,80,"flightsim","Flight simulator","Topic :: Games/Entertainment :: Flight simulator"))
-    create_trove_cat((753,63,"vivim","Vi/Vim","Topic :: Text Editors :: Vi/Vim"))
-    create_trove_cat((754,45,"sourceanalysis","Source code analysis","Topic :: Software Development :: Source code analysis"))
-    create_trove_cat((755,45,"sourcebrowsing","Source code browsing","Topic :: Software Development :: Source code browsing"))
-    create_trove_cat((756,576,"plm","Product lifecycle management (PLM)","Topic :: Office/Business :: Enterprise :: Product lifecycle management (PLM)"))
-    create_trove_cat((757,274,"breton","Breton","Translations :: Breton"))
-    create_trove_cat((758,498,"db4o","db4objects (db4o)","Database Environment :: File-based DBMS :: db4objects (db4o)"))
-    create_trove_cat((759,497,"nexusdb","NexusDB","Database Environment :: Network-based DBMS :: NexusDB"))
-    create_trove_cat((760,160,"prism","Prism","Programming Language :: Prism"))
-    create_trove_cat((761,45,"collaborative","Collaborative development tools","Topic :: Software Development :: Collaborative development tools"))
-    create_trove_cat((762,91,"pluginsaddons","Plugins and add-ons","Topic :: Internet :: WWW/HTTP :: Browsers :: Plugins and add-ons"))
-    create_trove_cat((763,456,"winaero","Windows Aero","User Interface :: Graphical :: Windows Aero"))
-    create_trove_cat((764,45,"agile","Agile development tools","Topic :: Software Development :: Agile development tools"))
-    create_trove_cat((765,535,"agriculture","Agriculture","Intended Audience :: by Industry or Sector :: Agriculture"))
-    create_trove_cat((766,100,"animation","Animation","Topic :: Multimedia :: Graphics :: Animation"))
-    create_trove_cat((767,45,"assemblers","Assemblers","Topic :: Software Development :: Assemblers"))
-    create_trove_cat((768,535,"automotive","Automotive","Intended Audience :: by Industry or Sector :: Automotive"))
-    create_trove_cat((769,554,"CSV","Comma-separated values (CSV)","Topic :: Formats and Protocols :: Data Formats :: Comma-separated values (CSV)"))
-    create_trove_cat((770,45,"softdevlibraries","Libraries","Topic :: Software Development :: Libraries"))
-    create_trove_cat((771,45,"sourcereview","Source code review","Topic :: Software Development :: Source code review"))
-    create_trove_cat((772,80,"hobbies","Hobbies","Topic :: Games/Entertainment :: Hobbies"))
-    create_trove_cat((773,772,"collectionmanage","Collection management","Topic :: Games/Entertainment :: Hobbies :: Collection management"))
-    create_trove_cat((774,80,"multiplayer","Multiplayer","Topic :: Games/Entertainment :: Multiplayer"))
-    create_trove_cat((775,80,"mmorpg","MMORPG","Topic :: Games/Entertainment :: MMORPG"))
-    create_trove_cat((776,97,"mapping","Mapping","Topic :: Scientific/Engineering :: Mapping"))
-    create_trove_cat((777,776,"gps","GPS (Global Positioning System)","Topic :: Scientific/Engineering :: Mapping :: GPS (Global Positioning System)"))
-    create_trove_cat((778,43,"passwordmanage","Password manager","Topic :: Security :: Password manager"))
-    create_trove_cat((779,315,"linksyswrt54g","Linksys WRT54G series","Operating System :: Handheld/Embedded Operating Systems :: Linksys WRT54G series"))
-    create_trove_cat((781,576,"medhealth","Medical/Healthcare","Topic :: Office/Business :: Enterprise :: Medical/Healthcare"))
-    create_trove_cat((782,45,"bined","Binary editors","Topic :: Software Development :: Binary editors"))
-    create_trove_cat((783,99,"mmcatalog","Cataloguing","Topic :: Multimedia :: Cataloguing"))
-    create_trove_cat((784,113,"composition","Composition","Topic :: Multimedia :: Sound/Audio :: Composition"))
-    create_trove_cat((785,772,"cooking","Cooking","Topic :: Games/Entertainment :: Hobbies :: Cooking"))
-    create_trove_cat((786,136,"cron","Cron and scheduling","Topic :: System :: Cron and scheduling"))
-    create_trove_cat((787,638,"recovery","Data recovery","Topic :: System :: Storage :: Data recovery"))
-    create_trove_cat((788,87,"otherfile","Other file transfer protocol","Topic :: Internet :: Other file transfer protocol"))
-    create_trove_cat((789,581,"digpreserve","Digital preservation","Topic :: Education :: Library :: Digital preservation"))
-    create_trove_cat((790,251,"directconnect","Direct Connect","Topic :: Communications :: File Sharing :: Direct Connect"))
-    create_trove_cat((791,129,"dtp","Desktop Publishing","Topic :: Office/Business :: Desktop Publishing"))
-    create_trove_cat((792,580,"etl","ETL","Topic :: Office/Business :: Enterprise :: Data Warehousing :: ETL"))
-    create_trove_cat((793,55,"fonts","Fonts","Topic :: Desktop Environment :: Fonts"))
-    create_trove_cat((794,80,"gameframeworks","Game development framework","Topic :: Games/Entertainment :: Game development framework"))
-    create_trove_cat((795,100,"handrec","Handwriting recognition","Topic :: Multimedia :: Graphics :: Handwriting recognition"))
-    create_trove_cat((796,136,"homeauto","Home Automation","Topic :: System :: Home Automation"))
-    create_trove_cat((797,63,"translation","Computer Aided Translation (CAT)","Topic :: Text Editors :: Computer Aided Translation (CAT)"))
-    create_trove_cat((798,136,"osdistro","OS distribution","Topic :: System :: OS distribution"))
-    create_trove_cat((799,798,"livecd","Live CD","Topic :: System :: OS distribution :: Live CD"))
-    create_trove_cat((800,497,"lotusnotes","Lotus Notes/Domino","Database Environment :: Network-based DBMS :: Lotus Notes/Domino"))
-    create_trove_cat((801,160,"lotusscript","LotusScript","Programming Language :: LotusScript"))
-    create_trove_cat((802,133,"machinelearning","Machine Learning","Topic :: Scientific/Engineering :: Artificial Intelligence :: Machine Learning"))
-    create_trove_cat((803,106,"metadata","Metadata editors","Topic :: Multimedia :: Graphics :: Editors :: Metadata editors"))
-    create_trove_cat((804,236,"riscos","RISC OS","Operating System :: Other Operating Systems :: RISC OS"))
-    create_trove_cat((805,282,"politics","Politics","Topic :: Social sciences :: Politics"))
-    create_trove_cat((806,80,"sports","Sports","Topic :: Games/Entertainment :: Sports"))
-    create_trove_cat((807,282,"psychology","Psychology","Topic :: Social sciences :: Psychology"))
-    create_trove_cat((808,458,"ogre3d","Ogre3D","User Interface :: Toolkits/Libraries :: Ogre3D"))
-    create_trove_cat((809,45,"orm","ORM (Object-relational mapping)","Topic :: Software Development :: ORM (Object-relational mapping)"))
-    create_trove_cat((810,575,"perftest","Performance Testing","Topic :: Software Development :: Testing :: Performance Testing"))
-    create_trove_cat((811,75,"personalfinance","Personal finance","Topic :: Office/Business :: Financial :: Personal finance"))
-    create_trove_cat((812,499,"pearmdb2","PHP Pear::MDB2","Database Environment :: Database API :: PHP Pear::MDB2"))
-    create_trove_cat((813,461,"intellij","IntelliJ","User Interface :: Plugins :: IntelliJ"))
-    create_trove_cat((814,554,"postscript","PostScript","Topic :: Formats and Protocols :: Data Formats :: PostScript"))
-    create_trove_cat((815,100,"fractals","Fractals and Procedural Generation","Topic :: Multimedia :: Graphics :: Fractals and Procedural Generation"))
-    create_trove_cat((816,554,"w3cvoice","W3C Voice","Topic :: Formats and Protocols :: Data Formats :: W3C Voice"))
-    create_trove_cat((817,97,"quantumcomp","Quantum Computing","Topic :: Scientific/Engineering :: Quantum Computing"))
-    create_trove_cat((818,129,"reportgen","Report Generators","Topic :: Office/Business :: Report Generators"))
-    create_trove_cat((819,581,"research","Research","Topic :: Education :: Library :: Research"))
-    create_trove_cat((820,87,"ssh","SSH (Secure SHell)","Topic :: Internet :: SSH (Secure SHell)"))
-    create_trove_cat((821,554,"semantic","Semantic Web (RDF, OWL, etc.)","Topic :: Formats and Protocols :: Data Formats :: Semantic Web (RDF, OWL, etc.)"))
-    create_trove_cat((822,90,"socialbookmarking","Social Bookmarking","Topic :: Internet :: WWW/HTTP :: Social Bookmarking"))
-    create_trove_cat((823,20,"synchronization","Synchronization","Topic :: Communications :: Synchronization"))
-    create_trove_cat((824,45,"templates","Templates","Topic :: Software Development :: Templates"))
-    create_trove_cat((825,97,"testmeasure","Test and Measurement","Topic :: Scientific/Engineering :: Test and Measurement"))
-    create_trove_cat((826,98,"statistics","Statistics","Topic :: Scientific/Engineering :: Mathematics :: Statistics"))
-    create_trove_cat((827,129,"knowledgemanagement","Knowledge Management","Topic :: Office/Business :: Knowledge Management"))
-    create_trove_cat((828,147,"unattended","Unattended","Topic :: System :: Installation/Setup :: Unattended"))
-    create_trove_cat((829,457,"emailinterface","Email-based interface","User Interface :: Textual :: Email-based interface"))
-    create_trove_cat((830,282,"voting","Voting","Topic :: Social sciences :: Voting"))
-    create_trove_cat((831,27,"webconferencing","Web Conferencing","Topic :: Communications :: Conferencing :: Web Conferencing"))
-    create_trove_cat((832,27,"videoconferencing","Video Conferencing","Topic :: Communications :: Conferencing :: Video Conferencing"))
-    create_trove_cat((833,160,"objectivec2","Objective-C 2.0","Programming Language :: Objective-C 2.0"))
-    create_trove_cat((834,274,"georgian","Georgian","Translations :: Georgian"))
-    create_trove_cat((835,499,"adonet","ADO.NET","Database Environment :: Database API :: ADO.NET"))
-    create_trove_cat((836,554,"xbrl","XBRL","Topic :: Formats and Protocols :: Data Formats :: XBRL"))
-    create_trove_cat((837,461,"excel","Excel","User Interface :: Plugins :: Excel"))
-    create_trove_cat((838,160,"visualbasicforapplications","Visual Basic for Applications (VBA)","Programming Language :: Visual Basic for Applications (VBA)"))
-    create_trove_cat((839,160,"booprogramminglang","Boo","Programming Language :: Boo"))
-    create_trove_cat((840,52,"git","Git","Topic :: Software Development :: Version Control :: Git"))
-    create_trove_cat((841,52,"mercurial","Mercurial","Topic :: Software Development :: Version Control :: Mercurial"))
-    create_trove_cat((842,52,"bazaar","Bazaar","Topic :: Software Development :: Version Control :: Bazaar"))
-    create_trove_cat((843,14,"eupublicense","European Union Public License","License :: OSI-Approved Open Source :: European Union Public License"))
-    create_trove_cat((844,14,"ipafontlicense","IPA Font License","License :: OSI-Approved Open Source :: IPA Font License"))
-    create_trove_cat((845,14,"miroslicense","MirOS License","License :: OSI-Approved Open Source :: MirOS License"))
-    create_trove_cat((846,14,"openfontlicense11","Open Font License 1.1 (OFL 1.1)","License :: OSI-Approved Open Source :: Open Font License 1.1 (OFL 1.1)"))
-    create_trove_cat((847,80,"realtimetactical","Real Time Tactical","Topic :: Games/Entertainment :: Real Time Tactical"))
-    create_trove_cat((848,160,"algol68","ALGOL 68","Programming Language :: ALGOL 68"))
-    create_trove_cat((849,92,"groupware","Groupware","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Groupware"))
-    create_trove_cat((850,576,"businesscontinuity","Business Continuity","Topic :: Office/Business :: Enterprise :: Business Continuity"))
-    create_trove_cat((852,554,"teiformat","TEI","Topic :: Formats and Protocols :: Data Formats :: TEI"))
-    create_trove_cat((853,160,"clarion","Clarion","Programming Language :: Clarion"))
-    create_trove_cat((854,576,"sales","Sales","Topic :: Office/Business :: Enterprise :: Sales"))
-    create_trove_cat((855,97,"buildingauto","Building Automation","Topic :: Scientific/Engineering :: Building Automation"))
-    create_trove_cat((856,129,"businessmodelling","Modelling","Topic :: Office/Business :: Modelling"))
-    create_trove_cat((857,150,"routing","Routing","Topic :: System :: Networking :: Routing"))
-    create_trove_cat((858,97,"medicalphysics","Medical Physics","Topic :: Scientific/Engineering :: Medical Physics"))
-    create_trove_cat((859,71,"edlanguage","Languages","Topic :: Education :: Languages"))
-    create_trove_cat((860,97,"molecularmech","Molecular Mechanics","Topic :: Scientific/Engineering :: Molecular Mechanics"))
-    create_trove_cat((861,148,"loganalysis","Log Analysis","Topic :: System :: Logging :: Log Analysis"))
-
-    ThreadLocalORMSession.flush_all()
-    ThreadLocalORMSession.close_all()
-
-if __name__ == '__main__':
-    main()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/350faaae/scripts/migrations/019-set-parent-only-troves.py
----------------------------------------------------------------------
diff --git a/scripts/migrations/019-set-parent-only-troves.py b/scripts/migrations/019-set-parent-only-troves.py
deleted file mode 100644
index f1276c7..0000000
--- a/scripts/migrations/019-set-parent-only-troves.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-
-import logging
-
-from tg import config
-
-from ming.orm import ThreadLocalORMSession
-
-import sfx
-from allura import model as M
-from allura.lib import helpers as h
-from sfx.model import tables as T
-
-log = logging.getLogger(__name__)
-
-def main():
-    sfx.middleware.configure_databases(h.config_with_prefix(config, 'sfx.'))
-    parent_only_troves = T.trove_cat.select(T.trove_cat.c.parent_only==1).execute()
-    parent_only_ids = [t.trove_cat_id for t in parent_only_troves]
-    allura_troves = M.TroveCategory.query.find(dict(
-        trove_cat_id={'$in': parent_only_ids})).all()
-    print 'Found %s parent-only troves in alexandria.' % len(parent_only_ids)
-    print 'Setting parent-only Allura troves...'
-    for t in allura_troves:
-        print ' %s: %s' % (t.trove_cat_id, t.fullpath)
-        t.parent_only = True
-    print 'Updated %s Allura troves.' % len(allura_troves)
-    ThreadLocalORMSession.flush_all()
-
-if __name__ == '__main__':
-    main()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/350faaae/scripts/migrations/021-add-new-trove-license-categories.py
----------------------------------------------------------------------
diff --git a/scripts/migrations/021-add-new-trove-license-categories.py b/scripts/migrations/021-add-new-trove-license-categories.py
deleted file mode 100644
index d3f96fa..0000000
--- a/scripts/migrations/021-add-new-trove-license-categories.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-
-import sys
-import logging
-
-from ming.orm.ormsession import ThreadLocalORMSession
-
-from allura import model as M
-
-log = logging.getLogger(__name__)
-
-def create_trove_cat(cat_data):
-    M.TroveCategory(trove_cat_id=cat_data[0], trove_parent_id=cat_data[1],
-                    shortname=cat_data[2], fullname=cat_data[3], fullpath=cat_data[4])
-
-def update_trove_cat(trove_cat_id, attr_dict):
-    t = M.TroveCategory.query.get(trove_cat_id=trove_cat_id)
-    if not t:
-        sys.exit("Couldn't find TroveCategory with trove_cat_id=%s" % trove_cat_id)
-    for k, v in attr_dict.iteritems():
-        setattr(t, k, v)
-
-def main():
-    update_trove_cat(16, dict(fullname="GNU Library or Lesser General Public License version 2.0 (LGPLv2)", fullpath="License :: OSI-Approved Open Source :: GNU Library or Lesser General Public License version 2.0 (LGPLv2)"))
-    update_trove_cat(15, dict(fullname="GNU General Public License version 2.0 (GPLv2)", fullpath="License :: OSI-Approved Open Source :: GNU General Public License version 2.0 (GPLv2)"))
-    update_trove_cat(670, dict(trove_cat_id=628, fullname="Affero GNU Public License"))
-
-    create_trove_cat((868,13,"ccal","Creative Commons Attribution License","License :: Creative Commons Attribution License"))
-    create_trove_cat((869,868,"ccaslv2","Creative Commons Attribution ShareAlike License V2.0","License :: Creative Commons Attribution License :: Creative Commons Attribution ShareAlike License V2.0"))
-    create_trove_cat((870,868,"ccaslv3","Creative Commons Attribution ShareAlike License V3.0","License :: Creative Commons Attribution License :: Creative Commons Attribution ShareAlike License V3.0"))
-    create_trove_cat((871,868,"ccanclv2","Creative Commons Attribution Non-Commercial License V2.0","License :: Creative Commons Attribution License :: Creative Commons Attribution Non-Commercial License V2.0"))
-    create_trove_cat((680,14,"lgplv3","GNU Library or Lesser General Public License version 3.0 (LGPLv3)","License :: OSI-Approved Open Source :: GNU Library or Lesser General Public License version 3.0 (LGPLv3)"))
-    create_trove_cat((679,14,"gplv3","GNU General Public License version 3.0 (GPLv3)","License :: OSI-Approved Open Source :: GNU General Public License version 3.0 (GPLv3)"))
-
-    ThreadLocalORMSession.flush_all()
-    ThreadLocalORMSession.close_all()
-
-if __name__ == '__main__':
-    main()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/350faaae/scripts/migrations/023-add-new-trove-license-category.py
----------------------------------------------------------------------
diff --git a/scripts/migrations/023-add-new-trove-license-category.py b/scripts/migrations/023-add-new-trove-license-category.py
deleted file mode 100644
index fef5527..0000000
--- a/scripts/migrations/023-add-new-trove-license-category.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-
-import sys
-import logging
-
-from ming.orm.ormsession import ThreadLocalORMSession
-
-from allura import model as M
-
-log = logging.getLogger(__name__)
-
-def main():
-    M.TroveCategory(trove_cat_id=905,
-                    trove_parent_id=14,
-                    shortname='mpl20',
-                    fullname='Mozilla Public License 2.0 (MPL 2.0)',
-                    fullpath='License :: OSI-Approved Open Source :: Mozilla Public License 2.0 (MPL 2.0)')
-
-    ThreadLocalORMSession.flush_all()
-    ThreadLocalORMSession.close_all()
-
-if __name__ == '__main__':
-    main()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/350faaae/scripts/migrations/030-set-trove-show_as_skill.py
----------------------------------------------------------------------
diff --git a/scripts/migrations/030-set-trove-show_as_skill.py b/scripts/migrations/030-set-trove-show_as_skill.py
deleted file mode 100644
index 9f4c767..0000000
--- a/scripts/migrations/030-set-trove-show_as_skill.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-
-import re
-
-from allura import model as M
-
-
-def main():
-    categories_regex = '|'.join([
-        'Translations',
-        'Programming Language',
-        'User Interface',
-        'Database Environment',
-        'Operating System',
-        'Topic',
-    ])
-    M.TroveCategory.query.update(
-        {'fullname': re.compile(r'^(%s)' % categories_regex)},
-        {'$set': {'show_as_skill': True}},
-        multi=True)
-
-if __name__ == '__main__':
-    main()


[08/50] git commit: [#6848] ticket:483 Coalesce trove migrations into command

Posted by jo...@apache.org.
[#6848] ticket:483 Coalesce trove migrations into command


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/77fb5d8c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/77fb5d8c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/77fb5d8c

Branch: refs/heads/cj/6992
Commit: 77fb5d8c3788ee3d7fa5133354ca38213c8cedb5
Parents: c70e94f
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri Dec 27 13:17:10 2013 +0200
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 14:52:06 2014 +0000

----------------------------------------------------------------------
 .../allura/command/create_trove_categories.py   | 358 ++++++++++++++++++-
 1 file changed, 351 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/77fb5d8c/Allura/allura/command/create_trove_categories.py
----------------------------------------------------------------------
diff --git a/Allura/allura/command/create_trove_categories.py b/Allura/allura/command/create_trove_categories.py
index e61d755..c39dbbd 100644
--- a/Allura/allura/command/create_trove_categories.py
+++ b/Allura/allura/command/create_trove_categories.py
@@ -15,14 +15,14 @@
 #       specific language governing permissions and limitations
 #       under the License.
 
+import re
+import sys
 import logging
-from tg import config
 from ming.orm import session
 
 from . import base
 
 from allura import model as M
-from allura.lib import helpers as h
 
 log = logging.getLogger(__name__)
 
@@ -33,10 +33,33 @@ class CreateTroveCategoriesCommand(base.Command):
     summary = 'Remove any existing trove categories and load new ones'
     parser = base.Command.standard_parser(verbose=True)
 
-    def create_trove_cat(self,cat_data):
-        M.TroveCategory(trove_cat_id=cat_data[0], trove_parent_id=cat_data[1],
-                        shortname=cat_data[2], fullname=cat_data[3], fullpath=cat_data[4],
-                        show_as_skill=cat_data[5])
+    # NOTE: order is important
+    # To add new migration append it's name to following list,
+    # and cretate method m__<migration_name>
+    migrations = [
+        'add_agpl_and_lppl',
+        'sync',
+        'set_parent_only',
+        'add_license',
+        'set_show_as_skills',
+    ]
+
+    def create_trove_cat(self, cat_data):
+        data = {'trove_cat_id': cat_data[0],
+                'trove_parent_id': cat_data[1],
+                'shortname': cat_data[2],
+                'fullname': cat_data[3],
+                'fullpath': cat_data[4]}
+        if len(cat_data) > 5:
+            data['show_as_skill'] = cat_data[5]
+        M.TroveCategory(**data)
+
+    def update_trove_cat(self, trove_cat_id, attr_dict):
+        t = M.TroveCategory.query.get(trove_cat_id=trove_cat_id)
+        if not t:
+            sys.exit("Couldn't find TroveCategory with trove_cat_id=%s" % trove_cat_id)
+        for k, v in attr_dict.iteritems():
+            setattr(t, k, v)
 
     def command(self):
         self.basic_setup()
@@ -671,7 +694,7 @@ class CreateTroveCategoriesCommand(base.Command):
         self.create_trove_cat((116,113,"cdaudio","CD Audio","Topic :: Multimedia :: Sound/Audio :: CD Audio",True))
         self.create_trove_cat((117,116,"cdplay","CD Playing","Topic :: Multimedia :: Sound/Audio :: CD Audio :: CD Playing",True))
         self.create_trove_cat((99,18,"multimedia","Multimedia","Topic :: Multimedia",True))
-        self.create_trove_cat((670,14,"agpl","Affero GNU Public License ","License :: OSI-Approved Open Source :: Affero GNU Public License",True))
+        self.create_trove_cat((670,14,"agpl","Affero GNU Public License","License :: OSI-Approved Open Source :: Affero GNU Public License",True))
         self.create_trove_cat((862,14,"lppl","LaTeX Project Public License","License :: OSI-Approved Open Source :: LaTeX Project Public License",True))
         self.create_trove_cat((655,432,"win64","64-bit MS Windows","Operating System :: Grouping and Descriptive Categories :: 64-bit MS Windows",True))
         self.create_trove_cat((657,418,"vista","Vista","Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Vista",True))
@@ -684,3 +707,324 @@ class CreateTroveCategoriesCommand(base.Command):
         self.create_trove_cat((866,534,"secpros","Security Professionals","Intended Audience :: by End-User Class :: Security Professionals",False))
         self.create_trove_cat((867,535,"secindustry","Security","Intended Audience :: by Industry or Sector :: Security",False))
         session(M.TroveCategory).flush()
+
+        for name in self.migrations:
+            getattr(self, 'm__' + name)()
+            session(M.TroveCategory).flush()
+
+    def m__add_agpl_and_lppl(self):
+        M.TroveCategory(trove_cat_id=670,
+                        trove_parent_id=14,
+                        shortname="agpl",
+                        fullname="Affero GNU Public License",
+                        fullpath="License :: OSI-Approved Open Source :: Affero GNU Public License")
+        M.TroveCategory(trove_cat_id=862,
+                        trove_parent_id=14,
+                        shortname="lppl",
+                        fullname="LaTeX Project Public License",
+                        fullpath="License :: OSI-Approved Open Source :: LaTeX Project Public License")
+        M.TroveCategory(trove_cat_id=655,
+                        trove_parent_id=432,
+                        shortname="win64",
+                        fullname="64-bit MS Windows",
+                        fullpath="Operating System :: Grouping and Descriptive Categories :: 64-bit MS Windows")
+        M.TroveCategory(trove_cat_id=657,
+                        trove_parent_id=418,
+                        shortname="vista",
+                        fullname="Vista",
+                        fullpath="Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Vista")
+        M.TroveCategory(trove_cat_id=851,
+                        trove_parent_id=418,
+                        shortname="win7",
+                        fullname="Windows 7",
+                        fullpath="Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Windows 7")
+        M.TroveCategory(trove_cat_id=728,
+                        trove_parent_id=315,
+                        shortname="android",
+                        fullname="Android",
+                        fullpath="Operating System :: Handheld/Embedded Operating Systems :: Android")
+        M.TroveCategory(trove_cat_id=780,
+                        trove_parent_id=315,
+                        shortname="ios",
+                        fullname="Apple iPhone",
+                        fullpath="Operating System :: Handheld/Embedded Operating Systems :: Apple iPhone")
+        M.TroveCategory(trove_cat_id=863,
+                        trove_parent_id=534,
+                        shortname="architects",
+                        fullname="Architects",
+                        fullpath="Intended Audience :: by End-User Class :: Architects")
+        M.TroveCategory(trove_cat_id=864,
+                        trove_parent_id=534,
+                        shortname="auditors",
+                        fullname="Auditors",
+                        fullpath="Intended Audience :: by End-User Class :: Auditors")
+        M.TroveCategory(trove_cat_id=865,
+                        trove_parent_id=534,
+                        shortname="testers",
+                        fullname="Testers",
+                        fullpath="Intended Audience :: by End-User Class :: Testers")
+        M.TroveCategory(trove_cat_id=866,
+                        trove_parent_id=534,
+                        shortname="secpros",
+                        fullname="Security Professionals",
+                        fullpath="Intended Audience :: by End-User Class :: Security Professionals")
+        M.TroveCategory(trove_cat_id=867,
+                        trove_parent_id=535,
+                        shortname="secindustry",
+                        fullname="Security",
+                        fullpath="Intended Audience :: by Industry or Sector :: Security")
+
+    def m__sync(self):
+        self.create_trove_cat((639,14,"cpal","Common Public Attribution License 1.0 (CPAL)","License :: OSI-Approved Open Source :: Common Public Attribution License 1.0 (CPAL)"))
+        self.create_trove_cat((640,99,"dvd","DVD","Topic :: Multimedia :: DVD"))
+        self.create_trove_cat((641,576,"workflow","Workflow","Topic :: Office/Business :: Enterprise :: Workflow"))
+        self.create_trove_cat((642,292,"linuxdrivers","Linux","Topic :: System :: Hardware :: Hardware Drivers :: Linux"))
+        self.create_trove_cat((643,582,"uml","UML","Topic :: Software Development :: Design :: UML"))
+        self.create_trove_cat((644,92,"cms","CMS Systems","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CMS Systems"))
+        self.create_trove_cat((645,92,"blogging","Blogging","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Blogging"))
+        self.create_trove_cat((646,52,"subversion","Subversion","Topic :: Software Development :: Version Control :: Subversion"))
+        self.create_trove_cat((647,612,"webservices","Web Services","Topic :: Formats and Protocols :: Protocols :: Web Services"))
+        self.create_trove_cat((648,554,"json","JSON","Topic :: Formats and Protocols :: Data Formats :: JSON"))
+        self.create_trove_cat((649,100,"imagegalleries","Image Galleries","Topic :: Multimedia :: Graphics :: Image Galleries"))
+        self.create_trove_cat((650,612,"ajax","AJAX","Topic :: Formats and Protocols :: Protocols :: AJAX"))
+        self.create_trove_cat((651,92,"wiki","Wiki","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Wiki"))
+        self.create_trove_cat((652,45,"appservers","Application Servers","Topic :: Software Development :: Application Servers"))
+        self.create_trove_cat((653,20,"rssreaders","RSS Feed Readers","Topic :: Communications :: RSS Feed Readers"))
+        self.create_trove_cat((654,129,"ecommerce","E-Commerce / Shopping","Topic :: Office/Business :: E-Commerce / Shopping"))
+        self.create_trove_cat((656,99,"htpc","Home Theater PC","Topic :: Multimedia :: Home Theater PC"))
+        self.create_trove_cat((658,22,"jabber","Jabber","Topic :: Communications :: Chat :: Jabber"))
+        self.create_trove_cat((659,576,"enterprisebpm","Business Performance Management","Topic :: Office/Business :: Enterprise :: Business Performance Management"))
+        self.create_trove_cat((660,576,"enterprisebi","Business Intelligence","Topic :: Office/Business :: Enterprise :: Business Intelligence"))
+        self.create_trove_cat((661,75,"budgetingandforecasting","Budgeting and Forecasting","Topic :: Office/Business :: Financial :: Budgeting and Forecasting"))
+        self.create_trove_cat((662,497,"ingres","Ingres","Database Environment :: Network-based DBMS :: Ingres"))
+        self.create_trove_cat((663,92,"socialnetworking","Social Networking","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Social Networking"))
+        self.create_trove_cat((664,199,"virtualization","Virtualization","Operating System :: Virtualization"))
+        self.create_trove_cat((665,664,"vmware","VMware","Operating System :: Virtualization :: VMware"))
+        self.create_trove_cat((666,664,"xen","Xen","Operating System :: Virtualization :: Xen"))
+        self.create_trove_cat((667,247,"voip","VoIP","Topic :: Communications :: Telephony :: VoIP"))
+        self.create_trove_cat((668,92,"ticketing","Ticketing Systems","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Ticketing Systems"))
+        self.create_trove_cat((669,315,"blackberryos","Blackberry RIM OS","Operating System :: Handheld/Embedded Operating Systems :: Blackberry RIM OS"))
+        self.create_trove_cat((671,14,"ms-pl","Microsoft Public License","License :: OSI-Approved Open Source :: Microsoft Public License"))
+        self.create_trove_cat((672,14,"ms-rl","Microsoft Reciprocal License","License :: OSI-Approved Open Source :: Microsoft Reciprocal License"))
+        self.create_trove_cat((673,576,"bsm","Business Service Management","Topic :: Office/Business :: Enterprise :: Business Service Management"))
+        self.create_trove_cat((674,673,"servicesupport","Service Support","Topic :: Office/Business :: Enterprise :: Business Service Management :: Service Support"))
+        self.create_trove_cat((675,673,"serviceassurance","Service Assurance","Topic :: Office/Business :: Enterprise :: Business Service Management :: Service Assurance"))
+        self.create_trove_cat((676,673,"serviceautomation","Service Automation","Topic :: Office/Business :: Enterprise :: Business Service Management :: Service Automation"))
+        self.create_trove_cat((677,14,"artisticv2","Artistic License 2.0","License :: OSI-Approved Open Source :: Artistic License 2.0"))
+        self.create_trove_cat((678,14,"boostlicense","Boost Software License (BSL1.0)","License :: OSI-Approved Open Source :: Boost Software License (BSL1.0)"))
+        self.create_trove_cat((679,14,"gplv3","GNU General Public License version 3.0 (GPLv3)","License :: OSI-Approved Open Source :: GNU General Public License version 3.0 (GPLv3)"))
+        self.create_trove_cat((680,14,"lgplv3","GNU Library or ""Lesser"" General Public License version 3.0 (LGPLv3)","License :: OSI-Approved Open Source :: GNU Library or ""Lesser"" General Public License version 3.0 (LGPLv3)"))
+        self.create_trove_cat((681,14,"isclicense","ISC License","License :: OSI-Approved Open Source :: ISC License"))
+        self.create_trove_cat((682,14,"multicslicense","Multics License","License :: OSI-Approved Open Source :: Multics License"))
+        self.create_trove_cat((683,14,"ntplicense","NTP License","License :: OSI-Approved Open Source :: NTP License"))
+        self.create_trove_cat((684,14,"nposl3","Non-Profit Open Software License 3.0 (Non-Profit OSL 3.0)","License :: OSI-Approved Open Source :: Non-Profit Open Software License 3.0 (Non-Profit OSL 3.0)"))
+        self.create_trove_cat((685,14,"rpl15","Reciprocal Public License 1.5 (RPL1.5)","License :: OSI-Approved Open Source :: Reciprocal Public License 1.5 (RPL1.5)"))
+        self.create_trove_cat((686,14,"splicense2","Simple Public License 2.0","License :: OSI-Approved Open Source :: Simple Public License 2.0"))
+        self.create_trove_cat((687,673,"cmdb","Configuration Management Database (CMDB)","Topic :: Office/Business :: Enterprise :: Business Service Management :: Configuration Management Database (CMDB)"))
+        self.create_trove_cat((688,18,"mobileapps","Mobile","Topic :: Mobile"))
+        self.create_trove_cat((689,315,"winmobile","Windows Mobile","Operating System :: Handheld/Embedded Operating Systems :: Windows Mobile"))
+        self.create_trove_cat((690,315,"brew","BREW (Binary Runtime Environment for Wireless)","Operating System :: Handheld/Embedded Operating Systems :: BREW (Binary Runtime Environment for Wireless)"))
+        self.create_trove_cat((691,315,"j2me","J2ME (Java Platform, Micro Edition)","Operating System :: Handheld/Embedded Operating Systems :: J2ME (Java Platform, Micro Edition)"))
+        self.create_trove_cat((692,315,"maemo","Maemo","Operating System :: Handheld/Embedded Operating Systems :: Maemo"))
+        self.create_trove_cat((693,315,"limo","LiMo (Linux Mobile)","Operating System :: Handheld/Embedded Operating Systems :: LiMo (Linux Mobile)"))
+        self.create_trove_cat((694,160,"clean","Clean","Programming Language :: Clean"))
+        self.create_trove_cat((695,160,"lasso","Lasso","Programming Language :: Lasso"))
+        self.create_trove_cat((696,160,"turing","Turing","Programming Language :: Turing"))
+        self.create_trove_cat((697,160,"glsl","GLSL (OpenGL Shading Language)","Programming Language :: GLSL (OpenGL Shading Language)"))
+        self.create_trove_cat((698,160,"lazarus","Lazarus","Programming Language :: Lazarus"))
+        self.create_trove_cat((699,160,"freepascal","Free Pascal","Programming Language :: Free Pascal"))
+        self.create_trove_cat((700,160,"scriptol","Scriptol","Programming Language :: Scriptol"))
+        self.create_trove_cat((701,160,"pl-i","PL/I (Programming Language One)","Programming Language :: PL/I (Programming Language One)"))
+        self.create_trove_cat((702,160,"oz","Oz","Programming Language :: Oz"))
+        self.create_trove_cat((703,160,"limbo","Limbo","Programming Language :: Limbo"))
+        self.create_trove_cat((704,160,"scala","Scala","Programming Language :: Scala"))
+        self.create_trove_cat((705,160,"blitzmax","BlitzMax","Programming Language :: BlitzMax"))
+        self.create_trove_cat((706,160,"xbaseclipper","XBase/Clipper","Programming Language :: XBase/Clipper"))
+        self.create_trove_cat((707,160,"curl","Curl","Programming Language :: Curl"))
+        self.create_trove_cat((708,160,"flex","Flex","Programming Language :: Flex"))
+        self.create_trove_cat((709,160,"mathematica","Mathematica","Programming Language :: Mathematica"))
+        self.create_trove_cat((710,160,"visualdataflex","Visual DataFlex","Programming Language :: Visual DataFlex"))
+        self.create_trove_cat((711,160,"fenix","Fenix","Programming Language :: Fenix"))
+        self.create_trove_cat((713,456,"vexi","Vexi","User Interface :: Graphical :: Vexi"))
+        self.create_trove_cat((714,160,"kaya","Kaya","Programming Language :: Kaya"))
+        self.create_trove_cat((715,160,"transcript-revolution","Transcript/Revolution","Programming Language :: Transcript/Revolution"))
+        self.create_trove_cat((716,160,"haXe","haXe","Programming Language :: haXe"))
+        self.create_trove_cat((717,160,"proglangmeta","Project is a programming language","Programming Language :: Project is a programming language"))
+        self.create_trove_cat((718,634,"msxb360","Microsoft Xbox 360","Operating System :: Other Operating Systems :: Console-based Platforms :: Microsoft Xbox 360"))
+        self.create_trove_cat((719,634,"nintendogc","Nintendo GameCube","Operating System :: Other Operating Systems :: Console-based Platforms :: Nintendo GameCube"))
+        self.create_trove_cat((720,634,"nintendowii","Nintendo Wii","Operating System :: Other Operating Systems :: Console-based Platforms :: Nintendo Wii"))
+        self.create_trove_cat((721,634,"sonyps3","Sony PlayStation 3","Operating System :: Other Operating Systems :: Console-based Platforms :: Sony PlayStation 3"))
+        self.create_trove_cat((722,634,"sonypsp","Sony PlayStation Portable (PSP)","Operating System :: Other Operating Systems :: Console-based Platforms :: Sony PlayStation Portable (PSP)"))
+        self.create_trove_cat((723,160,"scilab","Scilab","Programming Language :: Scilab"))
+        self.create_trove_cat((724,160,"scicos","Scicos","Programming Language :: Scicos"))
+        self.create_trove_cat((725,534,"management","Management","Intended Audience :: by End-User Class :: Management"))
+        self.create_trove_cat((726,71,"edadministration","Administration","Topic :: Education :: Administration"))
+        self.create_trove_cat((727,97,"mechcivileng","Mechanical and Civil Engineering","Topic :: Scientific/Engineering :: Mechanical and Civil Engineering"))
+        self.create_trove_cat((729,535,"audienceengineering","Engineering","Intended Audience :: by Industry or Sector :: Engineering"))
+        self.create_trove_cat((730,274,"basque","Basque (Euskara)","Translations :: Basque (Euskara)"))
+        self.create_trove_cat((731,14,"classpath","GNU General Public License with Classpath exception (Classpath::License)","License :: OSI-Approved Open Source :: GNU General Public License with Classpath exception (Classpath::License)"))
+        self.create_trove_cat((732,727,"caddcam","Computer-aided technologies (CADD/CAM/CAE)","Topic :: Scientific/Engineering :: Mechanical and Civil Engineering :: Computer-aided technologies (CADD/CAM/CAE)"))
+        self.create_trove_cat((733,576,"humanresources","Human Resources","Topic :: Office/Business :: Enterprise :: Human Resources"))
+        self.create_trove_cat((734,554,"mcml","Media Center Markup Language (MCML)","Topic :: Formats and Protocols :: Data Formats :: Media Center Markup Language (MCML)"))
+        self.create_trove_cat((735,461,"nsis","Nullsoft Scriptable Install System (NSIS)","User Interface :: Plugins :: Nullsoft Scriptable Install System (NSIS)"))
+        self.create_trove_cat((736,97,"scada","SCADA","Topic :: Scientific/Engineering :: SCADA"))
+        self.create_trove_cat((737,461,"autohotkey","AutoHotkey","User Interface :: Plugins :: AutoHotkey"))
+        self.create_trove_cat((738,160,"autoit","AutoIt","Programming Language :: AutoIt"))
+        self.create_trove_cat((739,132,"humanitarianism","Humanitarianism","Topic :: Religion and Philosophy :: Humanitarianism"))
+        self.create_trove_cat((740,129,"insurance","Insurance","Topic :: Office/Business :: Insurance"))
+        self.create_trove_cat((741,97,"linguistics","Linguistics","Topic :: Scientific/Engineering :: Linguistics"))
+        self.create_trove_cat((742,741,"machinetranslation","Machine Translation","Topic :: Scientific/Engineering :: Linguistics :: Machine Translation"))
+        self.create_trove_cat((743,43,"antispam","Anti-Spam","Topic :: Security :: Anti-Spam"))
+        self.create_trove_cat((744,43,"antivirus","Anti-Virus","Topic :: Security :: Anti-Virus"))
+        self.create_trove_cat((745,43,"antimalware","Anti-Malware","Topic :: Security :: Anti-Malware"))
+        self.create_trove_cat((746,554,"autocaddxf","AutoCAD DXF","Topic :: Formats and Protocols :: Data Formats :: AutoCAD DXF"))
+        self.create_trove_cat((747,75,"billing","Billing","Topic :: Office/Business :: Financial :: Billing"))
+        self.create_trove_cat((748,576,"processmanagement","Business Process Management","Topic :: Office/Business :: Enterprise :: Business Process Management"))
+        self.create_trove_cat((749,136,"embedded","Embedded systems","Topic :: System :: Embedded systems"))
+        self.create_trove_cat((750,456,"magicui","Magic User Interface (MUI)","User Interface :: Graphical :: Magic User Interface (MUI)"))
+        self.create_trove_cat((751,237,"xul","XUL","User Interface :: Web-based :: XUL"))
+        self.create_trove_cat((752,80,"flightsim","Flight simulator","Topic :: Games/Entertainment :: Flight simulator"))
+        self.create_trove_cat((753,63,"vivim","Vi/Vim","Topic :: Text Editors :: Vi/Vim"))
+        self.create_trove_cat((754,45,"sourceanalysis","Source code analysis","Topic :: Software Development :: Source code analysis"))
+        self.create_trove_cat((755,45,"sourcebrowsing","Source code browsing","Topic :: Software Development :: Source code browsing"))
+        self.create_trove_cat((756,576,"plm","Product lifecycle management (PLM)","Topic :: Office/Business :: Enterprise :: Product lifecycle management (PLM)"))
+        self.create_trove_cat((757,274,"breton","Breton","Translations :: Breton"))
+        self.create_trove_cat((758,498,"db4o","db4objects (db4o)","Database Environment :: File-based DBMS :: db4objects (db4o)"))
+        self.create_trove_cat((759,497,"nexusdb","NexusDB","Database Environment :: Network-based DBMS :: NexusDB"))
+        self.create_trove_cat((760,160,"prism","Prism","Programming Language :: Prism"))
+        self.create_trove_cat((761,45,"collaborative","Collaborative development tools","Topic :: Software Development :: Collaborative development tools"))
+        self.create_trove_cat((762,91,"pluginsaddons","Plugins and add-ons","Topic :: Internet :: WWW/HTTP :: Browsers :: Plugins and add-ons"))
+        self.create_trove_cat((763,456,"winaero","Windows Aero","User Interface :: Graphical :: Windows Aero"))
+        self.create_trove_cat((764,45,"agile","Agile development tools","Topic :: Software Development :: Agile development tools"))
+        self.create_trove_cat((765,535,"agriculture","Agriculture","Intended Audience :: by Industry or Sector :: Agriculture"))
+        self.create_trove_cat((766,100,"animation","Animation","Topic :: Multimedia :: Graphics :: Animation"))
+        self.create_trove_cat((767,45,"assemblers","Assemblers","Topic :: Software Development :: Assemblers"))
+        self.create_trove_cat((768,535,"automotive","Automotive","Intended Audience :: by Industry or Sector :: Automotive"))
+        self.create_trove_cat((769,554,"CSV","Comma-separated values (CSV)","Topic :: Formats and Protocols :: Data Formats :: Comma-separated values (CSV)"))
+        self.create_trove_cat((770,45,"softdevlibraries","Libraries","Topic :: Software Development :: Libraries"))
+        self.create_trove_cat((771,45,"sourcereview","Source code review","Topic :: Software Development :: Source code review"))
+        self.create_trove_cat((772,80,"hobbies","Hobbies","Topic :: Games/Entertainment :: Hobbies"))
+        self.create_trove_cat((773,772,"collectionmanage","Collection management","Topic :: Games/Entertainment :: Hobbies :: Collection management"))
+        self.create_trove_cat((774,80,"multiplayer","Multiplayer","Topic :: Games/Entertainment :: Multiplayer"))
+        self.create_trove_cat((775,80,"mmorpg","MMORPG","Topic :: Games/Entertainment :: MMORPG"))
+        self.create_trove_cat((776,97,"mapping","Mapping","Topic :: Scientific/Engineering :: Mapping"))
+        self.create_trove_cat((777,776,"gps","GPS (Global Positioning System)","Topic :: Scientific/Engineering :: Mapping :: GPS (Global Positioning System)"))
+        self.create_trove_cat((778,43,"passwordmanage","Password manager","Topic :: Security :: Password manager"))
+        self.create_trove_cat((779,315,"linksyswrt54g","Linksys WRT54G series","Operating System :: Handheld/Embedded Operating Systems :: Linksys WRT54G series"))
+        self.create_trove_cat((781,576,"medhealth","Medical/Healthcare","Topic :: Office/Business :: Enterprise :: Medical/Healthcare"))
+        self.create_trove_cat((782,45,"bined","Binary editors","Topic :: Software Development :: Binary editors"))
+        self.create_trove_cat((783,99,"mmcatalog","Cataloguing","Topic :: Multimedia :: Cataloguing"))
+        self.create_trove_cat((784,113,"composition","Composition","Topic :: Multimedia :: Sound/Audio :: Composition"))
+        self.create_trove_cat((785,772,"cooking","Cooking","Topic :: Games/Entertainment :: Hobbies :: Cooking"))
+        self.create_trove_cat((786,136,"cron","Cron and scheduling","Topic :: System :: Cron and scheduling"))
+        self.create_trove_cat((787,638,"recovery","Data recovery","Topic :: System :: Storage :: Data recovery"))
+        self.create_trove_cat((788,87,"otherfile","Other file transfer protocol","Topic :: Internet :: Other file transfer protocol"))
+        self.create_trove_cat((789,581,"digpreserve","Digital preservation","Topic :: Education :: Library :: Digital preservation"))
+        self.create_trove_cat((790,251,"directconnect","Direct Connect","Topic :: Communications :: File Sharing :: Direct Connect"))
+        self.create_trove_cat((791,129,"dtp","Desktop Publishing","Topic :: Office/Business :: Desktop Publishing"))
+        self.create_trove_cat((792,580,"etl","ETL","Topic :: Office/Business :: Enterprise :: Data Warehousing :: ETL"))
+        self.create_trove_cat((793,55,"fonts","Fonts","Topic :: Desktop Environment :: Fonts"))
+        self.create_trove_cat((794,80,"gameframeworks","Game development framework","Topic :: Games/Entertainment :: Game development framework"))
+        self.create_trove_cat((795,100,"handrec","Handwriting recognition","Topic :: Multimedia :: Graphics :: Handwriting recognition"))
+        self.create_trove_cat((796,136,"homeauto","Home Automation","Topic :: System :: Home Automation"))
+        self.create_trove_cat((797,63,"translation","Computer Aided Translation (CAT)","Topic :: Text Editors :: Computer Aided Translation (CAT)"))
+        self.create_trove_cat((798,136,"osdistro","OS distribution","Topic :: System :: OS distribution"))
+        self.create_trove_cat((799,798,"livecd","Live CD","Topic :: System :: OS distribution :: Live CD"))
+        self.create_trove_cat((800,497,"lotusnotes","Lotus Notes/Domino","Database Environment :: Network-based DBMS :: Lotus Notes/Domino"))
+        self.create_trove_cat((801,160,"lotusscript","LotusScript","Programming Language :: LotusScript"))
+        self.create_trove_cat((802,133,"machinelearning","Machine Learning","Topic :: Scientific/Engineering :: Artificial Intelligence :: Machine Learning"))
+        self.create_trove_cat((803,106,"metadata","Metadata editors","Topic :: Multimedia :: Graphics :: Editors :: Metadata editors"))
+        self.create_trove_cat((804,236,"riscos","RISC OS","Operating System :: Other Operating Systems :: RISC OS"))
+        self.create_trove_cat((805,282,"politics","Politics","Topic :: Social sciences :: Politics"))
+        self.create_trove_cat((806,80,"sports","Sports","Topic :: Games/Entertainment :: Sports"))
+        self.create_trove_cat((807,282,"psychology","Psychology","Topic :: Social sciences :: Psychology"))
+        self.create_trove_cat((808,458,"ogre3d","Ogre3D","User Interface :: Toolkits/Libraries :: Ogre3D"))
+        self.create_trove_cat((809,45,"orm","ORM (Object-relational mapping)","Topic :: Software Development :: ORM (Object-relational mapping)"))
+        self.create_trove_cat((810,575,"perftest","Performance Testing","Topic :: Software Development :: Testing :: Performance Testing"))
+        self.create_trove_cat((811,75,"personalfinance","Personal finance","Topic :: Office/Business :: Financial :: Personal finance"))
+        self.create_trove_cat((812,499,"pearmdb2","PHP Pear::MDB2","Database Environment :: Database API :: PHP Pear::MDB2"))
+        self.create_trove_cat((813,461,"intellij","IntelliJ","User Interface :: Plugins :: IntelliJ"))
+        self.create_trove_cat((814,554,"postscript","PostScript","Topic :: Formats and Protocols :: Data Formats :: PostScript"))
+        self.create_trove_cat((815,100,"fractals","Fractals and Procedural Generation","Topic :: Multimedia :: Graphics :: Fractals and Procedural Generation"))
+        self.create_trove_cat((816,554,"w3cvoice","W3C Voice","Topic :: Formats and Protocols :: Data Formats :: W3C Voice"))
+        self.create_trove_cat((817,97,"quantumcomp","Quantum Computing","Topic :: Scientific/Engineering :: Quantum Computing"))
+        self.create_trove_cat((818,129,"reportgen","Report Generators","Topic :: Office/Business :: Report Generators"))
+        self.create_trove_cat((819,581,"research","Research","Topic :: Education :: Library :: Research"))
+        self.create_trove_cat((820,87,"ssh","SSH (Secure SHell)","Topic :: Internet :: SSH (Secure SHell)"))
+        self.create_trove_cat((821,554,"semantic","Semantic Web (RDF, OWL, etc.)","Topic :: Formats and Protocols :: Data Formats :: Semantic Web (RDF, OWL, etc.)"))
+        self.create_trove_cat((822,90,"socialbookmarking","Social Bookmarking","Topic :: Internet :: WWW/HTTP :: Social Bookmarking"))
+        self.create_trove_cat((823,20,"synchronization","Synchronization","Topic :: Communications :: Synchronization"))
+        self.create_trove_cat((824,45,"templates","Templates","Topic :: Software Development :: Templates"))
+        self.create_trove_cat((825,97,"testmeasure","Test and Measurement","Topic :: Scientific/Engineering :: Test and Measurement"))
+        self.create_trove_cat((826,98,"statistics","Statistics","Topic :: Scientific/Engineering :: Mathematics :: Statistics"))
+        self.create_trove_cat((827,129,"knowledgemanagement","Knowledge Management","Topic :: Office/Business :: Knowledge Management"))
+        self.create_trove_cat((828,147,"unattended","Unattended","Topic :: System :: Installation/Setup :: Unattended"))
+        self.create_trove_cat((829,457,"emailinterface","Email-based interface","User Interface :: Textual :: Email-based interface"))
+        self.create_trove_cat((830,282,"voting","Voting","Topic :: Social sciences :: Voting"))
+        self.create_trove_cat((831,27,"webconferencing","Web Conferencing","Topic :: Communications :: Conferencing :: Web Conferencing"))
+        self.create_trove_cat((832,27,"videoconferencing","Video Conferencing","Topic :: Communications :: Conferencing :: Video Conferencing"))
+        self.create_trove_cat((833,160,"objectivec2","Objective-C 2.0","Programming Language :: Objective-C 2.0"))
+        self.create_trove_cat((834,274,"georgian","Georgian","Translations :: Georgian"))
+        self.create_trove_cat((835,499,"adonet","ADO.NET","Database Environment :: Database API :: ADO.NET"))
+        self.create_trove_cat((836,554,"xbrl","XBRL","Topic :: Formats and Protocols :: Data Formats :: XBRL"))
+        self.create_trove_cat((837,461,"excel","Excel","User Interface :: Plugins :: Excel"))
+        self.create_trove_cat((838,160,"visualbasicforapplications","Visual Basic for Applications (VBA)","Programming Language :: Visual Basic for Applications (VBA)"))
+        self.create_trove_cat((839,160,"booprogramminglang","Boo","Programming Language :: Boo"))
+        self.create_trove_cat((840,52,"git","Git","Topic :: Software Development :: Version Control :: Git"))
+        self.create_trove_cat((841,52,"mercurial","Mercurial","Topic :: Software Development :: Version Control :: Mercurial"))
+        self.create_trove_cat((842,52,"bazaar","Bazaar","Topic :: Software Development :: Version Control :: Bazaar"))
+        self.create_trove_cat((843,14,"eupublicense","European Union Public License","License :: OSI-Approved Open Source :: European Union Public License"))
+        self.create_trove_cat((844,14,"ipafontlicense","IPA Font License","License :: OSI-Approved Open Source :: IPA Font License"))
+        self.create_trove_cat((845,14,"miroslicense","MirOS License","License :: OSI-Approved Open Source :: MirOS License"))
+        self.create_trove_cat((846,14,"openfontlicense11","Open Font License 1.1 (OFL 1.1)","License :: OSI-Approved Open Source :: Open Font License 1.1 (OFL 1.1)"))
+        self.create_trove_cat((847,80,"realtimetactical","Real Time Tactical","Topic :: Games/Entertainment :: Real Time Tactical"))
+        self.create_trove_cat((848,160,"algol68","ALGOL 68","Programming Language :: ALGOL 68"))
+        self.create_trove_cat((849,92,"groupware","Groupware","Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Groupware"))
+        self.create_trove_cat((850,576,"businesscontinuity","Business Continuity","Topic :: Office/Business :: Enterprise :: Business Continuity"))
+        self.create_trove_cat((852,554,"teiformat","TEI","Topic :: Formats and Protocols :: Data Formats :: TEI"))
+        self.create_trove_cat((853,160,"clarion","Clarion","Programming Language :: Clarion"))
+        self.create_trove_cat((854,576,"sales","Sales","Topic :: Office/Business :: Enterprise :: Sales"))
+        self.create_trove_cat((855,97,"buildingauto","Building Automation","Topic :: Scientific/Engineering :: Building Automation"))
+        self.create_trove_cat((856,129,"businessmodelling","Modelling","Topic :: Office/Business :: Modelling"))
+        self.create_trove_cat((857,150,"routing","Routing","Topic :: System :: Networking :: Routing"))
+        self.create_trove_cat((858,97,"medicalphysics","Medical Physics","Topic :: Scientific/Engineering :: Medical Physics"))
+        self.create_trove_cat((859,71,"edlanguage","Languages","Topic :: Education :: Languages"))
+        self.create_trove_cat((860,97,"molecularmech","Molecular Mechanics","Topic :: Scientific/Engineering :: Molecular Mechanics"))
+        self.create_trove_cat((861,148,"loganalysis","Log Analysis","Topic :: System :: Logging :: Log Analysis"))
+
+    def m__set_parent_only(self):
+        parent_only_ids = [1, 225, 274, 160, 496, 6, 13, 199, 18, 535, 534, 14, 611, 612, 432, 500, 426, 315, 418, 236, 457, 458, 456, 497, 499, 498]
+        troves = M.TroveCategory.query.find(dict(trove_cat_id={'$in': parent_only_ids})).all()
+        for t in troves:
+            t.parent_only = True
+
+    def m__add_license(self):
+        self.update_trove_cat(16, dict(fullname="GNU Library or Lesser General Public License version 2.0 (LGPLv2)", fullpath="License :: OSI-Approved Open Source :: GNU Library or Lesser General Public License version 2.0 (LGPLv2)"))
+        self.update_trove_cat(15, dict(fullname="GNU General Public License version 2.0 (GPLv2)", fullpath="License :: OSI-Approved Open Source :: GNU General Public License version 2.0 (GPLv2)"))
+        self.update_trove_cat(670, dict(trove_cat_id=628, fullname="Affero GNU Public License"))
+
+        self.create_trove_cat((868,13,"ccal","Creative Commons Attribution License","License :: Creative Commons Attribution License"))
+        self.create_trove_cat((869,868,"ccaslv2","Creative Commons Attribution ShareAlike License V2.0","License :: Creative Commons Attribution License :: Creative Commons Attribution ShareAlike License V2.0"))
+        self.create_trove_cat((870,868,"ccaslv3","Creative Commons Attribution ShareAlike License V3.0","License :: Creative Commons Attribution License :: Creative Commons Attribution ShareAlike License V3.0"))
+        self.create_trove_cat((871,868,"ccanclv2","Creative Commons Attribution Non-Commercial License V2.0","License :: Creative Commons Attribution License :: Creative Commons Attribution Non-Commercial License V2.0"))
+        self.create_trove_cat((680,14,"lgplv3","GNU Library or Lesser General Public License version 3.0 (LGPLv3)","License :: OSI-Approved Open Source :: GNU Library or Lesser General Public License version 3.0 (LGPLv3)"))
+        self.create_trove_cat((679,14,"gplv3","GNU General Public License version 3.0 (GPLv3)","License :: OSI-Approved Open Source :: GNU General Public License version 3.0 (GPLv3)"))
+        M.TroveCategory(trove_cat_id=905,
+                        trove_parent_id=14,
+                        shortname='mpl20',
+                        fullname='Mozilla Public License 2.0 (MPL 2.0)',
+                        fullpath='License :: OSI-Approved Open Source :: Mozilla Public License 2.0 (MPL 2.0)')
+
+    def m__set_show_as_skills(self):
+        categories_regex = '|'.join([
+            'Translations',
+            'Programming Language',
+            'User Interface',
+            'Database Environment',
+            'Operating System',
+            'Topic',
+        ])
+        M.TroveCategory.query.update(
+            {'fullname': re.compile(r'^(%s)' % categories_regex)},
+            {'$set': {'show_as_skill': True}},
+            multi=True)


[11/50] git commit: [#6388] add logging stub for Timermiddleware verbose logging

Posted by jo...@apache.org.
[#6388] add logging stub for Timermiddleware verbose logging


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/676e09ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/676e09ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/676e09ee

Branch: refs/heads/cj/6992
Commit: 676e09eea39a5ec774a5dd65a544f10da5e59863
Parents: c9f595a
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Dec 17 17:53:56 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:19 2014 +0000

----------------------------------------------------------------------
 Allura/development.ini | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/676e09ee/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 930bbb8..5a3d83f 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -333,7 +333,7 @@ override_root = task
 # http://docs.python.org/lib/logging-config-fileformat.html
 
 [loggers]
-keys = root, allura, sqlalchemy, paste, amqp, pylons, taskdstatus, timermiddleware
+keys = root, allura, sqlalchemy, paste, amqp, pylons, taskdstatus, timermiddleware, tmw_details
 
 [handlers]
 keys = console, stats, taskdstatus, timermiddleware
@@ -374,6 +374,12 @@ level = INFO
 qualname = pylons
 handlers =
 
+[logger_tmw_details]
+# DEBUG will include every instrumented call in our logging
+level = INFO
+qualname = timermiddleware
+handlers =
+
 [logger_taskdstatus]
 level = INFO
 qualname = taskdstatus


[48/50] git commit: [#6896] Add license header

Posted by jo...@apache.org.
[#6896] Add license header

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d09e21da
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d09e21da
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d09e21da

Branch: refs/heads/cj/6992
Commit: d09e21da6d39b8e69f3b4359ce2cab58d54b5559
Parents: 5d10f30
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Wed Jan 1 04:29:51 2014 +0000
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Thu Jan 2 18:20:42 2014 -0500

----------------------------------------------------------------------
 Allura/docs/contributing.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d09e21da/Allura/docs/contributing.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/contributing.rst b/Allura/docs/contributing.rst
index 06920e8..e6ed088 100644
--- a/Allura/docs/contributing.rst
+++ b/Allura/docs/contributing.rst
@@ -1,3 +1,20 @@
+..     Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+
 Contributing to Allura
 ======================
 For developers interested in hacking on Allura or its components, this guide


[45/50] git commit: [#4091] ticket:489 Remove per project database_uri and fix EnsureIndexCommand

Posted by jo...@apache.org.
[#4091] ticket:489 Remove per project database_uri and fix EnsureIndexCommand


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ef0d3ea6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ef0d3ea6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ef0d3ea6

Branch: refs/heads/cj/6992
Commit: ef0d3ea62cbe3d6aee773aa81e88aefaf37161f0
Parents: ef0562c
Author: Igor Bondarenko <je...@gmail.com>
Authored: Thu Dec 26 12:50:13 2013 +0200
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Jan 2 20:55:05 2014 +0000

----------------------------------------------------------------------
 Allura/allura/command/show_models.py  | 23 +++++------------------
 Allura/allura/lib/plugin.py           |  4 ----
 Allura/allura/model/project.py        |  4 ++--
 Allura/allura/tests/test_app.py       |  1 -
 Allura/allura/tests/unit/factories.py |  1 -
 5 files changed, 7 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ef0d3ea6/Allura/allura/command/show_models.py
----------------------------------------------------------------------
diff --git a/Allura/allura/command/show_models.py b/Allura/allura/command/show_models.py
index d24120d..f4d2784 100644
--- a/Allura/allura/command/show_models.py
+++ b/Allura/allura/command/show_models.py
@@ -228,24 +228,11 @@ class EnsureIndexCommand(base.Command):
             db = odm_session.impl.db
             for name, indexes in db_indexes.iteritems():
                 self._update_indexes(db[name], indexes)
-        base.log.info('Updating indexes for project DBs')
-        configured_dbs = set()
-        for projects in utils.chunked_find(M.Project):
-            for p in projects:
-                db = p.database_uri
-                if db in configured_dbs: continue
-                configured_dbs.add(db)
-                c.project = p
-                db = M.project_doc_session.db
-                base.log.info('... DB: %s', db)
-                for name, indexes in project_indexes.iteritems():
-                    self._update_indexes(db[name], indexes)
-        if not configured_dbs:
-            # e.g. during bootstrap with no projects
-            db = M.project_doc_session.db
-            base.log.info('... default DB: %s', db)
-            for name, indexes in project_indexes.iteritems():
-                self._update_indexes(db[name], indexes)
+        base.log.info('Updating indexes for project DB')
+        db = M.project_doc_session.db
+        base.log.info('... DB: %s', db)
+        for name, indexes in project_indexes.iteritems():
+            self._update_indexes(db[name], indexes)
         base.log.info('Done updating indexes')
 
     def _update_indexes(self, collection, indexes):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ef0d3ea6/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index 0c6c3b1..406ede9 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -431,14 +431,12 @@ class ProjectRegistrationProvider(object):
         from allura import model as M
         shortname = '--init--'
         name = 'Home Project for %s' % neighborhood.name
-        database_uri = M.Project.default_database_uri(shortname)
         p = M.Project(neighborhood_id=neighborhood._id,
                     shortname=shortname,
                     name=name,
                     short_description='',
                     description=('You can edit this description in the admin page'),
                     homepage_title = '# ' + name,
-                    database_uri=database_uri,
                     last_updated = datetime.utcnow(),
                     is_nbhd_project=True,
                     is_root=True)
@@ -514,7 +512,6 @@ class ProjectRegistrationProvider(object):
                     short_description='',
                     description=('You can edit this description in the admin page'),
                     homepage_title=shortname,
-                    database_uri=M.Project.default_database_uri(shortname),
                     last_updated = datetime.utcnow(),
                     is_nbhd_project=False,
                     is_root=True)
@@ -620,7 +617,6 @@ class ProjectRegistrationProvider(object):
             neighborhood_id=project.neighborhood_id,
             shortname=shortname,
             name=project_name or name,
-            database_uri=project.database_uri,
             last_updated = datetime.utcnow(),
             is_root=False,
             ordinal=ordinal,

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ef0d3ea6/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index b720343..1e5ff19 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -188,7 +188,7 @@ class Project(MappedClass, ActivityNode, ActivityObject):
     export_controlled=FieldProperty(bool, if_missing=False)
     export_control_type=FieldProperty(str, if_missing=None)
     database=FieldProperty(S.Deprecated)
-    database_uri=FieldProperty(str)
+    database_uri=FieldProperty(S.Deprecated)
     is_root=FieldProperty(bool)
     acl = FieldProperty(ACL(permissions=_perms_init))
     neighborhood_invitations=FieldProperty([S.ObjectId])
@@ -233,7 +233,7 @@ class Project(MappedClass, ActivityNode, ActivityObject):
         return self.parent_project
 
     @classmethod
-    def default_database_uri(cls, shortname):
+    def database_uri(cls):
         return config.get('ming.project.uri')
 
     @LazyProperty

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ef0d3ea6/Allura/allura/tests/test_app.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_app.py b/Allura/allura/tests/test_app.py
index eea3abe..30c85c0 100644
--- a/Allura/allura/tests/test_app.py
+++ b/Allura/allura/tests/test_app.py
@@ -34,7 +34,6 @@ def setUp():
     c.project.name = 'Test Project'
     c.project.shortname = 'tp'
     c.project._id = 'testproject/'
-    c.project.database_uri = 'mim://nosetest:project'
     c.project.url = lambda: '/testproject/'
     app_config = mock.Mock()
     app_config._id = None

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ef0d3ea6/Allura/allura/tests/unit/factories.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/unit/factories.py b/Allura/allura/tests/unit/factories.py
index 50f24dd..20c33d1 100644
--- a/Allura/allura/tests/unit/factories.py
+++ b/Allura/allura/tests/unit/factories.py
@@ -37,7 +37,6 @@ def flush_on_return(fn):
 def create_project(shortname):
     neighborhood = create_neighborhood()
     return Project(shortname=shortname,
-                   database_uri='mim://test/myproject_db',
                    neighborhood_id=neighborhood._id,
                    is_root=True)
 


[40/50] git commit: [#5424] Fix minor typos

Posted by jo...@apache.org.
[#5424] Fix minor typos

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/c67efb52
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c67efb52
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c67efb52

Branch: refs/heads/cj/6992
Commit: c67efb525633dc44a5548abc6b20547b43945cc2
Parents: 94ae6dd
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Thu Jan 2 20:21:58 2014 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:35 2014 +0000

----------------------------------------------------------------------
 Allura/docs/scm_host.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c67efb52/Allura/docs/scm_host.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/scm_host.rst b/Allura/docs/scm_host.rst
index f500703..0e11e8a 100644
--- a/Allura/docs/scm_host.rst
+++ b/Allura/docs/scm_host.rst
@@ -119,7 +119,7 @@ Alternate Setup with HTTP
 ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 To use SVN over HTTP, you will need to patch and compile an Apache module, so
-that all svn repos can by dynamically served.
+that all svn repos can be dynamically served.
 
 .. warning::
 
@@ -162,7 +162,7 @@ you can modify :file:`dav_svn.conf` to look like:
       SVNParentPath /srv/svn
       ...
 
-Then Apache SVN will serve repositories for all Allura project and subprojects.
+Then Apache SVN will serve repositories for all Allura projects and subprojects.
 
 .. warning::
 
@@ -282,7 +282,7 @@ In particular, you will need to answer the following questions (substitute your
 Update the chroot ssh configuration
 -------------------------------------------------
 
-* Update the file :file:`/var/chroot/scm/etc/ssh/sshd_config`, changing the port directive:
+Update the file :file:`/var/chroot/scm/etc/ssh/sshd_config`, changing the port directive:
 
 .. code-block:: guess
 


[35/50] git commit: [#5424] forward ports for SCM services

Posted by jo...@apache.org.
[#5424] forward ports for SCM services


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/8666d130
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8666d130
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8666d130

Branch: refs/heads/cj/6992
Commit: 8666d13034a849bae6c5be2edf0b61f148dd707c
Parents: ea26b2a
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Dec 12 15:30:55 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:34 2014 +0000

----------------------------------------------------------------------
 vagrant/Vagrantfile | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8666d130/vagrant/Vagrantfile
----------------------------------------------------------------------
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
index 7572922..44c21c9 100644
--- a/vagrant/Vagrantfile
+++ b/vagrant/Vagrantfile
@@ -33,9 +33,17 @@ Vagrant.configure("2") do |config|
   # Create a forwarded port mapping which allows access to a specific port
   # within the machine from a port on the host machine. In the example below,
   # accessing "localhost:8080" will access port 80 on the guest machine.
-  config.vm.network :forwarded_port, guest: 8080, host: 8080
-  config.vm.network :forwarded_port, guest: 8983, host: 8983
-
+  # allura
+  config.vm.network :forwarded_port, guest: 8080, host: 8080, auto_correct: true
+  # solr
+  config.vm.network :forwarded_port, guest: 8983, host: 8983, auto_correct: true
+  # HTTP (svn or git or other)
+  config.vm.network :forwarded_port, guest: 80, host: 8088, auto_correct: true
+  # SVN
+  config.vm.network :forwarded_port, guest: 3690, host: 3690, auto_correct: true
+  # GIT readonly
+  config.vm.network :forwarded_port, guest: 9418, host: 9418, auto_correct: true
+  
   # Create a private network, which allows host-only access to the machine
   # using a specific IP.
   # config.vm.network :private_network, ip: "192.168.33.10"
@@ -58,7 +66,7 @@ Vagrant.configure("2") do |config|
   config.vm.provider :virtualbox do |vb|
     # Don't boot with headless mode
     # vb.gui = true
-  
+
     # Use VBoxManage to customize the VM. For example to change memory:
     vb.customize ["modifyvm", :id, "--memory", "1024"]
   end


[10/50] git commit: [#6388] remove unused main_without_authn (was part of TG quickstart)

Posted by jo...@apache.org.
[#6388] remove unused main_without_authn (was part of TG quickstart)


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/aa723802
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/aa723802
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/aa723802

Branch: refs/heads/cj/6992
Commit: aa7238028f1046ef0be24e98052e1d291c3f4569
Parents: 676e09e
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Dec 17 18:47:15 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:19 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tests/__init__.py     | 2 --
 Allura/test.ini                     | 4 ----
 AlluraTest/alluratest/controller.py | 2 +-
 ForgeActivity/test.ini              | 3 ---
 ForgeBlog/test.ini                  | 3 ---
 ForgeChat/test.ini                  | 3 ---
 ForgeDiscussion/test.ini            | 3 ---
 ForgeGit/test.ini                   | 3 ---
 ForgeImporters/test.ini             | 3 ---
 ForgeLink/test.ini                  | 3 ---
 ForgeSVN/test.ini                   | 3 ---
 ForgeShortUrl/test.ini              | 3 ---
 ForgeTracker/test.ini               | 3 ---
 ForgeUserStats/test.ini             | 3 ---
 ForgeWiki/test.ini                  | 3 ---
 15 files changed, 1 insertion(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/Allura/allura/tests/__init__.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/__init__.py b/Allura/allura/tests/__init__.py
index d96e4ad..3fb7e93 100644
--- a/Allura/allura/tests/__init__.py
+++ b/Allura/allura/tests/__init__.py
@@ -27,5 +27,3 @@ class TestController(alluratest.controller.TestController):
     Base functional test case for the controllers.
 
     """
-
-    application_under_test = 'main_without_authn'

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/Allura/test.ini
----------------------------------------------------------------------
diff --git a/Allura/test.ini b/Allura/test.ini
index 5df127f..5ae2aef 100644
--- a/Allura/test.ini
+++ b/Allura/test.ini
@@ -123,10 +123,6 @@ markdown_render_max_length = 40000
 user_message.time_interval = 3600
 user_message.max_messages = 200
 
-[app:main_without_authn]
-use = main
-skip_authentication = True
-
 [app:main_with_amqp]
 use = main
 # Use test RabbitMQ vhost

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/AlluraTest/alluratest/controller.py
----------------------------------------------------------------------
diff --git a/AlluraTest/alluratest/controller.py b/AlluraTest/alluratest/controller.py
index e382a64..4c3c4e5 100644
--- a/AlluraTest/alluratest/controller.py
+++ b/AlluraTest/alluratest/controller.py
@@ -42,7 +42,7 @@ from allura.websetup.schema import REGISTRY
 #from allura.lib.custom_middleware import environ as ENV, MagicalC
 from .validation import ValidatingTestApp
 
-DFL_APP_NAME = 'main_without_authn'
+DFL_APP_NAME = 'main'
 
 # these are all helpers & base classes, and should never
 # be considered test cases when imported into some test module

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeActivity/test.ini
----------------------------------------------------------------------
diff --git a/ForgeActivity/test.ini b/ForgeActivity/test.ini
index 1cbd5c6..b522f20 100644
--- a/ForgeActivity/test.ini
+++ b/ForgeActivity/test.ini
@@ -32,9 +32,6 @@ use = config:../Allura/test.ini
 
 activitystream.recording.enabled = true
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeBlog/test.ini
----------------------------------------------------------------------
diff --git a/ForgeBlog/test.ini b/ForgeBlog/test.ini
index c8907df..e29c4a3 100644
--- a/ForgeBlog/test.ini
+++ b/ForgeBlog/test.ini
@@ -30,9 +30,6 @@ port = 5000
 [app:main]
 use = config:../Allura/test.ini
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeChat/test.ini
----------------------------------------------------------------------
diff --git a/ForgeChat/test.ini b/ForgeChat/test.ini
index 6477871..55b5d76 100644
--- a/ForgeChat/test.ini
+++ b/ForgeChat/test.ini
@@ -30,9 +30,6 @@ port = 5000
 [app:main]
 use = config:../Allura/test.ini
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeDiscussion/test.ini
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/test.ini b/ForgeDiscussion/test.ini
index 95748cc..1d2afd7 100644
--- a/ForgeDiscussion/test.ini
+++ b/ForgeDiscussion/test.ini
@@ -30,9 +30,6 @@ port = 5000
 [app:main]
 use = config:../Allura/test.ini
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeGit/test.ini
----------------------------------------------------------------------
diff --git a/ForgeGit/test.ini b/ForgeGit/test.ini
index 58374c9..fa59b5b 100644
--- a/ForgeGit/test.ini
+++ b/ForgeGit/test.ini
@@ -30,9 +30,6 @@ port = 5000
 [app:main]
 use = config:../Allura/test.ini
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeImporters/test.ini
----------------------------------------------------------------------
diff --git a/ForgeImporters/test.ini b/ForgeImporters/test.ini
index 019c262..0d39a4e 100644
--- a/ForgeImporters/test.ini
+++ b/ForgeImporters/test.ini
@@ -30,9 +30,6 @@ port = 5000
 [app:main]
 use = config:../Allura/test.ini
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeLink/test.ini
----------------------------------------------------------------------
diff --git a/ForgeLink/test.ini b/ForgeLink/test.ini
index b3279c7..5b959b0 100644
--- a/ForgeLink/test.ini
+++ b/ForgeLink/test.ini
@@ -30,9 +30,6 @@ port = 5000
 [app:main]
 use = config:../Allura/test.ini
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeSVN/test.ini
----------------------------------------------------------------------
diff --git a/ForgeSVN/test.ini b/ForgeSVN/test.ini
index 4c2e596..426aec5 100644
--- a/ForgeSVN/test.ini
+++ b/ForgeSVN/test.ini
@@ -30,9 +30,6 @@ port = 5000
 [app:main]
 use = config:../Allura/test.ini
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeShortUrl/test.ini
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/test.ini b/ForgeShortUrl/test.ini
index 019c262..0d39a4e 100644
--- a/ForgeShortUrl/test.ini
+++ b/ForgeShortUrl/test.ini
@@ -30,9 +30,6 @@ port = 5000
 [app:main]
 use = config:../Allura/test.ini
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeTracker/test.ini
----------------------------------------------------------------------
diff --git a/ForgeTracker/test.ini b/ForgeTracker/test.ini
index 23d52ed..0202bfd 100644
--- a/ForgeTracker/test.ini
+++ b/ForgeTracker/test.ini
@@ -30,9 +30,6 @@ port = 5000
 [app:main]
 use = config:../Allura/test.ini
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeUserStats/test.ini
----------------------------------------------------------------------
diff --git a/ForgeUserStats/test.ini b/ForgeUserStats/test.ini
index 51160bb..669f24a 100644
--- a/ForgeUserStats/test.ini
+++ b/ForgeUserStats/test.ini
@@ -30,9 +30,6 @@ port = 5000
 [app:main]
 use = config:../Allura/test.ini
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aa723802/ForgeWiki/test.ini
----------------------------------------------------------------------
diff --git a/ForgeWiki/test.ini b/ForgeWiki/test.ini
index 841b55e..5ee4f32 100644
--- a/ForgeWiki/test.ini
+++ b/ForgeWiki/test.ini
@@ -30,9 +30,6 @@ port = 5000
 [app:main]
 use = config:../Allura/test.ini
 
-[app:main_without_authn]
-use = config:../Allura/test.ini#main_without_authn
-
 [app:main_with_amqp]
 use = config:../Allura/test.ini#main_with_amqp
 


[05/50] git commit: [#6979] ticket:510 added escaping colon to milestones controller

Posted by jo...@apache.org.
[#6979] ticket:510 added escaping colon to milestones controller


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/c70e94f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c70e94f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c70e94f7

Branch: refs/heads/cj/6992
Commit: c70e94f71e96ed00c2c6fb434c0f317d4f771856
Parents: 7bea076
Author: Yaroslav Sokolovsky <ya...@gmail.com>
Authored: Tue Dec 24 17:49:33 2013 +0200
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Wed Jan 1 05:46:50 2014 +0000

----------------------------------------------------------------------
 ForgeTracker/forgetracker/tracker_main.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c70e94f7/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index 71f7d64..ca3587f 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -1726,7 +1726,7 @@ class MilestoneController(BaseController):
         self.root = root
         self.field = fld
         self.milestone = m
-        self.progress_key = '%s:%s' % (fld.name, m.name)
+        self.progress_key = '%s:%s' % (fld.name, m.name.replace(':', '\:'))
         self.mongo_query = {
             'custom_fields.%s' % fld.name: m.name }
 


[47/50] git commit: [#6896] Contributing guide for new devs

Posted by jo...@apache.org.
[#6896] Contributing guide for new devs

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/5d10f30a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/5d10f30a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/5d10f30a

Branch: refs/heads/cj/6992
Commit: 5d10f30a3de05ca70a1b51784a977ac40525326a
Parents: 7642892
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Wed Jan 1 04:20:24 2014 +0000
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Thu Jan 2 18:20:40 2014 -0500

----------------------------------------------------------------------
 Allura/docs/contributing.rst      | 188 +++++++++++++++++++++++++++++++++
 Allura/docs/index.rst             |  11 +-
 Allura/docs/tutorials/testing.rst |  72 +++++++++++++
 Allura/docs/tutorials/tool.rst    |  58 ----------
 4 files changed, 270 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5d10f30a/Allura/docs/contributing.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/contributing.rst b/Allura/docs/contributing.rst
new file mode 100644
index 0000000..06920e8
--- /dev/null
+++ b/Allura/docs/contributing.rst
@@ -0,0 +1,188 @@
+Contributing to Allura
+======================
+For developers interested in hacking on Allura or its components, this guide
+will (hopefully) be a roadmap to help you get started and guide you on your
+way.
+
+Getting Help
+------------
+Along the way, you will no doubt have questions that aren't addressed here.
+For help, you can get in touch with other Allura developers on the developer
+mailing list (allura-dev@incubator.apache.org) or in the #allura channel on
+the Freenode IRC network.
+
+Installing Allura
+-----------------
+Before hacking on Allura, you'll need to get an Allura instance up and running
+so you can see and test the changes you make. You can install Allura from
+scratch, or by using our pre-built Vagrant image. Instructions for these
+approaches can be found here:
+
+* `Install from scratch <https://forge-allura.apache.org/p/allura/git/ci/master/tree/INSTALL.markdown>`_
+* `Install from Vagrant image <https://forge-allura.apache.org/p/allura/wiki/Install%20and%20Run%20Allura%20-%20Vagrant/>`_
+
+Managing Services
+-----------------
+Allura is comprised of a handful of separate services, all of which must be
+running in order for the system to be fully functional. These services (and
+how to start them) are covered in the install documentation, but are mentioned
+again here simply to reiterate the components of a complete Allura system.
+
+External services:
+
+* MongoDB - database
+* Solr - searching/indexing
+
+Allura services:
+
+* Web server - the Allura web application
+* :doc:`Taskd <guides/message_bus>` - background task daemon
+* Inbound email handler - processes email sent to the Allura instance (e.g., 
+  a reply to a ticket notification email)
+
+Logging
+-------
+The logs for Allura services can be found in ``/var/log/`` (Vagrant setup) or
+``~/logs/`` (manual setup). The most important of these is ``allura.log``, as
+it will contain log messages for all Allura application code.
+
+Technology Stack
+----------------
+`MongoDB <http://www.mongodb.org/>`_ - Allura stores all of its data in MongoDB.
+If you're new to MongoDB, you'll want to keep the `reference docs 
+<http://docs.mongodb.org/manual/reference/>`_ handy until you're familiar with
+basic query operations and syntax.
+
+`Solr <http://lucene.apache.org/solr/>`_ - Allura artifact data is indexed into
+Solr so that it can be searched. In general, you won't need to know much about
+Solr in order to work on Allura.
+
+`Turbogears <http://turbogears.org/>`_ - Allura is built on the TurboGears web
+framework. Understanding `TG controller basics <http://turbogears.readthedocs.org/en/tg2.3.0b2/turbogears/controllers.html>`_
+and `object dispatch <http://turbogears.readthedocs.org/en/tg2.3.0b2/turbogears/objectdispatch.html>`_,
+TurboGears' mechanism for routing an HTTP request to the code that should handle
+it, are critical for understanding how a request is handled by Allura.
+
+`Ming <http://merciless.sourceforge.net/index.html>`_ - Allura interfaces with
+MongoDB through Ming, a library which provides an Object Document Mapper for
+MongoDB. Fortunately, the query syntax is mostly identical to that of
+native MongoDB, so the learning curve is pretty flat.
+
+`EasyWidgets <http://easywidgets.pythonisito.com/index.html>`_ - An HTML template
+and form validation library used by Allura. The learning curve on EasyWidgets
+is, ironically, not easy. Be prepared to dig into the source if you want to
+do something complicated with EW. Fortunately, there are lots of exmaples in 
+the Allura source already.
+
+`Jinja <http://jinja.pocoo.org/>`_ - HTML template library used by Allura.
+
+If you want to work on the front end of Allura, you'll also need some CSS and
+Javascript skills, and basic knowledge of JQuery.
+
+Finding Something to Work On
+----------------------------
+Tickets that are relatively simple and good for new contributors have a
+"bitesize" label, and can be found here:
+https://sourceforge.net/p/allura/tickets/search/?q=labels%3Abitesize
+
+Find one that looks good, and leave a comment on the ticket or mailing list
+to let us know you're working on it. If you get stuck, remember that we're
+available to help on the mailing list or IRC.
+
+Code Organization
+-----------------
+The core Allura platform code is in the ``Allura/`` directory in the top-level of the
+repo. The ``Forge*/`` directories contain Allura "tools" - plugins that extend the
+core platform. For an overview of the platform and services it provides, read
+the :doc:`Platform Tour <platform_tour>` documentation. If you're interested in
+developing a new Allura plugin, you may find this `blog series <https://sourceforge.net/u/vansteenburgh/allura-plugin-development/>`_
+helpful.
+
+Tracing a Request
+-----------------
+Whether you're fixing a bug or adding a new feature, one of your first
+questions will be, "Where is the code that is handling this request (or serving
+this page)?" For a new contributor, answering this question can be surprisingly
+challenging. Here are some tips to help you out:
+
+1. The root controller for the entire application is in
+``Allura/allura/controllers/root.py`` - dispatch for *every* request begins
+here. It is possible (albeit difficult) to trace the path your request
+will take through the code from this starting point if you have a
+thorough knowledge of Turbogears' request dispatch mechanics. But, nobody
+wants to do this if they can avoid it.
+
+2. Is the page being served part of a tool (e.g. Ticket Tracker, Wiki, etc)?
+Most of the time, the answer is yes. If you know which tool is handling the
+request, you can skip right to the root controller for that tool. To find the
+root controller, first find the main entry point for the tool, which is defined
+in the ``[allura]`` section of the tool's  ``setup.py`` file. So, for example,
+if you know the request is being handled by a Ticket Tracker, look in
+``ForgeTracker/setup.py`` and you'll see that that its entry point is
+``forgetracker.tracker_main:ForgeTrackerApp``. Each Allura tool instance
+defines a ``root`` attribute which is its root controller. So once you've found
+the main tool class, you can find its root controller and begin tracing your
+request from there.
+
+3. Search for things! ``grep`` and equivalents are your friends. If you're
+looking at an html page and want to find the controller code for it, try
+searching the code base for some (static) text on the page. If your search
+successfully turns up an html page, search again on the name of the html file.
+There's a good change you'll find the controller method that renders that page.
+
+Interactive Debugging
+---------------------
+If you've never used ``ipdb`` before, you'll find it's a great tool for
+interactive debugging of Python code. In order to use ``ipdb`` to debug Allura,
+you'll first need to make sure that the process you're debugging is running in
+the foreground. In most cases you'll be debugging either the web app process
+or the taskd (background worker) process.
+
+First, make sure sure ipdb is installed in your virtual environment::
+
+    pip install ipdb
+
+Then, find the line of code where you want to start the interactive debugger,
+and insert this line above it::
+
+    import ipdb; ipdb.set_trace()
+
+Now, kill any running web or taskd procs and restart them in the
+foreground::
+
+    cd Allura
+    # web
+    pkill "paster serve" && paster serve --reload ../development.ini
+    # taskd
+    pkill "paster taskd" && paster taskd ../development.ini
+
+Make a request to the web app, and when your line of code is hit, a debug
+session will start on the console where the process is running.
+
+For more information about using ``pdb``, see the `official documentation 
+<http://docs.python.org/2/library/pdb.html>`_.
+
+Testing
+-------
+To run all the tests, execute ``./run_tests`` in the repo root. To run tests
+for a single package, for example ``forgetracker``::
+
+  cd ForgeTracker && nosetests
+
+To learn more about the ``nose`` test runner, consult the `documentation 
+<http://nose.readthedocs.org/en/latest/>`_.
+
+When writing code for Allura, don't forget that you'll need to also create
+tests that cover behaviour that you've added or changed. You may find this
+:doc:`short guide <tutorials/testing>` helpful.
+
+Submitting a Merge Request
+--------------------------
+Before submitting a merge request, make sure your changes conform to our
+`contribution guidelines <https://forge-allura.apache.org/p/allura/wiki/Contributing%20Code/>`_.
+Once your changes are finished and tested, submit them to be merged back into
+the main repo:
+
+* Fork the main Allura repo from here: https://forge-allura.apache.org/p/allura/git/ci/master/tree/
+* Commit and push your changes to your fork
+* Submit a Merge Request from your fork

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5d10f30a/Allura/docs/index.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/index.rst b/Allura/docs/index.rst
index 81c4426..7d8b82f 100644
--- a/Allura/docs/index.rst
+++ b/Allura/docs/index.rst
@@ -45,11 +45,14 @@ Developing Allura
 .. toctree::
    :maxdepth: 3
 
+   contributing
    platform
    platform_tour
    guides/message_bus
    guides/email
    guides/permissions
+   tutorials/testing
+
 
 Extending Allura
 =====================================================================
@@ -58,7 +61,13 @@ Extending Allura
    :maxdepth: 3
 
    extending
-   tutorials/tool
+
+* Writing an Allura-based app
+    * `Getting Started <https://sourceforge.net/u/vansteenburgh/allura-plugin-development/2013/06/part-1-getting-started/>`_
+    * `Forms, Artifacts, and Testing <https://sourceforge.net/u/vansteenburgh/allura-plugin-development/2013/06/part-2-creating-our-first-paste/>`_
+    * `Adding a Custom Icon <https://sourceforge.net/u/vansteenburgh/allura-plugin-development/2013/12/part-3-adding-a-custom-icon/>`_
+    * `Adding a Sidebar Menu <https://sourceforge.net/u/vansteenburgh/allura-plugin-development/2013/12/adding-a-sidebar-menu/>`_
+    * `Adding Custom CSS <https://sourceforge.net/u/vansteenburgh/allura-plugin-development/2013/12/part-5-adding-custom-css/>`_
 
 API Documentation
 ==================

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5d10f30a/Allura/docs/tutorials/testing.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/tutorials/testing.rst b/Allura/docs/tutorials/testing.rst
new file mode 100644
index 0000000..b1164a5
--- /dev/null
+++ b/Allura/docs/tutorials/testing.rst
@@ -0,0 +1,72 @@
+..     Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+
+Writing Tests for Allura Tools
+==============================
+
+Testing the controllers and models of an Allura tool is fairly
+straightforward.  Generally, you should follow the example of tests in the
+`allura/tests/functional` directory for controller tests and
+`allura.tests.model` for model tests.  For functional tests, the Allura platform
+provides a convenient "test harness" :class:`allura.controllers.test.TestController` controller
+class which is used as the application root for the
+:class:`allura.tests.TestController` class.
+
+In order to test your new tool controllers, you simply need to use the `self.app.get()`
+and `self.app.post()` methods of your test controller.  The test harness makes
+all the tools available in the system available under the URL /*entry point
+name*/.  So to test the :mod:`allura.ext.project_home` tool, for instance, we
+need only write the following::
+
+    from allura.tests import TestController
+
+    class TestProjectHome(TestController):
+
+        def test_home(self):
+            r = self.app.get('/home/')
+
+Whenever you use the :class:`allura.tests.TestController` app property, the
+test harness sets up the context so that `c.project` is always the
+`projects/test` project and whichever tool name you request is mounted at its
+entry point (so the Wiki tool will be mounted at /Wiki/).  `c.user` is always
+set to the `test-admin` user to avoid authentication issues.
+
+The framework used to generate the WSGI environment for testing your tools is
+provided by the `WebTest <http://pythonpaste.org/webtest/>`_ module, where you can
+find further documentation for the `.get()` and `.post()` methods.
+
+Testing Allura models is also straightforward, though it usually requires
+setting the pylons context object `c` before your test.  An example of this
+technique follows::
+
+    import mock
+    from pylons import tmpl_context as c, app_globals as g
+
+    from allura.lib.app_globals import Globals
+    from allura import model as M
+
+    def setUp():
+        g._push_object(Globals())
+        c._push_object(mock.Mock())
+        g.set_project('projects/test')
+        g.set_app('hello')
+        c.user = M.User.query.get(username='test-admin')
+
+Testing the tasks and events is  similar to testing models.  Generally, you will
+simply want to call your `@task` and `@event_handler` methods directly rather
+than setting up a full mocking infrastructure, though it is possible to use the
+MonQTask model in the allura model if you wish to do more functional/integration testing.

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5d10f30a/Allura/docs/tutorials/tool.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/tutorials/tool.rst b/Allura/docs/tutorials/tool.rst
deleted file mode 100644
index 2ab768d..0000000
--- a/Allura/docs/tutorials/tool.rst
+++ /dev/null
@@ -1,58 +0,0 @@
-..     Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
-
-Creating your first Allura Tool
-=====================================================================
-
-Tim Van Steenburgh has written a `series of posts guiding you through
-writing an Allura tool <https://sourceforge.net/u/vansteenburgh/allura-plugin-development/>`_.
-There is also a `companion git repo <https://sourceforge.net/u/vansteenburgh/plugin-tutorial/ci/master/tree/>`_.
-
-
-Testing your Tool
-===========================
-
-Testing the controllers and models of an Allura tool is fairly
-straightforward.  Generally, you should follow the example of tests in the
-`allura/tests/functional` directory for controller tests and
-`allura.tests.model` for model tests.  For functional tests, the Allura platform
-provides a convenient "test harness" :class:`allura.controllers.test.TestController` controller
-class which is used as the application root for the
-:class:`allura.tests.TestController` class.
-
-In order to test your new tool controllers, you simply need to use the `self.app.get()`
-and `self.app.post()` methods of your test controller.  The test harness makes
-all the tools available in the system available under the URL /*entry point
-name*/.  So to test the :mod:`allura.ext.project_home` tool, for instance, we
-need only write the following::
-
-    from allura.tests import TestController
-
-    class TestProjectHome(TestController):
-
-        def test_home(self):
-            r = self.app.get('/home/')
-
-Whenever you use the :class:`allura.tests.TestController` app property, the
-test harness sets up the context so that `c.project` is always the
-`projects/test` project and whichever tool name you request is mounted at its
-entry point (so the Wiki tool will be mounted at /Wiki/).  `c.user` is always
-set to the `test-admin` user to avoid authentication issues.
-
-The framework used to generate the WSGI environment for testing your tools is
-provided by the `WebTest <http://pythonpaste.org/webtest/>`_ module, where you can
-find further documentation for the `.get()` and `.post()` methods.


[22/50] git commit: [#6388] more help text

Posted by jo...@apache.org.
[#6388] more help text


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/cdb91d5f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/cdb91d5f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/cdb91d5f

Branch: refs/heads/cj/6992
Commit: cdb91d5fc62b16c78eea6fd5993b901663035c32
Parents: 35ed1c3
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri Dec 20 19:14:16 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:21 2014 +0000

----------------------------------------------------------------------
 scripts/perf/call_count.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cdb91d5f/scripts/perf/call_count.py
----------------------------------------------------------------------
diff --git a/scripts/perf/call_count.py b/scripts/perf/call_count.py
index 0c93705..f965294 100755
--- a/scripts/perf/call_count.py
+++ b/scripts/perf/call_count.py
@@ -39,10 +39,14 @@ from forgewiki import model as WM
 
 
 def parse_args():
-    parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter,
-                                     description='Count number of expensive calls (mongo, markdown, etc) for a standard page.')
+    parser = argparse.ArgumentParser(
+        formatter_class=argparse.RawTextHelpFormatter,
+        description='Count number of expensive calls (mongo, markdown, etc) for a standard page.\n'
+                    'Currently its a _discuss URL with a few posts on it.  This exercises core logic\n'
+                    '(project & tool lookup, security, discussion thread, main template, etc) but\n'
+                    'intentionally avoids most tool-specific code.')
     parser.add_argument('--verbose', '-v', action='store_true', default=False,
-                        help='Show call details')
+                        help='Show call details.  Note that Timers with debug_each_call=False (like ming\'s Cursor.next) are not displayed in verbose mode (but they are counted).')
     parser.add_argument('--debug-html', action='store_true', default=False,
                         help='Save HTML responses as local files')
     parser.add_argument('--data-file', default='call_counts.csv', type=argparse.FileType('a'),


[27/50] git commit: [#5424] start configuration doc changes

Posted by jo...@apache.org.
[#5424] start configuration doc changes


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/62213428
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/62213428
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/62213428

Branch: refs/heads/cj/6992
Commit: 62213428e5d2df120fcd1048c0412c886aa9fc27
Parents: f839811
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Nov 19 18:31:22 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:33 2014 +0000

----------------------------------------------------------------------
 Allura/docs/installation.rst | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/62213428/Allura/docs/installation.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/installation.rst b/Allura/docs/installation.rst
index 48d4eef..aaa6de6 100644
--- a/Allura/docs/installation.rst
+++ b/Allura/docs/installation.rst
@@ -18,15 +18,21 @@
 Installation
 =================
 
-Installation
----------------
+Install
+-------
 
 Our step-by-step setup instructions are in our INSTALL.markdown file.  You can read it online at https://forge-allura.apache.org/p/allura/git/ci/master/tree/INSTALL.markdown  You should be able to get Allura up and running in well under an hour by following those instructions.
 
 For a faster and easier setup, see our `Vagrant/VirtualBox installation guide <https://forge-allura.apache.org/p/allura/wiki/Install%20and%20Run%20Allura%20-%20Vagrant/>`_
 
+Configuring Optional Features
+-----------------------------
+
+The `development.ini` file has many options you can explore and configure.  It is geared towards development, so you will want to review
+carefully and make changes for production use.
+
 Enabling inbound email
-----------------------
+^^^^^^^^^^^^^^^^^^^^^^
 
 Allura can listen for email messages and update tools and artifacts.  For example, every ticket has an email address, and
 emails sent to that address will be added as comments on the ticket.  To set up the SMTP listener, run::
@@ -37,9 +43,8 @@ By default this uses port 8825.  Depending on your mail routing, you may need to
 And if the port is in use, this command will fail.  You can check the log file for any errors.
 To change the port number, edit `development.ini` and change `forgemail.port` to the appropriate port number for your environment.
 
-
 Enabling RabbitMQ
------------------
+^^^^^^^^^^^^^^^^^^
 
 For faster notification of background jobs, you can use RabbitMQ.  Assuming a base setup from the INSTALL, run these commands
 to install rabbitmq and set it up::


[49/50] git commit: [#6896] Update test example; comment merge instructions

Posted by jo...@apache.org.
[#6896] Update test example; comment merge instructions

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/18e8da13
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/18e8da13
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/18e8da13

Branch: refs/heads/cj/6992
Commit: 18e8da1353fd5c138fa4d6b00a659e6629c69214
Parents: d09e21d
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Thu Jan 2 22:09:13 2014 +0000
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Thu Jan 2 18:22:16 2014 -0500

----------------------------------------------------------------------
 Allura/docs/contributing.rst      | 23 +++++++++++++----------
 Allura/docs/tutorials/testing.rst | 24 ++++++++++++++----------
 2 files changed, 27 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/18e8da13/Allura/docs/contributing.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/contributing.rst b/Allura/docs/contributing.rst
index e6ed088..ac956eb 100644
--- a/Allura/docs/contributing.rst
+++ b/Allura/docs/contributing.rst
@@ -193,13 +193,16 @@ When writing code for Allura, don't forget that you'll need to also create
 tests that cover behaviour that you've added or changed. You may find this
 :doc:`short guide <tutorials/testing>` helpful.
 
-Submitting a Merge Request
---------------------------
-Before submitting a merge request, make sure your changes conform to our
-`contribution guidelines <https://forge-allura.apache.org/p/allura/wiki/Contributing%20Code/>`_.
-Once your changes are finished and tested, submit them to be merged back into
-the main repo:
-
-* Fork the main Allura repo from here: https://forge-allura.apache.org/p/allura/git/ci/master/tree/
-* Commit and push your changes to your fork
-* Submit a Merge Request from your fork
+..  Commenting out merge request instructions until we have forking working
+    on forge-allura.apache.org
+
+    Submitting a Merge Request
+    --------------------------
+    Before submitting a merge request, make sure your changes conform to our
+    `contribution guidelines <https://forge-allura.apache.org/p/allura/wiki/Contributing%20Code/>`_.
+    Once your changes are finished and tested, submit them to be merged back into
+    the main repo:
+
+    * Fork the main Allura repo from here: https://forge-allura.apache.org/p/allura/git/ci/master/tree/
+    * Commit and push your changes to your fork
+    * Submit a Merge Request from your fork

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/18e8da13/Allura/docs/tutorials/testing.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/tutorials/testing.rst b/Allura/docs/tutorials/testing.rst
index b1164a5..646a24e 100644
--- a/Allura/docs/tutorials/testing.rst
+++ b/Allura/docs/tutorials/testing.rst
@@ -49,21 +49,25 @@ The framework used to generate the WSGI environment for testing your tools is
 provided by the `WebTest <http://pythonpaste.org/webtest/>`_ module, where you can
 find further documentation for the `.get()` and `.post()` methods.
 
-Testing Allura models is also straightforward, though it usually requires
-setting the pylons context object `c` before your test.  An example of this
-technique follows::
+Testing Allura models is also straightforward, though you will often
+need to setup pylons global objects before your test. If the code under test
+uses pylons globals (like `g` and `c`), but your test doesn't require the
+fully-loaded wsgi app, you can do something like this:
 
-    import mock
-    from pylons import tmpl_context as c, app_globals as g
+.. code-block:: python
 
-    from allura.lib.app_globals import Globals
+    from pylons import tmpl_context as c
+
+    from alluratest.controller import setup_unit_test
+    from allura.lib import helpers a h
     from allura import model as M
 
     def setUp():
-        g._push_object(Globals())
-        c._push_object(mock.Mock())
-        g.set_project('projects/test')
-        g.set_app('hello')
+        # set up pylons globals
+        setup_unit_test()
+
+        # set c.project and c.app
+        h.set_context('test', 'wiki', neighborhood='Projects'):
         c.user = M.User.query.get(username='test-admin')
 
 Testing the tasks and events is  similar to testing models.  Generally, you will


[50/50] git commit: [#6992] Refactor bulk_export task some using Boundaries concepts

Posted by jo...@apache.org.
[#6992] Refactor bulk_export task some using Boundaries concepts

Signed-off-by: Cory Johns <cj...@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d2baf30f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d2baf30f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d2baf30f

Branch: refs/heads/cj/6992
Commit: d2baf30fcf0ab455050725b4461cd7798cfd329f
Parents: 18e8da1
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu Dec 19 20:22:58 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Jan 6 15:16:51 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tasks/export_tasks.py | 153 ++++++++++++++-----------------
 Allura/allura/tests/test_tasks.py   |  51 +++--------
 2 files changed, 85 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d2baf30f/Allura/allura/tasks/export_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tasks/export_tasks.py b/Allura/allura/tasks/export_tasks.py
index 2f286d0..3fd9499 100644
--- a/Allura/allura/tasks/export_tasks.py
+++ b/Allura/allura/tasks/export_tasks.py
@@ -44,89 +44,76 @@ def bulk_export(tools, filename=None, send_email=True):
     '''
     # it's very handy to use c.* within a @task,
     # but let's be explicit and keep it separate from the main code
-    return _bulk_export(c.project, tools, c.user, filename, send_email)
-
-
-def _bulk_export(project, tools, user, filename=None, send_email=True):
-    export_filename = filename or project.bulk_export_filename()
-    export_path = create_export_dir(project, export_filename)
-    not_exported_tools = []
-    for tool in tools or []:
-        app = project.app_instance(tool)
-        if not app:
-            log.info('Can not load app for %s mount point. Skipping.' % tool)
-            not_exported_tools.append(tool)
-            continue
-        if not app.exportable:
-            log.info('Tool %s is not exportable. Skipping.' % tool)
-            not_exported_tools.append(tool)
-            continue
-        log.info('Exporting %s...' % tool)
+    return BulkExport().process(c.project, tools, c.user, filename, send_email)
+
+
+class BulkExport(object):
+    def process(self, project, tools, user, filename=None, send_email=True):
+        export_filename = filename or project.bulk_export_filename()
+        export_path = self.get_export_path(project.bulk_export_path(), export_filename)
+        if not os.path.exists(export_path):
+            os.makedirs(export_path)
+        apps = [project.app_instance(tool) for tool in tools]
+        exportable = self.filter_exportable(apps)
+        results = [self.export(export_path, app) for app in exportable]
+        exported = self.filter_successful(results)
+        if exported:
+            zipdir(export_path, os.path.join(os.path.dirname(export_path), export_filename))
+        shutil.rmtree(export_path)
+
+        if not user:
+            log.info('No user. Skipping notification.')
+            return
+        if not send_email:
+            return
+
+        tmpl = g.jinja2_env.get_template('allura:templates/mail/bulk_export.html')
+        instructions = tg.config.get('bulk_export_download_instructions', '')
+        instructions = instructions.format(
+                project=project.shortname,
+                filename=export_filename,
+                c=c,
+            )
+        exported_names = [a.config.options.mount_point for a in exported]
+        tmpl_context = {
+            'instructions': instructions,
+            'project': project,
+            'tools': exported_names,
+            'not_exported_tools': list(set(tools) - set(exported_names)),
+        }
+        email = {
+            'sender': unicode(tg.config['forgemail.return_path']),
+            'fromaddr': unicode(tg.config['forgemail.return_path']),
+            'reply_to': unicode(tg.config['forgemail.return_path']),
+            'message_id': h.gen_message_id(),
+            'destinations': [unicode(user._id)],
+            'subject': u'Bulk export for project %s completed' % project.shortname,
+            'text': tmpl.render(tmpl_context),
+        }
+        mail_tasks.sendmail.post(**email)
+
+    def get_export_path(self, export_base_path, export_filename):
+        """Create temporary directory for export files"""
+        # Name temporary directory after project shortname,
+        # thus zipdir() will use proper prefix inside the archive.
+        tmp_dir_suffix = os.path.splitext(export_filename)[0]
+        path = os.path.join(export_base_path, tmp_dir_suffix)
+        return path
+
+    def filter_exportable(self, apps):
+        return [app for app in apps if app and app.exportable]
+
+    def export(self, export_path, app):
+        tool = app.config.options.mount_point
+        json_file = os.path.join(export_path, '%s.json' % tool)
         try:
-            json_file = os.path.join(export_path, '%s.json' % tool)
             with open(json_file, 'w') as f:
                 app.bulk_export(f)
-        except:
-            log.error('Something went wrong during export of %s' % tool, exc_info=True)
-            not_exported_tools.append(tool)
-            continue
-
-    if tools and len(not_exported_tools) < len(tools):
-        # If that fails, we need to let it fail
-        # there won't be a valid zip file for the user to get.
-        zip_and_cleanup(export_path, export_filename)
-    else:
-        log.error('Nothing to export')
-        return None
-
-    if not user:
-        log.info('No user. Skipping notification.')
-        return
-    if not send_email:
-        return
-
-    tmpl = g.jinja2_env.get_template('allura:templates/mail/bulk_export.html')
-    instructions = tg.config.get('bulk_export_download_instructions', '')
-    instructions = instructions.format(
-            project=project.shortname,
-            filename=export_filename,
-            c=c,
-        )
-    tmpl_context = {
-        'instructions': instructions,
-        'project': project,
-        'tools': list(set(tools) - set(not_exported_tools)),
-        'not_exported_tools': not_exported_tools,
-    }
-    email = {
-        'sender': unicode(tg.config['forgemail.return_path']),
-        'fromaddr': unicode(tg.config['forgemail.return_path']),
-        'reply_to': unicode(tg.config['forgemail.return_path']),
-        'message_id': h.gen_message_id(),
-        'destinations': [unicode(user._id)],
-        'subject': u'Bulk export for project %s completed' % project.shortname,
-        'text': tmpl.render(tmpl_context),
-    }
-    mail_tasks.sendmail.post(**email)
-
-
-def create_export_dir(project, export_filename):
-    """Create temporary directory for export files"""
-    # Name temporary directory after project shortname,
-    # thus zipdir() will use proper prefix inside the archive.
-    tmp_dir_suffix = os.path.splitext(export_filename)[0]
-    path = os.path.join(project.bulk_export_path(), tmp_dir_suffix)
-    if not os.path.exists(path):
-        os.makedirs(path)
-    return path
-
-
-def zip_and_cleanup(export_path, export_filename):
-    """
-    Zip exported data for a given path and filename.
-    Copy it to proper location. Remove temporary files.
-    """
-    zipdir(export_path, os.path.join(os.path.dirname(export_path), export_filename))
-
-    # cleanup
-    shutil.rmtree(export_path)
+        except Exception as e:
+            log.error('Error exporting: %s on %s', tool, app.project.shortname, exc_info=True)
+            return None
+        else:
+            return app
+
+    def filter_successful(self, results):
+        return [result for result in results if result is not None]

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d2baf30f/Allura/allura/tests/test_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_tasks.py b/Allura/allura/tests/test_tasks.py
index 13c6f7f..d908252 100644
--- a/Allura/allura/tests/test_tasks.py
+++ b/Allura/allura/tests/test_tasks.py
@@ -447,33 +447,29 @@ class TestExportTasks(unittest.TestCase):
         project = M.Project.query.get(shortname='test')
         shutil.rmtree(project.bulk_export_path(), ignore_errors=True)
 
-    @mock.patch('allura.tasks.export_tasks.log')
-    def test_bulk_export_invalid_tool(self, log):
-        export_tasks.bulk_export([u'bugs', u'blog'])
-        log.info.assert_any_call('Can not load app for bugs mount point. Skipping.')
-        log.info.assert_any_call('Can not load app for blog mount point. Skipping.')
-
-    @mock.patch('allura.tasks.export_tasks.log')
-    @mock.patch('allura.tasks.export_tasks.M.Project.app_instance')
-    @mock.patch('allura.tasks.export_tasks.mail_tasks')
-    @td.with_tool('test', 'Tickets', 'bugs')
-    @td.with_tool('test', 'Blog', 'blog')
-    def test_bulk_export_not_exportable_tool(self, mail_tasks, app, log):
-        app.return_value.exportable = False
-        export_tasks.bulk_export([u'bugs', u'blog'])
-        log.info.assert_any_call('Tool bugs is not exportable. Skipping.')
-        log.info.assert_any_call('Tool blog is not exportable. Skipping.')
+    def test_bulk_export_filter_exportable(self):
+        exportable = mock.Mock(exportable=True)
+        not_exportable = mock.Mock(exportable=False)
+        BE = export_tasks.BulkExport()
+        self.assertEqual(BE.filter_exportable([None, exportable, not_exportable]), [exportable])
+
+    def test_bulk_export_filter_successful(self):
+        BE = export_tasks.BulkExport()
+        self.assertEqual(BE.filter_successful(['foo', None, '0']), ['foo', '0'])
+
+    def test_get_export_path(self):
+        BE = export_tasks.BulkExport()
+        path = BE.get_export_path('/tmp/bulk_export/p/test/', 'test-0.zip')
+        self.assertEqual(path, '/tmp/bulk_export/p/test/test-0')
 
     @mock.patch('allura.model.project.Project.__json__')
     @mock.patch('allura.tasks.export_tasks.shutil')
     @mock.patch('allura.tasks.export_tasks.zipdir')
     @mock.patch('forgewiki.wiki_main.ForgeWikiApp.bulk_export')
-    @mock.patch('allura.tasks.export_tasks.log')
     @td.with_wiki
-    def test_bulk_export(self, log, wiki_bulk_export, zipdir, shutil, project_json):
+    def test_bulk_export(self, wiki_bulk_export, zipdir, shutil, project_json):
         M.MonQTask.query.remove()
         export_tasks.bulk_export([u'wiki'])
-        log.info.assert_any_call('Exporting wiki...')
         wiki_bulk_export.assert_called_once()
         project_json.assert_called_once()
         temp = '/tmp/bulk_export/p/test/test'
@@ -493,23 +489,6 @@ class TestExportTasks(unittest.TestCase):
         assert_in('The following tools were exported:\n- wiki', text)
         assert_in('Sample instructions for test', text)
 
-    def test_create_export_dir(self):
-        project = M.Project.query.get(shortname='test')
-        export_path = project.bulk_export_path()
-        export_filename = project.bulk_export_filename()
-        path = export_tasks.create_export_dir(project, export_filename)
-        assert_equal(path, '/tmp/bulk_export/p/test/test')
-        assert os.path.exists(os.path.join(export_path, project.shortname))
-
-    @onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
-    def test_zip_and_cleanup(self):
-        project = M.Project.query.get(shortname='test')
-        export_filename = project.bulk_export_filename()
-        path = export_tasks.create_export_dir(project, export_filename)
-        export_tasks.zip_and_cleanup(path, export_filename)
-        assert not os.path.exists(path)
-        assert os.path.exists(os.path.join(project.bulk_export_path(), 'test.zip'))
-
     def test_bulk_export_status(self):
         assert_equal(c.project.bulk_export_status(), None)
         export_tasks.bulk_export.post(['wiki'])


[43/50] git commit: [#4091] ticket:489 Fix scripts which depend on per project database_uri

Posted by jo...@apache.org.
[#4091] ticket:489 Fix scripts which depend on per project database_uri


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/0e8e6de5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/0e8e6de5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/0e8e6de5

Branch: refs/heads/cj/6992
Commit: 0e8e6de57a4fac1d27ff6e39fea66458d0c10c07
Parents: ef0d3ea
Author: Igor Bondarenko <je...@gmail.com>
Authored: Thu Dec 26 12:52:27 2013 +0200
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Jan 2 20:55:05 2014 +0000

----------------------------------------------------------------------
 scripts/migrate_project_database.py             | 95 --------------------
 scripts/migrations/003-migrate_project_roles.py | 26 ++----
 .../004-make-attachments-polymorphic.py         | 50 +++++------
 scripts/migrations/006-migrate-artifact-refs.py | 36 +++-----
 scripts/migrations/007-update-acls.py           |  4 +-
 5 files changed, 46 insertions(+), 165 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e8e6de5/scripts/migrate_project_database.py
----------------------------------------------------------------------
diff --git a/scripts/migrate_project_database.py b/scripts/migrate_project_database.py
deleted file mode 100644
index a30af02..0000000
--- a/scripts/migrate_project_database.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-
-import os
-import sys
-import shutil
-import logging
-
-from pylons import tmpl_context as c
-from ming.orm import session
-from allura import model as M
-log = logging.getLogger(__name__)
-
-MONGO_HOME=os.environ.get('MONGO_HOME', '/usr')
-MONGO_DUMP=os.path.join(MONGO_HOME, 'bin/mongodump')
-MONGO_RESTORE=os.path.join(MONGO_HOME, 'bin/mongorestore')
-SHARD_LENGTH=1
-
-def main():
-    if len(sys.argv) > 1:
-        shortnames = sys.argv[1:]
-    else:
-        shortnames = [ p.shortname for p in M.Project.query.find(dict(is_root=True)) ]
-    M.main_orm_session.clear()
-    for pname in shortnames:
-        # This needs to be a .find() instead of a .get() because of the
-        # __init__ projects, which have the same shortname but exist in
-        # multiple neighborhoods.
-        for project in M.Project.query.find(dict(shortname=pname)):
-            migrate_project_database(project)
-
-def migrate_project_database(project):
-    c.project = project
-    target_uri = M.Project.default_database_uri(project.shortname)
-    target_db = target_uri.rsplit('/')[-1]
-    if project.database_uri == target_uri:
-        log.info('Project %s is already migrated to %s', project.shortname, project.database_uri)
-        return 2
-    conn = M.session.main_doc_session.db.connection
-    host = '%s:%s' % (conn.host, conn.port)
-    dirname = os.tempnam()
-    try:
-        log.info('Backing up %s to %s', project.shortname, dirname)
-        db_uri = project.database_uri
-        db = db_uri.rsplit('/')[-1]
-        assert 0 == os.system('%s --host %s --db %s -o %s' % (
-                MONGO_DUMP, host, db, dirname))
-        assert 0 == os.system('%s --host %s --db %s %s/%s ' % (
-                MONGO_RESTORE, host, target_db, dirname, db))
-        for p in M.Project.query.find(dict(database_uri=db_uri)):
-            p.database_uri = M.Project.default_database_uri(project.shortname)
-        session(project).flush()
-        conn.drop_database(db)
-    finally:
-        if os.path.exists(dirname):
-            shutil.rmtree(dirname)
-    return 0
-
-def pm(etype, value, tb): # pragma no cover
-    import pdb, traceback
-    try:
-        from IPython.ipapi import make_session; make_session()
-        from IPython.Debugger import Pdb
-        sys.stderr.write('Entering post-mortem IPDB shell\n')
-        p = Pdb(color_scheme='Linux')
-        p.reset()
-        p.setup(None, tb)
-        p.print_stack_trace()
-        sys.stderr.write('%s: %s\n' % ( etype, value))
-        p.cmdloop()
-        p.forget()
-        # p.interaction(None, tb)
-    except ImportError:
-        sys.stderr.write('Entering post-mortem PDB shell\n')
-        traceback.print_exception(etype, value, tb)
-        pdb.post_mortem(tb)
-
-sys.excepthook = pm
-
-if __name__ == '__main__':
-    sys.exit(main())

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e8e6de5/scripts/migrations/003-migrate_project_roles.py
----------------------------------------------------------------------
diff --git a/scripts/migrations/003-migrate_project_roles.py b/scripts/migrations/003-migrate_project_roles.py
index 51dc2d8..580f93f 100644
--- a/scripts/migrations/003-migrate_project_roles.py
+++ b/scripts/migrations/003-migrate_project_roles.py
@@ -15,30 +15,18 @@
 #       specific language governing permissions and limitations
 #       under the License.
 
-'''Merge all the OldProjectRole collections in various project databases into a
-central ProjectRole collection.
+'''Merge all the OldProjectRole collections in into a ProjectRole collection.
 '''
 import logging
 
-from pylons import tmpl_context as c
-
 from ming.orm import session, state
 from allura import model as M
 
 log = logging.getLogger(__name__)
 
-seen_databases = set()
-projects = M.Project.query.find().all()
-
-for p in projects:
-    if p.database_uri in seen_databases:
-        continue
-    seen_databases.add(p.database_uri)
-    log.info('Moving project roles in database %s to main DB',
-             p.database_uri)
-    c.project = p
-    for opr in M.OldProjectRole.query.find():
-        pr = M.ProjectRole(**state(opr).document)
-    session(opr).clear()
-    session(pr).flush()
-    session(pr).clear()
+log.info('Moving project roles in database %s to main DB', M.Project.database_uri())
+for opr in M.OldProjectRole.query.find():
+    pr = M.ProjectRole(**state(opr).document)
+session(opr).clear()
+session(pr).flush()
+session(pr).clear()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e8e6de5/scripts/migrations/004-make-attachments-polymorphic.py
----------------------------------------------------------------------
diff --git a/scripts/migrations/004-make-attachments-polymorphic.py b/scripts/migrations/004-make-attachments-polymorphic.py
index 8839e51..0c34d58 100644
--- a/scripts/migrations/004-make-attachments-polymorphic.py
+++ b/scripts/migrations/004-make-attachments-polymorphic.py
@@ -17,8 +17,6 @@
 
 import logging
 
-from pylons import tmpl_context as c
-
 from ming.orm import ThreadLocalORMSession
 from allura import model as M
 from forgetracker import model as TM
@@ -28,31 +26,29 @@ from forgediscussion import model as DM
 log = logging.getLogger(__name__)
 
 def main():
-    dbs = dict((p.database_uri, p) for p in M.Project.query.find())
-    for db, p in sorted(dbs.items()):
-        log.info('=== Making attachments in %s polymorphic ===', db)
-        c.project = p
-        log.info('Fixing %d discussions', M.Discussion.query.find().count())
-        for d in M.Discussion.query.find():
-            for a in M.DiscussionAttachment.query.find(dict(
-                    discussion_id=d._id)):
-                log.info('%s: %s', d.url(), a.filename)
-        log.info('Fixing %d forums', DM.Forum.query.find().count())
-        for d in DM.Forum.query.find():
-            for a in DM.ForumAttachment.query.find(dict(
-                    discussion_id=d._id)):
-                log.info('%s: %s', d.url(), a.filename)
-        log.info('Fixing %d tickets', TM.Ticket.query.find().count())
-        for t in TM.Ticket.query.find():
-            for a in TM.TicketAttachment.query.find(dict(
-                    artifact_id=t._id)):
-                log.info('%s: %s', t.url(), a.filename)
-        log.info('Fixing %d wikis', WM.Page.query.find().count())
-        for p in WM.Page.query.find():
-            for a in WM.WikiAttachment.query.find(dict(
-                    artifact_id=p._id)):
-                log.info('%s: %s', p.url(), a.filename)
-        ThreadLocalORMSession.flush_all()
+    db = M.project_doc_session.db
+    log.info('=== Making attachments in %s polymorphic ===', db)
+    log.info('Fixing %d discussions', M.Discussion.query.find().count())
+    for d in M.Discussion.query.find():
+        for a in M.DiscussionAttachment.query.find(dict(
+                discussion_id=d._id)):
+            log.info('%s: %s', d.url(), a.filename)
+    log.info('Fixing %d forums', DM.Forum.query.find().count())
+    for d in DM.Forum.query.find():
+        for a in DM.ForumAttachment.query.find(dict(
+                discussion_id=d._id)):
+            log.info('%s: %s', d.url(), a.filename)
+    log.info('Fixing %d tickets', TM.Ticket.query.find().count())
+    for t in TM.Ticket.query.find():
+        for a in TM.TicketAttachment.query.find(dict(
+                artifact_id=t._id)):
+            log.info('%s: %s', t.url(), a.filename)
+    log.info('Fixing %d wikis', WM.Page.query.find().count())
+    for p in WM.Page.query.find():
+        for a in WM.WikiAttachment.query.find(dict(
+                artifact_id=p._id)):
+            log.info('%s: %s', p.url(), a.filename)
+    ThreadLocalORMSession.flush_all()
 
 if __name__ == '__main__':
     main()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e8e6de5/scripts/migrations/006-migrate-artifact-refs.py
----------------------------------------------------------------------
diff --git a/scripts/migrations/006-migrate-artifact-refs.py b/scripts/migrations/006-migrate-artifact-refs.py
index f1afa84..dc9149c 100644
--- a/scripts/migrations/006-migrate-artifact-refs.py
+++ b/scripts/migrations/006-migrate-artifact-refs.py
@@ -19,8 +19,6 @@ import sys
 import logging
 from cPickle import loads
 
-from pylons import tmpl_context as c
-
 from allura import model as M
 
 log = logging.getLogger('allura.migrate-artifact-refs')
@@ -28,27 +26,21 @@ log = logging.getLogger('allura.migrate-artifact-refs')
 # Threads have artifact references that must be migrated to the new system
 def main():
     test = sys.argv[-1] == 'test'
-    all_projects = M.Project.query.find().all()
     log.info('Fixing artifact references in threads')
-    seen_dbs = set()
-    for project in all_projects:
-        if project.database_uri in seen_dbs: continue
-        seen_dbs.add(project.database_uri)
-        c.project = project
-        db = M.project_doc_session.db
-        for thread in db.thread.find():
-            ref = thread.pop('artifact_reference', None)
-            if ref is None: continue
-            Artifact = loads(ref['artifact_type'])
-            artifact = Artifact.query.get(_id=ref['artifact_id'])
-            M.ArtifactReference.from_artifact(artifact)
-            thread['ref_id'] = artifact.index_id()
-            if not test:
-                db.thread.save(thread)
-                log.info('saving thread %s', thread['_id'])
-            else:
-                log.info('would save thread %s', thread['_id'])
-            M.artifact_orm_session.clear()
+    db = M.project_doc_session.db
+    for thread in db.thread.find():
+        ref = thread.pop('artifact_reference', None)
+        if ref is None: continue
+        Artifact = loads(ref['artifact_type'])
+        artifact = Artifact.query.get(_id=ref['artifact_id'])
+        M.ArtifactReference.from_artifact(artifact)
+        thread['ref_id'] = artifact.index_id()
+        if not test:
+            db.thread.save(thread)
+            log.info('saving thread %s', thread['_id'])
+        else:
+            log.info('would save thread %s', thread['_id'])
+        M.artifact_orm_session.clear()
 
 if __name__ == '__main__':
     main()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e8e6de5/scripts/migrations/007-update-acls.py
----------------------------------------------------------------------
diff --git a/scripts/migrations/007-update-acls.py b/scripts/migrations/007-update-acls.py
index 4c7aaa3..16e28a8 100644
--- a/scripts/migrations/007-update-acls.py
+++ b/scripts/migrations/007-update-acls.py
@@ -38,7 +38,7 @@ c_project =  main_db.project
 c_user = main_db.user
 c_project_role = main_db.project_role
 c.project = Object(
-    database_uri=c_project.find().next()['database_uri'])
+    database_uri=M.Project.database_uri())
 
 project_db = M.project_doc_session.db
 c_app_config = project_db.config
@@ -171,7 +171,7 @@ def _project_role(project_id, name=None, user_id=None):
         roles=[])
     c_project_role.save(doc)
     return doc
-                                 
+
 
 def simple_acl_update(doc, collection_name):
     '''Update dict-style to list-style ACL'''


[14/50] git commit: [#6388] don't query for a post parent if its None

Posted by jo...@apache.org.
[#6388] don't query for a post parent if its None


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a7ab2f3c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a7ab2f3c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a7ab2f3c

Branch: refs/heads/cj/6992
Commit: a7ab2f3c40a46abde24403b6896ca364b3b4925e
Parents: b97e47f
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Dec 19 17:44:13 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:20 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/discuss.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a7ab2f3c/Allura/allura/model/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index 1059295..efa7b35 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -531,7 +531,8 @@ class Post(Message, VersionedArtifact, ActivityObject):
 
     @property
     def parent(self):
-        return self.query.get(_id=self.parent_id)
+        if self.parent_id:
+            return self.query.get(_id=self.parent_id)
 
     @property
     def subject(self):


[19/50] git commit: [#6388] don't do verbose logging on cursor.next

Posted by jo...@apache.org.
[#6388] don't do verbose logging on cursor.next


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ec1e8d06
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ec1e8d06
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ec1e8d06

Branch: refs/heads/cj/6992
Commit: ec1e8d06c1e1bcb08c8e7c98ac76f4e4aa870100
Parents: 1cff564
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Dec 19 17:11:52 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:20 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/custom_middleware.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ec1e8d06/Allura/allura/lib/custom_middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/custom_middleware.py b/Allura/allura/lib/custom_middleware.py
index e5fef4f..498a614 100644
--- a/Allura/allura/lib/custom_middleware.py
+++ b/Allura/allura/lib/custom_middleware.py
@@ -192,7 +192,8 @@ class AlluraTimerMiddleware(TimerMiddleware):
         return self.entry_point_timers() + [
             Timer('jinja', jinja2.Template, 'render', 'stream', 'generate'),
             Timer('markdown', markdown.Markdown, 'convert'),
-            Timer('ming', ming.odm.odmsession.ODMCursor, 'next'),  # FIXME: this may captures timings ok, but is misleading for counts
+            Timer('ming', ming.odm.odmsession.ODMCursor, 'next',  # FIXME: this may captures timings ok, but is misleading for counts
+                  debug_each_call=False),
             Timer('ming', ming.odm.odmsession.ODMSession, 'flush', 'find',
                 'get'),
             Timer('ming', ming.schema.Document, 'validate',


[31/50] git commit: [#5424] simplify documentation nav links

Posted by jo...@apache.org.
[#5424] simplify documentation nav links


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/f8398113
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/f8398113
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/f8398113

Branch: refs/heads/cj/6992
Commit: f83981132c360da872e5dfe7ba4d0293482c7ae0
Parents: ca0d9d4
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Nov 19 18:16:22 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:33 2014 +0000

----------------------------------------------------------------------
 Allura/docs/_templates/layout.html |  5 +++++
 Allura/docs/conf.py                | 12 +++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f8398113/Allura/docs/_templates/layout.html
----------------------------------------------------------------------
diff --git a/Allura/docs/_templates/layout.html b/Allura/docs/_templates/layout.html
new file mode 100644
index 0000000..d098c91
--- /dev/null
+++ b/Allura/docs/_templates/layout.html
@@ -0,0 +1,5 @@
+{% extends "!layout.html" %}
+{% block rootrellink %}
+    <li><a href="https://forge-allura.apache.org/p/allura/">Allura Home</a> &raquo;</li>
+    {{ super() }}
+{% endblock %}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f8398113/Allura/docs/conf.py
----------------------------------------------------------------------
diff --git a/Allura/docs/conf.py b/Allura/docs/conf.py
index 3029c64..7b20c15 100644
--- a/Allura/docs/conf.py
+++ b/Allura/docs/conf.py
@@ -113,7 +113,9 @@ html_theme = 'nature'
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
 # documentation.
-#html_theme_options = {}
+html_theme_options = {
+    'sidebarwidth': 280,  # default 230 (px)
+}
 
 # Add any paths that contain custom themes here, relative to this directory.
 #html_theme_path = []
@@ -123,7 +125,7 @@ html_theme = 'nature'
 html_title = 'Allura documentation'
 
 # A shorter title for the navigation bar.  Default is the same as html_title.
-#html_short_title = None
+html_short_title = 'Documentation'
 
 # The name of an image file (relative to this directory) to place at the top
 # of the sidebar.
@@ -155,16 +157,16 @@ html_static_path = ['_static']
 #html_additional_pages = {}
 
 # If false, no module index is generated.
-#html_use_modindex = True
+html_use_modindex = False
 
 # If false, no index is generated.
-#html_use_index = True
+html_use_index = False
 
 # If true, the index is split into individual pages for each letter.
 #html_split_index = False
 
 # If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
+html_show_sourcelink = False
 
 # If true, an OpenSearch description file will be output, and all pages will
 # contain a <link> tag referring to it.  The value of this option must be the


[17/50] git commit: [#6388] simple call count script

Posted by jo...@apache.org.
[#6388] simple call count script


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/497a7347
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/497a7347
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/497a7347

Branch: refs/heads/cj/6992
Commit: 497a734704e692b02479a885390ddd2a4b0e3c53
Parents: 0f9768d
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Dec 17 21:27:56 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:20 2014 +0000

----------------------------------------------------------------------
 Allura/allura/tests/decorators.py | 26 +++++++++++
 scripts/perf/call_count.py        | 80 ++++++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/497a7347/Allura/allura/tests/decorators.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/decorators.py b/Allura/allura/tests/decorators.py
index dd9fdf1..3e1c43d 100644
--- a/Allura/allura/tests/decorators.py
+++ b/Allura/allura/tests/decorators.py
@@ -26,6 +26,7 @@ import tg
 from paste.deploy.converters import asbool
 
 from allura import model as M
+import allura.config.middleware
 
 
 def with_user_project(username):
@@ -120,3 +121,28 @@ def without_module(*module_names):
                 return func(*a, **kw)
         return wrapped
     return _without_module
+
+
+class patch_middleware_config(object):
+    '''
+    Context manager that patches the configuration used during middleware
+    setup for Allura
+    '''
+
+    def __init__(self, new_configs):
+        self.new_configs = new_configs
+
+    def __enter__(self):
+        self._make_app = allura.config.middleware.make_app
+
+        def make_app(global_conf, full_stack=True, **app_conf):
+            app_conf.update(self.new_configs)
+            return self._make_app(global_conf, full_stack, **app_conf)
+
+        allura.config.middleware.make_app = make_app
+
+        return self
+
+    def __exit__(self, exc_type, exc_val, exc_t):
+        allura.config.middleware.make_app = self._make_app
+        return self

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/497a7347/scripts/perf/call_count.py
----------------------------------------------------------------------
diff --git a/scripts/perf/call_count.py b/scripts/perf/call_count.py
new file mode 100755
index 0000000..2b8e15c
--- /dev/null
+++ b/scripts/perf/call_count.py
@@ -0,0 +1,80 @@
+#!/usr/bin/env python
+
+#       Licensed to the Apache Software Foundation (ASF) under one
+#       or more contributor license agreements.  See the NOTICE file
+#       distributed with this work for additional information
+#       regarding copyright ownership.  The ASF licenses this file
+#       to you under the Apache License, Version 2.0 (the
+#       "License"); you may not use this file except in compliance
+#       with the License.  You may obtain a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#       Unless required by applicable law or agreed to in writing,
+#       software distributed under the License is distributed on an
+#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#       KIND, either express or implied.  See the License for the
+#       specific language governing permissions and limitations
+#       under the License.
+
+import json
+from pprint import pprint
+
+from pylons import tmpl_context as c
+from testfixtures import LogCapture
+
+from allura import model as M
+from allura.lib.helpers import push_config
+from allura.tests import TestController
+from allura.tests.decorators import patch_middleware_config
+
+from forgewiki import model as WM
+
+
+def main():
+    test = TestController()
+    setup(test)
+    url = generate_wiki_thread(test)
+    load_page(test, url)
+    load_page(test, url)
+    load_page(test, url)
+    test.tearDown()
+
+
+def setup(test):
+    # includes setting up mim
+    with patch_middleware_config({'stats.sample_rate': 1}):
+       test.setUp()
+
+
+def generate_wiki_thread(test):
+    # automagically instantiate the app
+    test.app.get('/wiki/')
+
+    project = M.Project.query.get(shortname='test')
+    app = project.app_instance('wiki')
+
+    page = WM.Page.query.get(app_config_id=app.config._id, title='Home')
+    thread = page.discussion_thread
+    # create 3 posts by 2 users
+    with push_config(c, user=M.User.query.get(username='test-admin'),
+                        app=app,
+                        project=project):
+        thread.add_post(text='This is very helpful')
+        thread.add_post(text="But it's not **super** helpful")
+        with push_config(c, user=M.User.query.get(username='test-user')):
+            thread.add_post(text='I disagree')
+
+    url = '/p/test/wiki/_discuss/thread/{}/'.format(thread._id)
+    return url
+
+
+def load_page(test, url):
+    with LogCapture('stats') as l:
+        print url, test.app.get(url, extra_environ=dict(username='*anonymous')).status
+    for r in l.records:
+        timings = json.loads(r.message)
+        print json.dumps(timings['call_counts'])
+
+if __name__ == '__main__':
+    main()


[24/50] git commit: [#6388] avoid empty trove queries

Posted by jo...@apache.org.
[#6388] avoid empty trove queries


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/35ed1c39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/35ed1c39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/35ed1c39

Branch: refs/heads/cj/6992
Commit: 35ed1c39ed49f9225071263db578e1562c292a2d
Parents: 15225cd
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri Dec 20 19:03:12 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:21 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/project.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/35ed1c39/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index d8584ef..b720343 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -257,7 +257,11 @@ class Project(MappedClass, ActivityNode, ActivityObject):
         return result
 
     def troves_by_type(self, trove_type):
-        return TroveCategory.query.find({'_id':{'$in':getattr(self,'trove_%s' % trove_type)}}).all()
+        troves = getattr(self, 'trove_%s' % trove_type)
+        if troves:
+            return TroveCategory.query.find({'_id':{'$in': troves}}).all()
+        else:
+            return []
 
     def all_troves(self):
         '''


[09/50] git commit: [#6388] always load test.ini from the Allura/ dir

Posted by jo...@apache.org.
[#6388] always load test.ini from the Allura/ dir

This allows us to not duplicate test.ini in every dir (any local
changes required should be accomplished via mocks).

We can also can run functional tests from any directory now.


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/0f9768d5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/0f9768d5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/0f9768d5

Branch: refs/heads/cj/6992
Commit: 0f9768d51bf2ab5a360863d7516850ae0570de20
Parents: aa72380
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Dec 17 19:17:37 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 16:16:19 2014 +0000

----------------------------------------------------------------------
 AlluraTest/alluratest/controller.py |  3 +-
 ForgeActivity/test.ini              | 69 --------------------------------
 ForgeBlog/test.ini                  | 67 -------------------------------
 ForgeChat/test.ini                  | 67 -------------------------------
 ForgeDiscussion/test.ini            | 67 -------------------------------
 ForgeGit/test.ini                   | 67 -------------------------------
 ForgeImporters/test.ini             | 67 -------------------------------
 ForgeLink/test.ini                  | 67 -------------------------------
 ForgeSVN/test.ini                   | 67 -------------------------------
 ForgeShortUrl/test.ini              | 67 -------------------------------
 ForgeTracker/test.ini               | 67 -------------------------------
 ForgeUserStats/test.ini             | 67 -------------------------------
 ForgeWiki/test.ini                  | 67 -------------------------------
 13 files changed, 2 insertions(+), 807 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/AlluraTest/alluratest/controller.py
----------------------------------------------------------------------
diff --git a/AlluraTest/alluratest/controller.py b/AlluraTest/alluratest/controller.py
index 4c3c4e5..62cc03c 100644
--- a/AlluraTest/alluratest/controller.py
+++ b/AlluraTest/alluratest/controller.py
@@ -33,6 +33,7 @@ from webob import Request, Response
 import ew
 from ming.orm import ThreadLocalORMSession
 import ming.orm
+import pkg_resources
 
 from allura import model as M
 import allura.lib.security
@@ -56,7 +57,7 @@ def get_config_file(config=None):
     try:
         conf_dir = tg.config.here
     except AttributeError:
-        conf_dir = os.getcwd()
+        conf_dir = pkg_resources.resource_filename('Allura', '..')
     return os.path.join(conf_dir, config)
 
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeActivity/test.ini
----------------------------------------------------------------------
diff --git a/ForgeActivity/test.ini b/ForgeActivity/test.ini
deleted file mode 100644
index b522f20..0000000
--- a/ForgeActivity/test.ini
+++ /dev/null
@@ -1,69 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-activitystream.recording.enabled = true
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgeactivity
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeBlog/test.ini
----------------------------------------------------------------------
diff --git a/ForgeBlog/test.ini b/ForgeBlog/test.ini
deleted file mode 100644
index e29c4a3..0000000
--- a/ForgeBlog/test.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgeblog
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeChat/test.ini
----------------------------------------------------------------------
diff --git a/ForgeChat/test.ini b/ForgeChat/test.ini
deleted file mode 100644
index 55b5d76..0000000
--- a/ForgeChat/test.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgechat
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeDiscussion/test.ini
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/test.ini b/ForgeDiscussion/test.ini
deleted file mode 100644
index 1d2afd7..0000000
--- a/ForgeDiscussion/test.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgediscussion
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeGit/test.ini
----------------------------------------------------------------------
diff --git a/ForgeGit/test.ini b/ForgeGit/test.ini
deleted file mode 100644
index fa59b5b..0000000
--- a/ForgeGit/test.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgegit
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeImporters/test.ini
----------------------------------------------------------------------
diff --git a/ForgeImporters/test.ini b/ForgeImporters/test.ini
deleted file mode 100644
index 0d39a4e..0000000
--- a/ForgeImporters/test.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgeshorturl
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeLink/test.ini
----------------------------------------------------------------------
diff --git a/ForgeLink/test.ini b/ForgeLink/test.ini
deleted file mode 100644
index 5b959b0..0000000
--- a/ForgeLink/test.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgelink
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeSVN/test.ini
----------------------------------------------------------------------
diff --git a/ForgeSVN/test.ini b/ForgeSVN/test.ini
deleted file mode 100644
index 426aec5..0000000
--- a/ForgeSVN/test.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgesvn
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeShortUrl/test.ini
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/test.ini b/ForgeShortUrl/test.ini
deleted file mode 100644
index 0d39a4e..0000000
--- a/ForgeShortUrl/test.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgeshorturl
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeTracker/test.ini
----------------------------------------------------------------------
diff --git a/ForgeTracker/test.ini b/ForgeTracker/test.ini
deleted file mode 100644
index 0202bfd..0000000
--- a/ForgeTracker/test.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgetracker
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeUserStats/test.ini
----------------------------------------------------------------------
diff --git a/ForgeUserStats/test.ini b/ForgeUserStats/test.ini
deleted file mode 100644
index 669f24a..0000000
--- a/ForgeUserStats/test.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgeuserstats
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0f9768d5/ForgeWiki/test.ini
----------------------------------------------------------------------
diff --git a/ForgeWiki/test.ini b/ForgeWiki/test.ini
deleted file mode 100644
index 5ee4f32..0000000
--- a/ForgeWiki/test.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-#       Licensed to the Apache Software Foundation (ASF) under one
-#       or more contributor license agreements.  See the NOTICE file
-#       distributed with this work for additional information
-#       regarding copyright ownership.  The ASF licenses this file
-#       to you under the Apache License, Version 2.0 (the
-#       "License"); you may not use this file except in compliance
-#       with the License.  You may obtain a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#       Unless required by applicable law or agreed to in writing,
-#       software distributed under the License is distributed on an
-#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#       KIND, either express or implied.  See the License for the
-#       specific language governing permissions and limitations
-#       under the License.
-#
-# allura - TurboGears 2 testing environment configuration
-#
-# The %(here)s variable will be replaced with the parent directory of this file
-#
-[DEFAULT]
-debug = true
-
-[server:main]
-use = egg:Paste#http
-host = 0.0.0.0
-port = 5000
-
-[app:main]
-use = config:../Allura/test.ini
-
-[app:main_with_amqp]
-use = config:../Allura/test.ini#main_with_amqp
-
-[loggers]
-keys = root, allura, tool
-
-[handlers]
-keys = test
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = INFO
-handlers = test
-
-[logger_allura]
-level = DEBUG
-handlers =
-qualname = allura
-
-[logger_tool]
-level = DEBUG
-handlers =
-qualname = forgewiki
-
-[handler_test]
-class = FileHandler
-args = ('test.log',)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S


[42/50] git commit: [#5749] bind to future click events; cleaner radio finding logic

Posted by jo...@apache.org.
[#5749] bind to future click events; cleaner radio finding logic


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ef0562c5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ef0562c5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ef0562c5

Branch: refs/heads/cj/6992
Commit: ef0562c59c2ca1c6d254ac1dc03197503b139802
Parents: 515a7b1
Author: Dave Brondsema <da...@brondsema.net>
Authored: Thu Jan 2 13:57:34 2014 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:33:25 2014 +0000

----------------------------------------------------------------------
 .../forgetracker/templates/tracker/admin_fields.html   | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ef0562c5/ForgeTracker/forgetracker/templates/tracker/admin_fields.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/admin_fields.html b/ForgeTracker/forgetracker/templates/tracker/admin_fields.html
index 36b357b..1d09e3c 100644
--- a/ForgeTracker/forgetracker/templates/tracker/admin_fields.html
+++ b/ForgeTracker/forgetracker/templates/tracker/admin_fields.html
@@ -62,18 +62,11 @@
 {% block extra_js %}
 <script type="text/javascript">
     $(document).ready(function () {
-        $(":radio.default-milestone").click(function(){
+        $(document).on('click', ":radio.default-milestone", function(){
             // page can contain more that one milestone field,
             // so we should touch only radio buttons corresponding to given field
-            var name_prefix = $(this).attr("name").match(/custom_fields-\d+/)[0];
-            var all_radios = $(":radio.default-milestone");
-            var radios = all_radios.filter(function(radio) {
-                if (this.name.slice(0, name_prefix.length) == name_prefix) {
-                    return true;
-                }
-                return false;
-            });
-            radios.attr("checked", false);
+            var parent_table = $(this).closest('table');
+            $(":radio.default-milestone", parent_table).attr("checked", false);
             $(this).attr("checked", true);
         });
     });


[37/50] git commit: [#5424] instructions for git/svn setup (no auth)

Posted by jo...@apache.org.
[#5424] instructions for git/svn setup (no auth)


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/b48aac48
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b48aac48
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b48aac48

Branch: refs/heads/cj/6992
Commit: b48aac48178f50375b110ee8a75ae47c5a190003
Parents: e0e9df2
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri Dec 13 17:26:31 2013 -0500
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Jan 2 20:22:35 2014 +0000

----------------------------------------------------------------------
 Allura/docs/scm_host.rst | 232 ++++++++++++++++++++++++++----------------
 1 file changed, 143 insertions(+), 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b48aac48/Allura/docs/scm_host.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/scm_host.rst b/Allura/docs/scm_host.rst
index 10532f4..f500703 100644
--- a/Allura/docs/scm_host.rst
+++ b/Allura/docs/scm_host.rst
@@ -23,22 +23,30 @@ Git and Subversion Hosting Installation
 Allura can manage and display Git and SVN repositories, but it doesn't
 automatically run the git and svn services for you.  Here we'll describe how
 to set up standard git and svn services to work with Allura, so that you can
-checkout and commit code with those repositories.
+checkout and commit code with those repositories.  The instructions here assume
+an Ubuntu system, but should be similar on other systems.
+
+.. note::
+
+    For developing with Allura or simple testing of Allura, you do not need to run
+    these services.  You can use local filesystem access to git and svn, which
+    works with no additional configuration.
 
 Git
 --------------
 
 We'll cover the basics to get you going.  For additional options and details,
 see http://git-scm.com/docs/git-http-backend and http://git-scm.com/book/en/Git-on-the-Server
-and subsequent chapters.  The instructions here assume an
-Ubuntu system, but should be similar on other systems.
+and subsequent chapters.
 
-.. code-block:: console
+.. code-block:: bash
 
+    sudo mkdir /srv/git
+    sudo chown allura:allura /srv/git  # or other user, as needed (e.g. "vagrant")
     sudo a2enmod proxy rewrite
     sudo vi /etc/apache2/sites-available/default
 
-And add the following text within the `<VirtualHost>` block:
+And add the following text within the :code:`<VirtualHost>` block:
 
 .. code-block:: apache
 
@@ -47,89 +55,135 @@ And add the following text within the `<VirtualHost>` block:
     ProxyPass /git/ !
     ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
 
-    RewriteCond %{QUERY_STRING} service=git-receive-pack [OR]
-    RewriteCond %{REQUEST_URI} /git-receive-pack$
-    RewriteRule ^/git/ - [E=AUTHREQUIRED:yes]
+    # no authentication required at all - for testing purposes
+    SetEnv REMOTE_USER=git-allura
 
-    <LocationMatch "^/git/">
-        Order Deny,Allow
-        Deny from env=AUTHREQUIRED
-
-        AuthType Basic
-        AuthName "Git Access"
-        Require group committers
-        Satisfy Any
-    </LocationMatch>
-
-Then exit vim (`<esc> :wq`) and run:
+Then exit vim (:kbd:`<esc> :wq`) and run:
 
 .. code-block:: shell-session
 
     sudo service apache2 reload
 
-To test that it's working, run: `git ls-remote http://localhost/git/p/test/git/`
-(if using vagrant, use localhost:8088 on your host machine).  If there is no output,
-that is fine (it'll list git heads once the repo has commits in it).
+To test that it's working, run: :command:`git ls-remote http://localhost/git/p/test/git/`
+(if using Vagrant, use :code:`localhost:8088` from your host machine).
+If there is no output, that is fine (it's an empty repo).
 
-Note that this has no authentication and is suitable for development only.
+.. warning::
 
-If you want to run a separate readonly git service, using the git protocol instead of http,
-run: `git daemon --reuseaddr --export-all --base-path=/srv/git /srv/git`  It can
-be accessed at `git://localhost/p/test/git`
+    This configuration has no authentication and is suitable for development only.
 
-Depending on the hostname and ports you use, you may need to change the `scm.host.*`
-settings in `development.ini`.
+Now you will want to change the :samp:`scm.host.{*}.git`
+settings in :file:`development.ini`, so that the proper commands are shown to your visitors
+when they browse the code repo web pages.
+
+Read-only `git://`
+^^^^^^^^^^^^^^^^^^^^^^^^^
+If you want to run a separate readonly git service, using the git protocol instead of http,
+run: :program:`git daemon --reuseaddr --export-all --base-path=/srv/git /srv/git`  It can
+be accessed at :code:`git://localhost/p/test/git`
 
 
 Subversion
 --------------
 
+These instructions will cover the recommended easiest way to run Subversion with Allura.
+For an overview of other options, see http://svnbook.red-bean.com/en/1.8/svn.serverconfig.choosing.html
+and subsequent chapters.
 
-Temp Notes:
---------------
+.. code-block:: bash
+
+    sudo mkdir /srv/svn
+    sudo chown allura:allura /srv/svn  # or other user, as needed (e.g. "vagrant")
+
+    cat > /srv/svn/svnserve.conf <<EOF
+    [general]
+    realm = My Site SVN
+    # no authentication required at all - for testing purposes
+    anon-access = write
+    EOF
+
+    svnserve -d -r /srv/svn --log-file /tmp/svnserve.log --config-file /srv/svn/svnserve.conf
+
+Test by running: :command:`svn info svn://localhost/p/test/code/`.  If you need to kill it,
+run :command:`killall svnserve`  More info at http://svnbook.red-bean.com/en/1.8/svn.serverconfig.svnserve.html
+
+.. warning::
+
+    This configuration has no authentication and is suitable for development only.
+
+Now you will want to change the :samp:`scm.host.{*}.svn`
+settings in :file:`development.ini`, so that the proper commands are shown to your visitors
+when they browse the code repo web pages.
+
+Alternate Setup with HTTP
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+To use SVN over HTTP, you will need to patch and compile an Apache module, so
+that all svn repos can by dynamically served.
+
+.. warning::
+
+    Not easy.
+
+.. code-block:: console
+
+    sudo aptitude install libapache2-svn
+
+Test accessing http://localhost/ (`localhost:8088` if using Vagrant).
+
+Now we'll configure Apache to serve a single project's repositories and make sure
+that works.
+
+.. code-block:: console
+
+    sudo vi /etc/apache2/mods-available/dav_svn.conf
+
+Uncomment and change to :code:`<Location /svn/p/test>`.  Set
+:code:`SVNParentPath /srv/svn/p/test`  Then run:
+
+.. code-block:: console
+
+    sudo service apache2 reload
+
+Test at http://localhost/svn/p/test/code/ (`localhost:8088` if using Vagrant)
+
+That configuration works only for the repositories in a single project.  You must either
+create a new configuration for each project within Allura, or compile a patch
+to make `SVNParentPath` be recursive.  The patch is at http://pastie.org/8550810
+and must be applied to the source of Subversion 1.7's mod_dav_svn and then
+recompiled and installed.  (See http://subversion.tigris.org/issues/show_bug.cgi?id=3588
+for the request to include this patch in Subversion itself).  Once that is working,
+you can modify :file:`dav_svn.conf` to look like:
+
+.. code-block:: apache
+
+    <Location /svn>
+      DAV svn
+      SVNParentPath /srv/svn
+      ...
+
+Then Apache SVN will serve repositories for all Allura project and subprojects.
+
+.. warning::
+
+    This configuration has no authentication and is suitable for development only.
+
+
+
+Configuring Git/SVN/Hg to use Allura auth via LDAP and ssh
+============================================================
+
+The following instructions will use a chroot, a custom FUSE driver, and LDAP.
+Once completed, an ssh-based configuration of Git, SVN, or Hg that has repos in
+the chroot directory will authenticate the users against LDAP and authorize via an Allura API.
+Allura will be configured to authenticate against LDAP as well.
+
+.. note::
 
+    The previous git & svn configuration instructions are not ssh-based, so will not work with this configuration.
+    You'll have to reconfigure git & svn to use ssh:// instead of http or svn protocols.
 
-STRUCTURE:
-separate authentication (ldap, allura) vs authorization (via allura API)
-different protocol (svn:// & git:// vs http)
-    http://svnbook.red-bean.com/en/1.8/svn.serverconfig.choosing.html
-    http://git-scm.com/book/ch4-1.html
-
-TODO:
-    disable scm.host.https* in .ini?
-    remove /home/vagrant/scm/ symlinks?
-
-SVN
-    `sudo aptitude install libapache2-svn`
-    test http://localhost:80/ (8088 if vagrant)
-    `vi /etc/apache2/mods-available/dav_svn.conf`
-        uncomment things
-        Have to do a location & parentpath for each project, e.g "test" project
-        <Location /svn/p/test>
-        SVNParentPath /srv/svn/p/test
-        todo: Auth* directives
-    `service apache2 reload`
-    test http://localhost:80/svn/p/test/code/ (8088 if vagrant)
-    Now can change scm.host.(https|https_anon).svn to "http://localhost:80/svn$path/" (8088 if vagrant) for checkout instructions
-        scm.host.(ro|rw) are intended for svn:// protocol
-    make SVNParentPath recursive:
-        http://subversion.tigris.org/issues/show_bug.cgi?id=3588
-        https://sourceforge.net/p/allura/pastebin/517557273e5e837ec65122c1
-        latest: https://trac.sdot.me/git/?p=srpmtree.git;a=blob_plain;f=subversion-recursive-parentpath.patch;hb=refs/heads/sog/subversion
-        need to update it for trunk/1.8.x
-        http://subversion.apache.org/docs/community-guide/general.html#patches
-        http://subversion.apache.org/docs/community-guide/conventions.html
-
-    svnserve shouldn't have parentpath restrictions, it allows complete access to a dir
-        svnserve -d -r /srv/svn -R
-        test: svn info svn://localhost/p/test/code/
-        killall svnserve
-        more info: http://svnbook.red-bean.com/en/1.8/svn.serverconfig.svnserve.html
-
-
-~~~~~~~
-
-The following instructions assume you are using a version of Ubuntu Linux with
+We assume you are using a version of Ubuntu with
 support for schroot and debootstrap.  We will use a chroot jail to allow users to
 access their repositories via ssh.
 
@@ -138,9 +192,9 @@ Install a chroot environment
 
 These instructions are based on the documentation in `Debootstrap Chroot`_.  and `OpenLDAPServer`_.
 
-#. Install debootstrap schroot
+Install debootstrap and schroot: :program:`aptitude install debootstrap schroot`
 
-#. Append the following text to the file /etc/schroot/schroot.conf
+Append the following text to the file :file:`/etc/schroot/schroot.conf`
 
 .. code-block:: ini
 
@@ -150,7 +204,7 @@ These instructions are based on the documentation in `Debootstrap Chroot`_.  and
     directory=/var/chroots/scm
     script-config=scm/config
 
-#. Create a directory /etc/schroot/scm and populate it with some files:
+Create a directory :file:`/etc/schroot/scm` and populate it with some files:
 
 .. code-block:: console
 
@@ -176,14 +230,14 @@ These instructions are based on the documentation in `Debootstrap Chroot`_.  and
     hosts
     EOF
 
-#. Create a directory /var/chroots/scm and create the bootstrap environment.  (You may substitute a mirror from the  `ubuntu mirror list`_ for archive.ubuntu.com)
+Create a directory :file:`/var/chroots/scm` and create the bootstrap environment.  (You may substitute a mirror from the  `ubuntu mirror list`_ for archive.ubuntu.com)
 
 .. code-block:: console
 
     $ sudo mkdir -p /var/chroots/scm
     $ sudo debootstrap --variant=buildd --arch amd64 --components=main,universe --include=git,mercurial,subversion,openssh-server,slapd,ldap-utils,ldap-auth-client,curl maverick /var/chroots/scm http://archive.ubuntu.com/ubuntu/
 
-#. Test that the chroot is installed by entering it:
+Test that the chroot is installed by entering it:
 
 .. code-block:: console
 
@@ -193,20 +247,20 @@ These instructions are based on the documentation in `Debootstrap Chroot`_.  and
 Configure OpenLDAP in the Chroot
 --------------------------------------------------------------
 
-#. Copy the ldap-setup script into the chroot environment:
+Copy the ldap-setup script into the chroot environment:
 
 .. code-block:: console
 
     $ sudo cp Allura/ldap-setup.py Allura/ldap-userconfig.py /var/chroots/scm
     $ sudo chmod +x /var/chroots/scm/ldap-*.py
 
-#. Log in to the chroot environment:
+Log in to the chroot environment:
 
 .. code-block:: console
 
     # schroot -c scm -u root
 
-#. Run the setup script, following the prompts:
+Run the setup script, following the prompts:
 
 .. code-block:: console
 
@@ -228,7 +282,7 @@ In particular, you will need to answer the following questions (substitute your
 Update the chroot ssh configuration
 -------------------------------------------------
 
-* Update the file /var/chroot/scm/etc/ssh/sshd_config, changing the port directive:
+* Update the file :file:`/var/chroot/scm/etc/ssh/sshd_config`, changing the port directive:
 
 .. code-block:: guess
 
@@ -238,40 +292,40 @@ Update the chroot ssh configuration
 Setup the Custom FUSE Driver
 -------------------------------------
 
-#. Copy the accessfs script into the chroot environment:
+Copy the accessfs script into the chroot environment:
 
 .. code-block:: console
 
     $ sudo cp fuse/accessfs.py /var/chroots/scm
 
-#. Configure allura to point to the chrooted scm environment:
+Configure allura to point to the chrooted scm environment:
 
 .. code-block:: console
 
-    $ sudo ln -s /var/chroots/scm /git
-    $ sudo ln -s /var/chroots/scm /hg
-    $ sudo ln -s /var/chroots/scm /svn
+    $ sudo ln -s /var/chroots/scm /srv/git
+    $ sudo ln -s /var/chroots/scm /srv/hg
+    $ sudo ln -s /var/chroots/scm /srv/svn
 
-#. Log in to the chroot environment & install packages:
+Log in to the chroot environment & install packages:
 
 .. code-block:: console
 
     # schroot -c scm -u root
     (scm) # apt-get install python-fuse
 
-#. Create the SCM directories:
+Create the SCM directories:
 
 .. code-block:: console
 
     (scm) # mkdir /scm /scm-repo
 
-#. Mount the FUSE filesystem:
+Mount the FUSE filesystem:
 
 .. code-block:: console
 
     (scm) # python /accessfs.py /scm-repo -o allow_other -s -o root=/scm
 
-#. Start the SSH daemon:
+Start the SSH daemon:
 
 .. code-block:: console