changeset 1203:6832ef664673 beta

source code cleanup: remove trailing white space, normalize file endings
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 03 Apr 2011 18:23:15 +0200
parents eef9e273347a
children faf31099a70a
files ez_setup.py rhodecode/__init__.py rhodecode/config/middleware.py rhodecode/config/routing.py rhodecode/controllers/admin/admin.py rhodecode/controllers/admin/ldap_settings.py rhodecode/controllers/admin/permissions.py rhodecode/controllers/admin/repos.py rhodecode/controllers/admin/settings.py rhodecode/controllers/admin/users.py rhodecode/controllers/admin/users_groups.py rhodecode/controllers/branches.py rhodecode/controllers/changelog.py rhodecode/controllers/changeset.py rhodecode/controllers/error.py rhodecode/controllers/feed.py rhodecode/controllers/files.py rhodecode/controllers/home.py rhodecode/controllers/journal.py rhodecode/controllers/login.py rhodecode/controllers/search.py rhodecode/controllers/settings.py rhodecode/controllers/shortlog.py rhodecode/controllers/summary.py rhodecode/controllers/tags.py rhodecode/lib/__init__.py rhodecode/lib/auth.py rhodecode/lib/auth_ldap.py rhodecode/lib/backup_manager.py rhodecode/lib/base.py rhodecode/lib/celerylib/__init__.py rhodecode/lib/celerylib/tasks.py rhodecode/lib/colored_formatter.py rhodecode/lib/db_manage.py rhodecode/lib/dbmigrate/__init__.py rhodecode/lib/dbmigrate/migrate/changeset/ansisql.py rhodecode/lib/dbmigrate/migrate/changeset/databases/firebird.py rhodecode/lib/dbmigrate/migrate/changeset/databases/sqlite.py rhodecode/lib/dbmigrate/migrate/changeset/schema.py rhodecode/lib/dbmigrate/migrate/versioning/genmodel.py rhodecode/lib/dbmigrate/migrate/versioning/repository.py rhodecode/lib/dbmigrate/migrate/versioning/schema.py rhodecode/lib/dbmigrate/migrate/versioning/schemadiff.py rhodecode/lib/dbmigrate/migrate/versioning/script/base.py rhodecode/lib/dbmigrate/migrate/versioning/script/py.py rhodecode/lib/dbmigrate/migrate/versioning/script/sql.py rhodecode/lib/dbmigrate/migrate/versioning/template.py rhodecode/lib/dbmigrate/migrate/versioning/util/__init__.py rhodecode/lib/dbmigrate/migrate/versioning/util/importpath.py rhodecode/lib/dbmigrate/migrate/versioning/util/keyedinstance.py rhodecode/lib/dbmigrate/migrate/versioning/version.py rhodecode/lib/dbmigrate/versions/002_version_1_1_0.py rhodecode/lib/dbmigrate/versions/003_version_1_2_0.py rhodecode/lib/dbmigrate/versions/__init__.py rhodecode/lib/exceptions.py rhodecode/lib/helpers.py rhodecode/lib/hooks.py rhodecode/lib/indexers/__init__.py rhodecode/lib/middleware/https_fixup.py rhodecode/lib/middleware/simplegit.py rhodecode/lib/middleware/simplehg.py rhodecode/lib/profiler.py rhodecode/lib/smtp_mailer.py rhodecode/lib/utils.py rhodecode/model/__init__.py rhodecode/model/caching_query.py rhodecode/model/db.py rhodecode/model/forms.py rhodecode/model/meta.py rhodecode/model/permission.py rhodecode/model/repo.py rhodecode/model/scm.py rhodecode/model/settings.py rhodecode/model/user.py rhodecode/model/users_group.py rhodecode/tests/functional/test_files.py rhodecode/tests/functional/test_login.py rhodecode/tests/functional/test_search.py rhodecode/tests/functional/test_settings.py rhodecode/tests/functional/test_summary.py rhodecode/tests/test_hg_operations.py rhodecode/websetup.py setup.py
diffstat 83 files changed, 475 insertions(+), 537 deletions(-) [+]
line wrap: on
line diff
--- a/ez_setup.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/ez_setup.py	Sun Apr 03 18:23:15 2011 +0200
@@ -92,7 +92,7 @@
     try:
         import pkg_resources
     except ImportError:
-        return do_download()       
+        return do_download()
     try:
         pkg_resources.require("setuptools>="+version); return
     except pkg_resources.VersionConflict, e:
@@ -268,9 +268,3 @@
         update_md5(sys.argv[2:])
     else:
         main(sys.argv[1:])
-
-
-
-
-
-
--- a/rhodecode/__init__.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/__init__.py	Sun Apr 03 18:23:15 2011 +0200
@@ -8,19 +8,19 @@
 
     :created_on: Apr 9, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/config/middleware.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/config/middleware.py	Sun Apr 03 18:23:15 2011 +0200
@@ -76,4 +76,3 @@
     app.config = config
 
     return app
-
--- a/rhodecode/config/routing.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/config/routing.py	Sun Apr 03 18:23:15 2011 +0200
@@ -19,7 +19,7 @@
     def check_repo(environ, match_dict):
         """
         check for valid repository for proper 404 handling
-        
+
         :param environ:
         :param match_dict:
         """
--- a/rhodecode/controllers/admin/admin.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/admin/admin.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Controller for Admin panel of Rhodecode
-    
+
     :created_on: Apr 7, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -57,4 +57,3 @@
         if request.params.get('partial'):
             return c.log_data
         return render('admin/admin.html')
-
--- a/rhodecode/controllers/admin/ldap_settings.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/admin/ldap_settings.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     ldap controller for RhodeCode
-    
+
     :created_on: Nov 26, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/admin/permissions.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/admin/permissions.py	Sun Apr 03 18:23:15 2011 +0200
@@ -2,24 +2,24 @@
 """
     rhodecode.controllers.admin.permissions
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    
+
     permissions controller for Rhodecode
-    
+
     :created_on: Apr 27, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/admin/repos.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/admin/repos.py	Sun Apr 03 18:23:15 2011 +0200
@@ -2,24 +2,24 @@
 """
     rhodecode.controllers.admin.repos
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    
+
     Admin controller for RhodeCode
-    
+
     :created_on: Apr 7, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -82,7 +82,7 @@
     def __load_data(self, repo_name=None):
         """
         Load defaults settings for edit, and update
-        
+
         :param repo_name:
         """
         self.__load_defaults()
@@ -301,7 +301,7 @@
     def delete_perm_user(self, repo_name):
         """
         DELETE an existing repository permission user
-        
+
         :param repo_name:
         """
 
@@ -317,7 +317,7 @@
     def delete_perm_users_group(self, repo_name):
         """
         DELETE an existing repository permission users group
-        
+
         :param repo_name:
         """
         try:
@@ -333,7 +333,7 @@
     def repo_stats(self, repo_name):
         """
         DELETE an existing repository statistics
-        
+
         :param repo_name:
         """
 
@@ -349,7 +349,7 @@
     def repo_cache(self, repo_name):
         """
         INVALIDATE existing repository cache
-        
+
         :param repo_name:
         """
 
@@ -365,7 +365,7 @@
         """
         Set's this repository to be visible in public journal,
         in other words assing default user to follow this repo
-        
+
         :param repo_name:
         """
 
@@ -392,7 +392,7 @@
         """
         Runs task to update given repository with remote changes,
         ie. make pull on remote location
-        
+
         :param repo_name:
         """
         try:
--- a/rhodecode/controllers/admin/settings.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/admin/settings.py	Sun Apr 03 18:23:15 2011 +0200
@@ -2,24 +2,24 @@
 """
     rhodecode.controllers.admin.settings
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    
+
     settings controller for rhodecode admin
-        
+
     :created_on: Jul 14, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -56,7 +56,7 @@
     """REST Controller styled on the Atom Publishing Protocol"""
     # To properly map this controller, ensure your config/routing.py
     # file has a resource setup:
-    #     map.resource('setting', 'settings', controller='admin/settings', 
+    #     map.resource('setting', 'settings', controller='admin/settings',
     #         path_prefix='/admin', name_prefix='admin_')
 
 
@@ -251,7 +251,7 @@
     @NotAnonymous()
     def my_account(self):
         """
-        GET /_admin/my_account Displays info about my account 
+        GET /_admin/my_account Displays info about my account
         """
         # url('admin_settings_my_account')
 
--- a/rhodecode/controllers/admin/users.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/admin/users.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Users crud controller for pylons
-    
+
     :created_on: Apr 4, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/admin/users_groups.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/admin/users_groups.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Users Groups crud controller for pylons
-    
+
     :created_on: Jan 25, 2011
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/branches.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/branches.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     branches controller for rhodecode
-    
+
     :created_on: Apr 21, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/changelog.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/changelog.py	Sun Apr 03 18:23:15 2011 +0200
@@ -7,19 +7,19 @@
 
     :created_on: Apr 21, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -80,7 +80,7 @@
     def _graph(self, repo, repo_size, size, p):
         """
         Generates a DAG graph for mercurial
-        
+
         :param repo: repo instance
         :param size: number of commits to show
         :param p: page number
@@ -103,4 +103,3 @@
             data.append(('', vtx, edges))
 
         c.jsdata = json.dumps(data)
-
--- a/rhodecode/controllers/changeset.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/changeset.py	Sun Apr 03 18:23:15 2011 +0200
@@ -3,24 +3,24 @@
     rhodecode.controllers.changeset
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    changeset controller for pylons showoing changes beetween 
+    changeset controller for pylons showoing changes beetween
     revisions
-    
+
     :created_on: Apr 25, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -150,7 +150,7 @@
                     c.changes[changeset.raw_id].append(('changed', node, diff, cs1, cs2))
 
             #==================================================================
-            # REMOVED FILES    
+            # REMOVED FILES
             #==================================================================
             if not c.cut_off:
                 for node in changeset.removed:
--- a/rhodecode/controllers/error.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/error.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     RhodeCode error controller
-    
+
     :created_on: Dec 8, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -107,5 +107,3 @@
             return _('The resource could not be found')
         if code == 500:
             return _('The server encountered an unexpected condition which prevented it from fulfilling the request.')
-
-
--- a/rhodecode/controllers/feed.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/feed.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Feed controller for rhodecode
-    
+
     :created_on: Apr 23, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/files.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/files.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Files controller for RhodeCode
-    
+
     :created_on: Apr 21, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -60,7 +60,7 @@
         """
         Safe way to get changeset if error occur it redirects to tip with
         proper message
-        
+
         :param rev: revision to fetch
         :param repo_name: repo name to redirect after
         """
@@ -80,7 +80,7 @@
         """
         Returns file_node, if error occurs or given path is directory,
         it'll redirect to top level path
-        
+
         :param repo_name: repo_name
         :param cs: given changeset
         :param path: path to lookup
@@ -301,4 +301,3 @@
         hist_l.append(tags_group)
 
         return hist_l
-
--- a/rhodecode/controllers/home.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/home.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Home controller for Rhodecode
-    
+
     :created_on: Feb 18, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/journal.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/journal.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Journal controller for pylons
-    
+
     :created_on: Nov 21, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -238,11 +238,3 @@
 
         response.content_type = feed.mime_type
         return feed.writeString('utf-8')
-
-
-
-
-
-
-
-
--- a/rhodecode/controllers/login.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/login.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Login controller for rhodeocode
-    
+
     :created_on: Apr 22, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/search.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/search.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Search controller for rhodecode
-    
+
     :created_on: Aug 7, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/settings.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/settings.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Settings controller for rhodecode
-    
+
     :created_on: Jun 30, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/shortlog.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/shortlog.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Shortlog controller for rhodecode
-    
+
     :created_on: Apr 18, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/summary.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/summary.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Summary controller for Rhodecode
-    
+
     :created_on: Apr 18, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/controllers/tags.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/controllers/tags.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Tags controller for rhodecode
-    
+
     :created_on: Apr 21, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/lib/__init__.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/__init__.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~
 
     Some simple helper functions
-    
+
     :created_on: Jan 5, 2011
     :author: marcink
-    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -36,7 +36,7 @@
 def generate_api_key(username, salt=None):
     """
     Generates uniq API key for given username
-    
+
     :param username: username as string
     :param salt: salt to hash generate KEY
     """
@@ -51,8 +51,8 @@
 def safe_unicode(_str):
     """
     safe unicode function. In case of UnicodeDecode error we try to return
-    unicode with errors replace, if this fails we return unicode with 
-    string_escape decoding 
+    unicode with errors replace, if this fails we return unicode with
+    string_escape decoding
     """
 
     if isinstance(_str, unicode):
--- a/rhodecode/lib/auth.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/auth.py	Sun Apr 03 18:23:15 2011 +0200
@@ -2,9 +2,9 @@
 """
     rhodecode.lib.auth
     ~~~~~~~~~~~~~~~~~~
-    
+
     authentication and permission libraries
-    
+
     :created_on: Apr 4, 2010
     :copyright: (c) 2010 by marcink.
     :license: LICENSE_NAME, see LICENSE_FILE for more details.
@@ -13,12 +13,12 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -61,7 +61,7 @@
         usage:
         passwd_gen = PasswordGenerator()
         #print 8-letter password containing only big and small letters of alphabet
-        print passwd_gen.gen_password(8, passwd_gen.ALPHABETS_BIG_SMALL)        
+        print passwd_gen.gen_password(8, passwd_gen.ALPHABETS_BIG_SMALL)
     """
     ALPHABETS_NUM = r'''1234567890'''#[0]
     ALPHABETS_SMALL = r'''qwertyuiopasdfghjklzxcvbnm'''#[1]
@@ -87,7 +87,7 @@
         """
         Cryptographic function used for password hashing based on pybcrypt
         or pycrypto in windows
-        
+
         :param password: password to hash
         """
         if __platform__ in PLATFORM_WIN:
@@ -102,7 +102,7 @@
         """
         Checks matching password with it's hashed value, runs different
         implementation based on platform it runs on
-        
+
         :param password: password
         :param hashed: password in hashed form
         """
@@ -129,7 +129,7 @@
 
 def authfunc(environ, username, password):
     """Dummy authentication function used in Mercurial/Git/ and access control,
-    
+
     :param environ: needed only for using in Basic auth
     """
     return authenticate(username, password)
@@ -139,7 +139,7 @@
     """Authentication function used for access control,
     firstly checks for db authentication then if ldap is enabled for ldap
     authentication, also creates ldap user if not in database
-    
+
     :param username: username
     :param password: password
     """
@@ -174,7 +174,7 @@
         ldap_settings = SettingsModel().get_ldap_settings()
 
         #======================================================================
-        # FALLBACK TO LDAP AUTH IF ENABLE                
+        # FALLBACK TO LDAP AUTH IF ENABLE
         #======================================================================
         if str2bool(ldap_settings.get('ldap_active')):
             log.debug("Authenticating user using ldap")
@@ -217,9 +217,9 @@
 class  AuthUser(object):
     """
     A simple object that handles all attributes of user in RhodeCode
-    
+
     It does lookup based on API key,given user, or user present in session
-    Then it fills all required information for such user. It also checks if 
+    Then it fills all required information for such user. It also checks if
     anonymous access is enabled and if so, it returns default user as logged
     in
     """
@@ -278,12 +278,12 @@
 
 def set_available_permissions(config):
     """This function will propagate pylons globals with all available defined
-    permission given in db. We don't want to check each time from db for new 
+    permission given in db. We don't want to check each time from db for new
     permissions since adding a new permission also requires application restart
     ie. to decorate new views with the newly created permission
-    
+
     :param config: current pylons config instance
-    
+
     """
     log.info('getting information about all available permissions')
     try:
@@ -301,9 +301,9 @@
 #===============================================================================
 class LoginRequired(object):
     """
-    Must be logged in to execute this function else 
+    Must be logged in to execute this function else
     redirect to login page
-    
+
     :param api_access: if enabled this checks only for valid auth token
         and grants access based on valid token
     """
@@ -345,7 +345,7 @@
             return redirect(url('login_home', came_from=p))
 
 class NotAnonymous(object):
-    """Must be logged in to execute this function else 
+    """Must be logged in to execute this function else
     redirect to login page"""
 
     def __call__(self, func):
@@ -414,7 +414,7 @@
         raise Exception('You have to write this function in child class')
 
 class HasPermissionAllDecorator(PermsDecorator):
-    """Checks for access permission for all given predicates. All of them 
+    """Checks for access permission for all given predicates. All of them
     have to be meet in order to fulfill the request
     """
 
@@ -425,7 +425,7 @@
 
 
 class HasPermissionAnyDecorator(PermsDecorator):
-    """Checks for access permission for any of given predicates. In order to 
+    """Checks for access permission for any of given predicates. In order to
     fulfill the request any of predicates must be meet
     """
 
@@ -435,7 +435,7 @@
         return False
 
 class HasRepoPermissionAllDecorator(PermsDecorator):
-    """Checks for access permission for all given predicates for specific 
+    """Checks for access permission for all given predicates for specific
     repository. All of them have to be meet in order to fulfill the request
     """
 
@@ -451,7 +451,7 @@
 
 
 class HasRepoPermissionAnyDecorator(PermsDecorator):
-    """Checks for access permission for any of given predicates for specific 
+    """Checks for access permission for any of given predicates for specific
     repository. In order to fulfill the request any of predicates must be meet
     """
 
--- a/rhodecode/lib/auth_ldap.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/auth_ldap.py	Sun Apr 03 18:23:15 2011 +0200
@@ -7,12 +7,12 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -66,10 +66,10 @@
 
     def authenticate_ldap(self, username, password):
         """Authenticate a user via LDAP and return his/her LDAP properties.
-    
+
         Raises AuthenticationError if the credentials are rejected, or
         EnvironmentError if the LDAP server can't be reached.
-        
+
         :param username: username
         :param password: password
         """
--- a/rhodecode/lib/backup_manager.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/backup_manager.py	Sun Apr 03 18:23:15 2011 +0200
@@ -2,17 +2,17 @@
 # encoding: utf-8
 # mercurial repository backup manager
 # Copyright (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
- 
+
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -38,7 +38,7 @@
     def __init__(self, repos_location, rsa_key, backup_server):
         today = datetime.datetime.now().weekday() + 1
         self.backup_file_name = "mercurial_repos.%s.tar.gz" % today
-        
+
         self.id_rsa_path = self.get_id_rsa(rsa_key)
         self.repos_path = self.get_repos_path(repos_location)
         self.backup_server = backup_server
@@ -54,7 +54,7 @@
             logging.error('Could not load id_rsa key file in %s', rsa_key)
             sys.exit()
         return rsa_key
-    
+
     def get_repos_path(self, path):
         if not os.path.isdir(path):
             logging.error('Wrong location for repositories in %s', path)
@@ -86,23 +86,21 @@
 
         subprocess.call(cmd)
         logging.info('Transfered file %s to %s', self.backup_file_name, cmd[4])
-        
-    
+
+
     def rm_file(self):
         logging.info('Removing file %s', self.backup_file_name)
         os.remove(os.path.join(self.backup_file_path, self.backup_file_name))
-    
+
 
 
 if __name__ == "__main__":
-    
+
     repo_location = '/home/repo_path'
     backup_server = 'root@192.168.1.100:/backups/mercurial'
     rsa_key = '/home/id_rsa'
-    
+
     B_MANAGER = BackupManager(repo_location, rsa_key, backup_server)
     B_MANAGER.backup_repos()
     B_MANAGER.transfer_files()
     B_MANAGER.rm_file()
-
-
--- a/rhodecode/lib/base.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/base.py	Sun Apr 03 18:23:15 2011 +0200
@@ -51,9 +51,9 @@
     """
     Base class for controllers responsible for loading all needed data
     for those controllers, loaded items are
-    
+
     c.rhodecode_repo: instance of scm repository (taken from cache)
-     
+
     """
 
     def __before__(self):
--- a/rhodecode/lib/celerylib/__init__.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/celerylib/__init__.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     celery libs for RhodeCode
-    
+
     :created_on: Nov 27, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -97,11 +97,3 @@
             return 'Task with key %s already running' % lockkey
 
     return decorator(__wrapper, func)
-
-
-
-
-
-
-
-
--- a/rhodecode/lib/celerylib/tasks.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/celerylib/tasks.py	Sun Apr 03 18:23:15 2011 +0200
@@ -5,22 +5,22 @@
 
     RhodeCode task modules, containing all task that suppose to be run
     by celery daemon
-    
+
     :created_on: Oct 6, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -124,7 +124,7 @@
         return True
 
     if last_rev == repo.get_changeset().revision and len(repo.revisions) > 1:
-        #pass silently without any work if we're not on first revision or 
+        #pass silently without any work if we're not on first revision or
         #current state of parsing revision(from db marker) is the last revision
         return True
 
@@ -272,8 +272,8 @@
 def send_email(recipients, subject, body):
     """
     Sends an email with defined parameters from the .ini files.
-    
-    
+
+
     :param recipients: list of recipients, it this is empty the defined email
         address from field 'email_to' is used instead
     :param subject: subject of the mail
@@ -404,7 +404,3 @@
     map(aggregate, tip.walk('/'))
 
     return code_stats or {}
-
-
-
-
--- a/rhodecode/lib/colored_formatter.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/colored_formatter.py	Sun Apr 03 18:23:15 2011 +0200
@@ -3,7 +3,7 @@
 
 BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = xrange(30, 38)
 
-# Sequences 
+# Sequences
 RESET_SEQ = "\033[0m"
 COLOR_SEQ = "\033[1;%dm"
 BOLD_SEQ = "\033[1m"
@@ -80,4 +80,3 @@
 
         colored_record = start + def_record + end
         return colored_record
-
--- a/rhodecode/lib/db_manage.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/db_manage.py	Sun Apr 03 18:23:15 2011 +0200
@@ -5,22 +5,22 @@
 
     Database creation, and setup module for RhodeCode. Used for creation
     of database as well as for migration operations
-    
+
     :created_on: Apr 10, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -95,9 +95,9 @@
 
 
     def upgrade(self):
-        """Upgrades given database schema to given revision following 
+        """Upgrades given database schema to given revision following
         all needed steps, to perform the upgrade
-        
+
         """
 
         from rhodecode.lib.dbmigrate.migrate.versioning import api
@@ -134,7 +134,7 @@
         # UPGRADE STEPS
         #======================================================================
         class UpgradeSteps(object):
-            """Those steps follow schema versions so for example schema 
+            """Those steps follow schema versions so for example schema
             for example schema with seq 002 == step_2 and so on.
             """
 
@@ -261,7 +261,7 @@
     def create_ui_settings(self):
         """Creates ui settings, fills out hooks
         and disables dotencode
-        
+
         """
         #HOOKS
         hooks1_key = 'changegroup.update'
@@ -516,4 +516,3 @@
         except:
             self.sa.rollback()
             raise
-
--- a/rhodecode/lib/dbmigrate/__init__.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/__init__.py	Sun Apr 03 18:23:15 2011 +0200
@@ -2,24 +2,24 @@
 """
     rhodecode.lib.dbmigrate.__init__
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    
+
     Database migration modules
-    
+
     :created_on: Dec 11, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/lib/dbmigrate/migrate/changeset/ansisql.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/changeset/ansisql.py	Sun Apr 03 18:23:15 2011 +0200
@@ -59,7 +59,7 @@
             # adapt to 0.6 which uses a string-returning
             # object
             self.append(" %s" % ret)
-            
+
     def _to_table(self, param):
         """Returns the table object for the given param object."""
         if isinstance(param, (sa.Column, sa.Index, sa.schema.Constraint)):
@@ -297,10 +297,10 @@
 
         def get_constraint_specification(self, cons, **kwargs):
             """Constaint SQL generators.
-        
+
             We cannot use SA visitors because they append comma.
             """
-        
+
             if isinstance(cons, PrimaryKeyConstraint):
                 if cons.name is not None:
                     self.append("CONSTRAINT %s " % self.preparer.format_constraint(cons))
@@ -327,13 +327,13 @@
                 raise exceptions.InvalidConstraintError(cons)
 
         def _visit_constraint(self, constraint):
-        
+
             table = self.start_alter_table(constraint)
             constraint.name = self.get_constraint_name(constraint)
             self.append("ADD ")
             self.get_constraint_specification(constraint)
             self.execute()
-    
+
 
     class ANSIConstraintDropper(ANSIConstraintCommon, SchemaDropper):
 
--- a/rhodecode/lib/dbmigrate/migrate/changeset/databases/firebird.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/changeset/databases/firebird.py	Sun Apr 03 18:23:15 2011 +0200
@@ -34,7 +34,7 @@
             if column.name in [col.name for col in index.columns]:
                 index.drop()
                 # TODO: recreate index if it references more than this column
-        
+
         for cons in column.table.constraints:
             if isinstance(cons,PrimaryKeyConstraint):
                 # will be deleted only when the column its on
--- a/rhodecode/lib/dbmigrate/migrate/changeset/databases/sqlite.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/changeset/databases/sqlite.py	Sun Apr 03 18:23:15 2011 +0200
@@ -44,7 +44,7 @@
         self.execute()
         self.append('DROP TABLE migration_tmp')
         self.execute()
-        
+
     def visit_column(self, delta):
         if isinstance(delta, DictMixin):
             column = delta.result_column
@@ -54,7 +54,7 @@
             table = self._to_table(column.table)
         self.recreate_table(table,column,delta)
 
-class SQLiteColumnGenerator(SQLiteSchemaGenerator, 
+class SQLiteColumnGenerator(SQLiteSchemaGenerator,
                             ansisql.ANSIColumnGenerator,
                             # at the end so we get the normal
                             # visit_column by default
@@ -80,7 +80,7 @@
     """SQLite ColumnDropper"""
 
     def _modify_table(self, table, column, delta):
-        
+
         columns = ' ,'.join(map(self.preparer.format_column, table.columns))
         return 'INSERT INTO %(table_name)s SELECT ' + columns + \
             ' from migration_tmp'
--- a/rhodecode/lib/dbmigrate/migrate/changeset/schema.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/changeset/schema.py	Sun Apr 03 18:23:15 2011 +0200
@@ -31,7 +31,7 @@
 
 def create_column(column, table=None, *p, **kw):
     """Create a column, given the table.
-    
+
     API to :meth:`ChangesetColumn.create`.
     """
     if table is not None:
@@ -41,7 +41,7 @@
 
 def drop_column(column, table=None, *p, **kw):
     """Drop a column, given the table.
-    
+
     API to :meth:`ChangesetColumn.drop`.
     """
     if table is not None:
@@ -105,12 +105,12 @@
     :param engine:
       The :class:`~sqlalchemy.engine.base.Engine` to use for table
       reflection and schema alterations.
-    
+
     :returns: A :class:`ColumnDelta` instance representing the change.
 
-    
+
     """
-    
+
     if 'table' not in k and isinstance(p[0], sqlalchemy.Column):
         k['table'] = p[0].table
     if 'engine' not in k:
@@ -129,7 +129,7 @@
     # that this crutch has to be left in until they can be sorted
     # out
     k['alter_metadata']=True
-    
+
     delta = ColumnDelta(*p, **k)
 
     visitorcallable = get_engine_visitor(engine, 'schemachanger')
@@ -183,10 +183,10 @@
         :param table: Table at which current Column should be bound to.\
         If table name is given, reflection will be used.
         :type table: string or Table instance
-        
+
         :param metadata: A :class:`MetaData` instance to store
                          reflected table names
-                         
+
         :param engine: When reflecting tables, either engine or metadata must \
         be specified to acquire engine object.
         :type engine: :class:`Engine` instance
@@ -211,7 +211,7 @@
         # as a crutch until the tests that fail when 'alter_metadata'
         # behaviour always happens can be sorted out
         self.alter_metadata = kw.pop("alter_metadata", False)
-        
+
         self.meta = kw.pop("metadata", None)
         self.engine = kw.pop("engine", None)
 
@@ -239,7 +239,7 @@
             self.alter_metadata,
             super(ColumnDelta, self).__repr__()
             )
-    
+
     def __getitem__(self, key):
         if key not in self.keys():
             raise KeyError("No such diff key, available: %s" % self.diffs )
@@ -278,7 +278,7 @@
         """Compares two Column objects"""
         self.process_column(new_col)
         self.table = k.pop('table', None)
-        # we cannot use bool() on table in SA06 
+        # we cannot use bool() on table in SA06
         if self.table is None:
             self.table = old_col.table
         if self.table is None:
@@ -367,7 +367,7 @@
                                             for_update=True))
         if toinit:
             column._init_items(*toinit)
-            
+
         if not SQLA_06:
             column.args = []
 
@@ -484,7 +484,7 @@
 
     def alter(self, *p, **k):
         """Makes a call to :func:`alter_column` for the column this
-        method is called on. 
+        method is called on.
         """
         if 'table' not in k:
             k['table'] = self.table
@@ -559,12 +559,12 @@
 
     def _col_name_in_constraint(self,cons,name):
         return False
-    
+
     def remove_from_table(self, table, unset_table=True):
         # TODO: remove primary keys, constraints, etc
         if unset_table:
             self.table = None
-            
+
         to_drop = set()
         for index in table.indexes:
             columns = []
@@ -576,7 +576,7 @@
             else:
                 to_drop.add(index)
         table.indexes = table.indexes - to_drop
-        
+
         to_drop = set()
         for cons in table.constraints:
             # TODO: deal with other types of constraint
@@ -588,7 +588,7 @@
                     if self.name==col_name:
                         to_drop.add(cons)
         table.constraints = table.constraints - to_drop
-        
+
         if table.c.contains_column(self):
             table.c.remove(self)
 
--- a/rhodecode/lib/dbmigrate/migrate/versioning/genmodel.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/genmodel.py	Sun Apr 03 18:23:15 2011 +0200
@@ -207,9 +207,9 @@
             dbTable = self.diff.metadataB.tables[tableName]
 
             td = self.diff.tables_different[tableName]
-            
+
             if self._db_can_handle_this_change(td):
-                
+
                 for col in td.columns_missing_from_B:
                     modelTable.columns[col].create()
                 for col in td.columns_missing_from_A:
--- a/rhodecode/lib/dbmigrate/migrate/versioning/repository.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/repository.py	Sun Apr 03 18:23:15 2011 +0200
@@ -218,7 +218,7 @@
     @classmethod
     def create_manage_file(cls, file_, **opts):
         """Create a project management script (manage.py)
-        
+
         :param file_: Destination file to be written
         :param opts: Options that are passed to :func:`migrate.versioning.shell.main`
         """
--- a/rhodecode/lib/dbmigrate/migrate/versioning/schema.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/schema.py	Sun Apr 03 18:23:15 2011 +0200
@@ -64,7 +64,7 @@
 
     def changeset(self, version=None):
         """API to Changeset creation.
-        
+
         Uses self.version for start version and engine.name
         to get database name.
         """
--- a/rhodecode/lib/dbmigrate/migrate/versioning/schemadiff.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/schemadiff.py	Sun Apr 03 18:23:15 2011 +0200
@@ -39,11 +39,11 @@
     Container for differences in one :class:`~sqlalchemy.schema.Column`
     between two :class:`~sqlalchemy.schema.Table` instances, ``A``
     and ``B``.
-    
+
     .. attribute:: col_A
 
       The :class:`~sqlalchemy.schema.Column` object for A.
-      
+
     .. attribute:: col_B
 
       The :class:`~sqlalchemy.schema.Column` object for B.
@@ -51,15 +51,15 @@
     .. attribute:: type_A
 
       The most generic type of the :class:`~sqlalchemy.schema.Column`
-      object in A. 
-      
+      object in A.
+
     .. attribute:: type_B
 
       The most generic type of the :class:`~sqlalchemy.schema.Column`
-      object in A. 
-      
+      object in A.
+
     """
-    
+
     diff = False
 
     def __init__(self,col_A,col_B):
@@ -87,10 +87,10 @@
             if not (A is None or B is None) and A!=B:
                 self.diff=True
                 return
-        
+
     def __nonzero__(self):
         return self.diff
-    
+
 class TableDiff(object):
     """
     Container for differences in one :class:`~sqlalchemy.schema.Table`
@@ -101,12 +101,12 @@
 
       A sequence of column names that were found in B but weren't in
       A.
-      
+
     .. attribute:: columns_missing_from_B
 
       A sequence of column names that were found in A but weren't in
       B.
-      
+
     .. attribute:: columns_different
 
       A dictionary containing information about columns that were
@@ -126,7 +126,7 @@
             self.columns_missing_from_B or
             self.columns_different
             )
-    
+
 class SchemaDiff(object):
     """
     Compute the difference between two :class:`~sqlalchemy.schema.MetaData`
@@ -139,34 +139,34 @@
     The length of a :class:`SchemaDiff` will give the number of
     changes found, enabling it to be used much like a boolean in
     expressions.
-        
+
     :param metadataA:
       First :class:`~sqlalchemy.schema.MetaData` to compare.
-      
+
     :param metadataB:
       Second :class:`~sqlalchemy.schema.MetaData` to compare.
-      
+
     :param labelA:
       The label to use in messages about the first
-      :class:`~sqlalchemy.schema.MetaData`. 
-    
-    :param labelB: 
+      :class:`~sqlalchemy.schema.MetaData`.
+
+    :param labelB:
       The label to use in messages about the second
-      :class:`~sqlalchemy.schema.MetaData`. 
-    
+      :class:`~sqlalchemy.schema.MetaData`.
+
     :param excludeTables:
       A sequence of table names to exclude.
-      
+
     .. attribute:: tables_missing_from_A
 
       A sequence of table names that were found in B but weren't in
       A.
-      
+
     .. attribute:: tables_missing_from_B
 
       A sequence of table names that were found in A but weren't in
       B.
-      
+
     .. attribute:: tables_different
 
       A dictionary containing information about tables that were found
@@ -195,26 +195,26 @@
         self.tables_missing_from_B = sorted(
             A_table_names - B_table_names - excludeTables
             )
-        
+
         self.tables_different = {}
         for table_name in A_table_names.intersection(B_table_names):
 
             td = TableDiff()
-            
+
             A_table = metadataA.tables[table_name]
             B_table = metadataB.tables[table_name]
-            
+
             A_column_names = set(A_table.columns.keys())
             B_column_names = set(B_table.columns.keys())
 
             td.columns_missing_from_A = sorted(
                 B_column_names - A_column_names
                 )
-            
+
             td.columns_missing_from_B = sorted(
                 A_column_names - B_column_names
                 )
-            
+
             td.columns_different = {}
 
             for col_name in A_column_names.intersection(B_column_names):
@@ -226,7 +226,7 @@
 
                 if cd:
                     td.columns_different[col_name]=cd
-                
+
             # XXX - index and constraint differences should
             #       be checked for here
 
@@ -237,7 +237,7 @@
         ''' Summarize differences. '''
         out = []
         column_template ='      %%%is: %%r' % self.label_width
-        
+
         for names,label in (
             (self.tables_missing_from_A,self.labelA),
             (self.tables_missing_from_B,self.labelB),
@@ -248,7 +248,7 @@
                         label,', '.join(sorted(names))
                         )
                     )
-                
+
         for name,td in sorted(self.tables_different.items()):
             out.append(
                '  table with differences: %s' % name
@@ -267,7 +267,7 @@
                 out.append('    column with differences: %s' % name)
                 out.append(column_template % (self.labelA,cd.col_A))
                 out.append(column_template % (self.labelB,cd.col_B))
-                
+
         if out:
             out.insert(0, 'Schema diffs:')
             return '\n'.join(out)
--- a/rhodecode/lib/dbmigrate/migrate/versioning/script/base.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/script/base.py	Sun Apr 03 18:23:15 2011 +0200
@@ -28,7 +28,7 @@
         self.verify(path)
         super(BaseScript, self).__init__(path)
         log.debug('Script %s loaded successfully' % path)
-    
+
     @classmethod
     def verify(cls, path):
         """Ensure this is a valid script
--- a/rhodecode/lib/dbmigrate/migrate/versioning/script/py.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/script/py.py	Sun Apr 03 18:23:15 2011 +0200
@@ -25,7 +25,7 @@
     @classmethod
     def create(cls, path, **opts):
         """Create an empty migration script at specified path
-        
+
         :returns: :class:`PythonScript instance <migrate.versioning.script.py.PythonScript>`"""
         cls.require_notfound(path)
 
@@ -38,7 +38,7 @@
     def make_update_script_for_model(cls, engine, oldmodel,
                                      model, repository, **opts):
         """Create a migration script based on difference between two SA models.
-        
+
         :param repository: path to migrate repository
         :param oldmodel: dotted.module.name:SAClass or SAClass object
         :param model: dotted.module.name:SAClass or SAClass object
@@ -50,7 +50,7 @@
         :returns: Upgrade / Downgrade script
         :rtype: string
         """
-        
+
         if isinstance(repository, basestring):
             # oh dear, an import cycle!
             from rhodecode.lib.dbmigrate.migrate.versioning.repository import Repository
@@ -86,7 +86,7 @@
     @classmethod
     def verify_module(cls, path):
         """Ensure path is a valid script
-        
+
         :param path: Script location
         :type path: string
         :raises: :exc:`InvalidScriptError <migrate.exceptions.InvalidScriptError>`
@@ -101,7 +101,7 @@
         return module
 
     def preview_sql(self, url, step, **args):
-        """Mocks SQLAlchemy Engine to store all executed calls in a string 
+        """Mocks SQLAlchemy Engine to store all executed calls in a string
         and runs :meth:`PythonScript.run <migrate.versioning.script.py.PythonScript.run>`
 
         :returns: SQL file
@@ -119,7 +119,7 @@
         return go(url, step, **args)
 
     def run(self, engine, step):
-        """Core method of Script file. 
+        """Core method of Script file.
         Exectues :func:`update` or :func:`downgrade` functions
 
         :param engine: SQLAlchemy Engine
--- a/rhodecode/lib/dbmigrate/migrate/versioning/script/sql.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/script/sql.py	Sun Apr 03 18:23:15 2011 +0200
@@ -15,7 +15,7 @@
     @classmethod
     def create(cls, path, **opts):
         """Create an empty migration script at specified path
-        
+
         :returns: :class:`SqlScript instance <migrate.versioning.script.sql.SqlScript>`"""
         cls.require_notfound(path)
 
--- a/rhodecode/lib/dbmigrate/migrate/versioning/template.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/template.py	Sun Apr 03 18:23:15 2011 +0200
@@ -33,7 +33,7 @@
 
 class Template(pathed.Pathed):
     """Finds the paths/packages of various Migrate templates.
-    
+
     :param path: Templates are loaded from rhodecode.lib.dbmigrate.migrate package
     if `path` is not provided.
     """
@@ -66,7 +66,7 @@
 
     def _get_item(self, collection, theme=None):
         """Locates and returns collection.
-        
+
         :param collection: name of collection to locate
         :param type_: type of subfolder in collection (defaults to "_default")
         :returns: (package, source)
@@ -80,7 +80,7 @@
     def get_repository(self, *a, **kw):
         """Calls self._get_item('repository', *a, **kw)"""
         return self._get_item('repository', *a, **kw)
-    
+
     def get_script(self, *a, **kw):
         """Calls self._get_item('script', *a, **kw)"""
         return self._get_item('script', *a, **kw)
--- a/rhodecode/lib/dbmigrate/migrate/versioning/util/__init__.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/util/__init__.py	Sun Apr 03 18:23:15 2011 +0200
@@ -22,7 +22,7 @@
     """Import module and use module-level variable".
 
     :param dotted_name: path to model in form of string: ``some.python.module:Class``
-    
+
     .. versionchanged:: 0.5.4
 
     """
@@ -54,9 +54,9 @@
 
 def guess_obj_type(obj):
     """Do everything to guess object type from string
-    
+
     Tries to convert to `int`, `bool` and finally returns if not succeded.
-    
+
     .. versionadded: 0.5.4
     """
 
@@ -81,7 +81,7 @@
 @decorator
 def catch_known_errors(f, *a, **kw):
     """Decorator that catches known api errors
-    
+
     .. versionadded: 0.5.4
     """
 
--- a/rhodecode/lib/dbmigrate/migrate/versioning/util/importpath.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/util/importpath.py	Sun Apr 03 18:23:15 2011 +0200
@@ -3,7 +3,7 @@
 
 def import_path(fullpath):
     """ Import a file with full path specification. Allows one to
-        import from anywhere, something __import__ does not do. 
+        import from anywhere, something __import__ does not do.
     """
     # http://zephyrfalcon.org/weblog/arch_d7_2002_08_31.html
     path, filename = os.path.split(fullpath)
@@ -13,4 +13,3 @@
     reload(module) # Might be out of date during tests
     del sys.path[-1]
     return module
-
--- a/rhodecode/lib/dbmigrate/migrate/versioning/util/keyedinstance.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/util/keyedinstance.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,7 +4,7 @@
 class KeyedInstance(object):
     """A class whose instances have a unique identifier of some sort
     No two instances with the same unique ID should exist - if we try to create
-    a second instance, the first should be returned. 
+    a second instance, the first should be returned.
     """
 
     _instances = dict()
@@ -24,7 +24,7 @@
     @classmethod
     def _key(cls, *p, **k):
         """Given a unique identifier, return a dictionary key
-        This should be overridden by child classes, to specify which parameters 
+        This should be overridden by child classes, to specify which parameters
         should determine an object's uniqueness
         """
         raise NotImplementedError()
--- a/rhodecode/lib/dbmigrate/migrate/versioning/version.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/migrate/versioning/version.py	Sun Apr 03 18:23:15 2011 +0200
@@ -59,7 +59,7 @@
         and store them in self.versions
         """
         super(Collection, self).__init__(path)
-        
+
         # Create temporary list of files, allowing skipped version numbers.
         files = os.listdir(path)
         if '1' in files:
@@ -104,7 +104,7 @@
 
         script.PythonScript.create(filepath, **k)
         self.versions[ver] = Version(ver, self.path, [filename])
-        
+
     def create_new_sql_version(self, database, **k):
         """Create SQL files for new version"""
         ver = self.latest + 1
@@ -116,7 +116,7 @@
             filepath = self._version_path(filename)
             script.SqlScript.create(filepath, **k)
             self.versions[ver].add_script(filepath)
-        
+
     def version(self, vernum=None):
         """Returns latest Version if vernum is not given.
         Otherwise, returns wanted version"""
@@ -135,7 +135,7 @@
 
 class Version(object):
     """A single version in a collection
-    :param vernum: Version Number 
+    :param vernum: Version Number
     :param path: Path to script files
     :param filelist: List of scripts
     :type vernum: int, VerNum
@@ -152,7 +152,7 @@
 
         for script in filelist:
             self.add_script(os.path.join(path, script))
-    
+
     def script(self, database=None, operation=None):
         """Returns SQL or Python Script"""
         for db in (database, 'default'):
--- a/rhodecode/lib/dbmigrate/versions/002_version_1_1_0.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/versions/002_version_1_1_0.py	Sun Apr 03 18:23:15 2011 +0200
@@ -13,7 +13,7 @@
 log = logging.getLogger(__name__)
 
 def upgrade(migrate_engine):
-    """ Upgrade operations go here. 
+    """ Upgrade operations go here.
     Don't create your own engine; bind migrate_engine to your metadata
     """
 
@@ -32,7 +32,7 @@
 
     #==========================================================================
     # Upgrade of `user_logs` table
-    #==========================================================================    
+    #==========================================================================
 
     tblname = 'users'
     tbl = Table(tblname, MetaData(bind=migrate_engine), autoload=True,
@@ -48,7 +48,7 @@
 
     #==========================================================================
     # Upgrade of `repositories` table
-    #==========================================================================    
+    #==========================================================================
     tblname = 'repositories'
     tbl = Table(tblname, MetaData(bind=migrate_engine), autoload=True,
                     autoload_with=migrate_engine)
@@ -84,7 +84,7 @@
 
         follows_user = relation('User', primaryjoin='User.user_id==UserFollowing.follows_user_id')
         follows_repository = relation('Repository')
-        
+
     UserFollowing().__table__.create()
 
     #==========================================================================
@@ -113,5 +113,3 @@
 def downgrade(migrate_engine):
     meta = MetaData()
     meta.bind = migrate_engine
-
-
--- a/rhodecode/lib/dbmigrate/versions/003_version_1_2_0.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/versions/003_version_1_2_0.py	Sun Apr 03 18:23:15 2011 +0200
@@ -15,7 +15,7 @@
 log = logging.getLogger(__name__)
 
 def upgrade(migrate_engine):
-    """ Upgrade operations go here. 
+    """ Upgrade operations go here.
     Don't create your own engine; bind migrate_engine to your metadata
     """
 
@@ -69,7 +69,7 @@
 
     #==========================================================================
     # Upgrade of `repositories` table
-    #==========================================================================    
+    #==========================================================================
     from rhodecode.model.db import Repository
 
     #ADD downloads column#
@@ -96,5 +96,3 @@
 def downgrade(migrate_engine):
     meta = MetaData()
     meta.bind = migrate_engine
-
-
--- a/rhodecode/lib/dbmigrate/versions/__init__.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/dbmigrate/versions/__init__.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Package containing new versions of database models
-    
+
     :created_on: Dec 11, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/lib/exceptions.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/exceptions.py	Sun Apr 03 18:23:15 2011 +0200
@@ -7,12 +7,12 @@
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/lib/helpers.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/helpers.py	Sun Apr 03 18:23:15 2011 +0200
@@ -69,7 +69,7 @@
 class _GetError(object):
     """Get error from form_errors, and represent it as span wrapped error
     message
-    
+
     :param field_name: field to fetch errors for
     :param form_errors: form errors dict
     """
@@ -84,9 +84,9 @@
 class _ToolTip(object):
 
     def __call__(self, tooltip_title, trim_at=50):
-        """Special function just to wrap our text into nice formatted 
+        """Special function just to wrap our text into nice formatted
         autowrapped text
-        
+
         :param tooltip_title:
         """
 
@@ -94,7 +94,7 @@
                        .replace('\n', '<br/>')
 
     def activate(self):
-        """Adds tooltip mechanism to the given Html all tooltips have to have 
+        """Adds tooltip mechanism to the given Html all tooltips have to have
         set class `tooltip` and set attribute `tooltip_title`.
         Then a tooltip will be generated based on that. All with yui js tooltip
         """
@@ -104,18 +104,18 @@
             function toolTipsId(){
                 var ids = [];
                 var tts = YAHOO.util.Dom.getElementsByClassName('tooltip');
-                
+
                 for (var i = 0; i < tts.length; i++) {
                     //if element doesn't not have and id autogenerate one for tooltip
-                    
+
                     if (!tts[i].id){
                         tts[i].id='tt'+i*100;
                     }
                     ids.push(tts[i].id);
                 }
-                return ids        
+                return ids
             };
-            var myToolTips = new YAHOO.widget.Tooltip("tooltip", { 
+            var myToolTips = new YAHOO.widget.Tooltip("tooltip", {
                 context: [[toolTipsId()],"tl","bl",null,[0,5]],
                 monitorresize:false,
                 xyoffset :[0,0],
@@ -123,7 +123,7 @@
                 hidedelay:5,
                 showdelay:20,
             });
-            
+
         });
         '''
         return literal(js)
@@ -228,7 +228,7 @@
 
 def pygmentize(filenode, **kwargs):
     """pygmentize function using pygments
-    
+
     :param filenode:
     """
 
@@ -237,15 +237,15 @@
 
 def pygmentize_annotation(repo_name, filenode, **kwargs):
     """pygmentize function for annotation
-    
+
     :param filenode:
     """
 
     color_dict = {}
     def gen_color(n=10000):
-        """generator for getting n of evenly distributed colors using 
+        """generator for getting n of evenly distributed colors using
         hsv color and golden ratio. It always return same order of colors
-        
+
         :returns: RGB tuple
         """
         import colorsys
@@ -356,7 +356,7 @@
 def bool2icon(value):
     """Returns True/False values represented as small html image of true/false
     icons
-    
+
     :param value: bool value
     """
 
@@ -374,7 +374,7 @@
 def action_parser(user_log, feed=False):
     """This helper will action_map the specified string action into translated
     fancy names with icons and links
-    
+
     :param user_log: user log instance
     :param feed: use output for feeds (no html and fancy icons)
     """
@@ -638,5 +638,3 @@
             return link_to(group.group_name, url('repos_group', id=group.group_id))
         return literal(' &raquo; '.join(map(make_link, groups)) + \
                        " &raquo; " + repo_name)
-
-
--- a/rhodecode/lib/hooks.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/hooks.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~
 
     Hooks runned by rhodecode
-    
+
     :created_on: Aug 6, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -36,7 +36,7 @@
 
 def repo_size(ui, repo, hooktype=None, **kwargs):
     """Presents size of repository after push
-    
+
     :param ui:
     :param repo:
     :param hooktype:
@@ -67,7 +67,7 @@
 
 def log_pull_action(ui, repo, **kwargs):
     """Logs user last pull action
-    
+
     :param ui:
     :param repo:
     """
@@ -83,7 +83,7 @@
 
 def log_push_action(ui, repo, **kwargs):
     """Maps user last push action to new changeset id, from mercurial
-    
+
     :param ui:
     :param repo:
     """
@@ -113,4 +113,3 @@
     action_logger(username, action, repository, extra_params['ip'])
 
     return 0
-
--- a/rhodecode/lib/indexers/__init__.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/indexers/__init__.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Whoosh indexing module for RhodeCode
-    
+
     :created_on: Aug 17, 2010
     :author: marcink
-    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/lib/middleware/https_fixup.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/middleware/https_fixup.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     middleware to handle https correctly
-    
+
     :created_on: May 23, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -39,7 +39,7 @@
 
     def __fixup(self, environ):
         """Function to fixup the environ as needed. In order to use this
-        middleware you should set this header inside your 
+        middleware you should set this header inside your
         proxy ie. nginx, apache etc.
         """
         proto = environ.get('HTTP_X_URL_SCHEME')
--- a/rhodecode/lib/middleware/simplegit.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/middleware/simplegit.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,23 +4,23 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     SimpleGit middleware for handling git protocol request (push/clone etc.)
-    It's implemented with basic auth function    
-    
+    It's implemented with basic auth function
+
     :created_on: Apr 28, 2010
     :author: marcink
-    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -78,9 +78,9 @@
 log = logging.getLogger(__name__)
 
 def is_git(environ):
-    """Returns True if request's target is git server. 
+    """Returns True if request's target is git server.
     ``HTTP_USER_AGENT`` would then have git client version given.
-    
+
     :param environ:
     """
     http_user_agent = environ.get('HTTP_USER_AGENT')
@@ -93,7 +93,7 @@
     def __init__(self, application, config):
         self.application = application
         self.config = config
-        #authenticate this git request using 
+        #authenticate this git request using
         self.authenticate = AuthBasicAuthenticator('', authfunc)
         self.ipaddr = '0.0.0.0'
         self.repository = None
@@ -117,7 +117,7 @@
         try:
             #==================================================================
             # GET REPOSITORY NAME
-            #==================================================================            
+            #==================================================================
             self.repo_name = self.__get_repository(environ)
         except:
             return HTTPInternalServerError()(environ, start_response)
@@ -139,7 +139,7 @@
                     log.debug('Anonymous access is disabled, running '
                               'authentication')
                 #==============================================================
-                # DEFAULT PERM FAILED OR ANONYMOUS ACCESS IS DISABLED SO WE 
+                # DEFAULT PERM FAILED OR ANONYMOUS ACCESS IS DISABLED SO WE
                 # NEED TO AUTHENTICATE AND ASK FOR AUTH USER PERMISSIONS
                 #==============================================================
 
@@ -211,7 +211,7 @@
     def __check_permission(self, action, user, repo_name):
         """Checks permissions using action (push/pull) user and repository
         name
-        
+
         :param action: push or pull action
         :param user: user instance
         :param repo_name: repository name
@@ -235,7 +235,7 @@
 
     def __get_repository(self, environ):
         """Get's repository name out of PATH_INFO header
-        
+
         :param environ: environ where PATH_INFO is stored
         """
         try:
@@ -254,7 +254,7 @@
 
     def __get_action(self, environ):
         """Maps git request commands into a pull or push command.
-        
+
         :param environ:
         """
         service = environ['QUERY_STRING'].split('=')
--- a/rhodecode/lib/middleware/simplehg.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/middleware/simplehg.py	Sun Apr 03 18:23:15 2011 +0200
@@ -3,24 +3,24 @@
     rhodecode.lib.middleware.simplehg
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    SimpleHG middleware for handling mercurial protocol request 
+    SimpleHG middleware for handling mercurial protocol request
     (push/clone etc.). It's implemented with basic auth function
-    
+
     :created_on: Apr 28, 2010
     :author: marcink
-    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -84,7 +84,7 @@
         try:
             #==================================================================
             # GET REPOSITORY NAME
-            #==================================================================            
+            #==================================================================
             self.repo_name = self.__get_repository(environ)
         except:
             return HTTPInternalServerError()(environ, start_response)
@@ -106,7 +106,7 @@
                     log.debug('Anonymous access is disabled, running '
                               'authentication')
                 #==============================================================
-                # DEFAULT PERM FAILED OR ANONYMOUS ACCESS IS DISABLED SO WE 
+                # DEFAULT PERM FAILED OR ANONYMOUS ACCESS IS DISABLED SO WE
                 # NEED TO AUTHENTICATE AND ASK FOR AUTH USER PERMISSIONS
                 #==============================================================
 
@@ -183,7 +183,7 @@
     def __check_permission(self, action, user, repo_name):
         """Checks permissions using action (push/pull) user and repository
         name
-        
+
         :param action: push or pull action
         :param user: user instance
         :param repo_name: repository name
@@ -207,7 +207,7 @@
 
     def __get_repository(self, environ):
         """Get's repository name out of PATH_INFO header
-        
+
         :param environ: environ where PATH_INFO is stored
         """
         try:
@@ -226,7 +226,7 @@
     def __get_action(self, environ):
         """Maps mercurial request commands into a clone,pull or push command.
         This should always return a valid command string
-        
+
         :param environ:
         """
         mapping = {'changegroup': 'pull',
--- a/rhodecode/lib/profiler.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/profiler.py	Sun Apr 03 18:23:15 2011 +0200
@@ -12,8 +12,8 @@
     def __init__(self, app):
         self.lock = threading.Lock()
         self.app = app
-    
-    
+
+
     def __call__(self, environ, start_response):
         with self.lock:
             profiler = cProfile.Profile()
@@ -41,13 +41,11 @@
                 ##  Browsers don't mind this.
                 resp += '<pre style="text-align:left; border-top: 4px dashed red; padding: 1em;">'
                 resp += cgi.escape(out.getvalue(), True)
-                
+
                 output = StringIO()
                 pprint.pprint(environ, output, depth=3)
-                
+
                 resp += cgi.escape(output.getvalue(), True)
                 resp += '</pre>'
-                
+
             return resp
-    
-
--- a/rhodecode/lib/smtp_mailer.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/smtp_mailer.py	Sun Apr 03 18:23:15 2011 +0200
@@ -2,9 +2,9 @@
 """
     rhodecode.lib.smtp_mailer
     ~~~~~~~~~~~~~~~~~~~~~~~~~
-    
+
     Simple smtp mailer used in RhodeCode
-    
+
     :created_on: Sep 13, 2010
     :copyright: (c) 2011 by marcink.
     :license: LICENSE_NAME, see LICENSE_FILE for more details.
@@ -25,14 +25,14 @@
 
 class SmtpMailer(object):
     """SMTP mailer class
-    
+
     mailer = SmtpMailer(mail_from, user, passwd, mail_server, mail_port, ssl, tls)
-    mailer.send(recipients, subject, body, attachment_files)    
-    
+    mailer.send(recipients, subject, body, attachment_files)
+
     :param recipients might be a list of string or single string
-    :param attachment_files is a dict of {filename:location} 
-        it tries to guess the mimetype and attach the file 
-    
+    :param attachment_files is a dict of {filename:location}
+        it tries to guess the mimetype and attach the file
+
     """
 
     def __init__(self, mail_from, user, passwd, mail_server,
@@ -132,7 +132,7 @@
     def get_content(self, msg_file):
         """Get content based on type, if content is a string do open first
         else just read because it's a probably open file object
-        
+
         :param msg_file:
         """
         if isinstance(msg_file, str):
--- a/rhodecode/lib/utils.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/lib/utils.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~
 
     Utilities library for RhodeCode
-    
+
     :created_on: Apr 18, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -55,10 +55,10 @@
 
 def recursive_replace(str, replace=' '):
     """Recursive replace of given sign to just one instance
-    
+
     :param str: given string
     :param replace: char to find and replace multiple instances
-        
+
     Examples::
     >>> recursive_replace("Mighty---Mighty-Bo--sstones",'-')
     'Mighty-Mighty-Bo-sstones'
@@ -91,7 +91,7 @@
 def action_logger(user, action, repo, ipaddr='', sa=None):
     """
     Action logger for various actions made by users
-    
+
     :param user: user that made this action, can be a unique username string or
         object containing user_id attribute
     :param action: action to log, should be on of predefined unique actions for
@@ -100,7 +100,7 @@
         that action was made on
     :param ipaddr: optional ip address from what the action was made
     :param sa: optional sqlalchemy session
-    
+
     """
 
     if not sa:
@@ -146,10 +146,10 @@
 
 def get_repos(path, recursive=False):
     """
-    Scans given path for repos and return (name,(type,path)) tuple 
-    
+    Scans given path for repos and return (name,(type,path)) tuple
+
     :param path: path to scann for repositories
-    :param recursive: recursive search and return names with subdirs in front 
+    :param recursive: recursive search and return names with subdirs in front
     """
     from vcs.utils.helpers import get_scm
     from vcs.exceptions import VCSError
@@ -182,7 +182,7 @@
     Check given path for existence of directory
     :param repo_name:
     :param base_path:
-    
+
     :return False: if this directory is present
     """
     if os.path.isdir(os.path.join(base_path, repo_name)):return False
@@ -230,7 +230,7 @@
 def make_ui(read_from='file', path=None, checkpaths=True):
     """A function that will read python rc files or database
     and make an mercurial ui object from read options
-    
+
     :param path: path to mercurial config file
     :param checkpaths: check the path
     :param read_from: read from 'file' or 'db'
@@ -275,7 +275,7 @@
 
 def set_rhodecode_config(config):
     """Updates pylons config with new settings from database
-    
+
     :param config:
     """
     from rhodecode.model.settings import SettingsModel
@@ -285,7 +285,7 @@
         config[k] = v
 
 def invalidate_cache(cache_key, *args):
-    """Puts cache invalidation task into db for 
+    """Puts cache invalidation task into db for
     further global cache invalidation
     """
 
@@ -332,7 +332,7 @@
 def map_groups(groups):
     """Checks for groups existence, and creates groups structures.
     It returns last group in structure
-    
+
     :param groups: list of groups structure
     """
     sa = meta.Session()
@@ -355,7 +355,7 @@
     """maps all repos given in initial_repo_list, non existing repositories
     are created, if remove_obsolete is True it also check for db entries
     that are not in initial_repo_list and removes them.
-    
+
     :param initial_repo_list: list of repositories found by scanning methods
     :param remove_obsolete: check for obsolete entries in database
     """
@@ -562,7 +562,7 @@
         pass
 
 def create_test_env(repos_test_path, config):
-    """Makes a fresh database and 
+    """Makes a fresh database and
     install test repository into tmp dir
     """
     from rhodecode.lib.db_manage import DbManage
@@ -641,10 +641,10 @@
     def notify_msg(self, msg, log=False):
         """Make a notification to user, additionally if logger is passed
         it logs this action using given logger
-        
+
         :param msg: message that will be printed to user
         :param log: logging instance, to use to additionally log this message
-        
+
         """
         if log and isinstance(log, logging):
             log(msg)
@@ -653,7 +653,7 @@
     def run(self, args):
         """
         Overrides Command.run
-        
+
         Checks for a config file argument and loads it.
         """
         if len(args) < self.min_args:
--- a/rhodecode/model/__init__.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/model/__init__.py	Sun Apr 03 18:23:15 2011 +0200
@@ -2,42 +2,42 @@
 """
     rhodecode.model.__init__
     ~~~~~~~~~~~~~~~~~~~~~~~~
-    
+
     The application's model objects
-    
+
     :created_on: Nov 25, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
-    
-    
+
+
     :example:
-    
+
         .. code-block:: python
-    
+
            from paste.deploy import appconfig
            from pylons import config
            from sqlalchemy import engine_from_config
            from rhodecode.config.environment import load_environment
-           
+
            conf = appconfig('config:development.ini', relative_to = './../../')
            load_environment(conf.global_conf, conf.local_conf)
-           
+
            engine = engine_from_config(config, 'sqlalchemy.')
            init_model(engine)
            # RUN YOUR CODE HERE
-    
+
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -53,7 +53,7 @@
     """Initializes db session, bind the engine with the metadata,
     Call this before using any of the tables or classes in the model, preferably
     once in application start
-    
+
     :param engine: engine to bind to
     """
     log.info("initializing db for %s", engine)
@@ -62,7 +62,7 @@
 class BaseModel(object):
     """Base Model for all RhodeCode models, it adds sql alchemy session
     into instance of model
-    
+
     :param sa: If passed it reuses this session instead of creating a new one
     """
 
--- a/rhodecode/model/caching_query.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/model/caching_query.py	Sun Apr 03 18:23:15 2011 +0200
@@ -11,12 +11,12 @@
    parameters on a Query
  * RelationshipCache - a variant of FromCache which is specific
    to a query invoked during a lazy load.
- * _params_from_query - extracts value parameters from 
+ * _params_from_query - extracts value parameters from
    a Query.
 
 The rest of what's here are standard SQLAlchemy and
 Beaker constructs.
-   
+
 """
 from beaker.exceptions import BeakerException
 from sqlalchemy.orm.interfaces import MapperOption
@@ -25,30 +25,30 @@
 import beaker
 
 class CachingQuery(Query):
-    """A Query subclass which optionally loads full results from a Beaker 
+    """A Query subclass which optionally loads full results from a Beaker
     cache region.
-    
+
     The CachingQuery stores additional state that allows it to consult
     a Beaker cache before accessing the database:
-    
-    * A "region", which is a cache region argument passed to a 
+
+    * A "region", which is a cache region argument passed to a
       Beaker CacheManager, specifies a particular cache configuration
       (including backend implementation, expiration times, etc.)
     * A "namespace", which is a qualifying name that identifies a
-      group of keys within the cache.  A query that filters on a name 
-      might use the name "by_name", a query that filters on a date range 
+      group of keys within the cache.  A query that filters on a name
+      might use the name "by_name", a query that filters on a date range
       to a joined table might use the name "related_date_range".
-      
+
     When the above state is present, a Beaker cache is retrieved.
-    
-    The "namespace" name is first concatenated with 
-    a string composed of the individual entities and columns the Query 
+
+    The "namespace" name is first concatenated with
+    a string composed of the individual entities and columns the Query
     requests, i.e. such as ``Query(User.id, User.name)``.
-    
+
     The Beaker cache is then loaded from the cache manager based
     on the region and composed namespace.  The key within the cache
     itself is then constructed against the bind parameters specified
-    by this query, which are usually literals defined in the 
+    by this query, which are usually literals defined in the
     WHERE clause.
 
     The FromCache and RelationshipCache mapper options below represent
@@ -63,7 +63,7 @@
     def __iter__(self):
         """override __iter__ to pull results from Beaker
            if particular attributes have been configured.
-           
+
            Note that this approach does *not* detach the loaded objects from
            the current session. If the cache backend is an in-process cache
            (like "memory") and lives beyond the scope of the current session's
@@ -71,7 +71,7 @@
            modified to first expunge() each loaded item from the current
            session before returning the list of items, so that the items
            in the cache are not the same ones in the current Session.
-           
+
         """
         if hasattr(self, '_cache_parameters'):
             return self.get_value(createfunc=lambda: list(Query.__iter__(self)))
@@ -143,7 +143,7 @@
     return cache, cache_key
 
 def _namespace_from_query(namespace, query):
-    # cache namespace - the token handed in by the 
+    # cache namespace - the token handed in by the
     # option + class we're querying against
     namespace = " ".join([namespace] + [str(x) for x in query._entities])
 
@@ -169,18 +169,18 @@
 
     def __init__(self, region, namespace, cache_key=None):
         """Construct a new FromCache.
-        
+
         :param region: the cache region.  Should be a
         region configured in the Beaker CacheManager.
-        
+
         :param namespace: the cache namespace.  Should
         be a name uniquely describing the target Query's
         lexical structure.
-        
-        :param cache_key: optional.  A string cache key 
+
+        :param cache_key: optional.  A string cache key
         that will serve as the key to the query.   Use this
         if your query has a huge amount of parameters (such
-        as when using in_()) which correspond more simply to 
+        as when using in_()) which correspond more simply to
         some other identifier.
 
         """
@@ -194,25 +194,25 @@
         _set_cache_parameters(query, self.region, self.namespace, self.cache_key)
 
 class RelationshipCache(MapperOption):
-    """Specifies that a Query as called within a "lazy load" 
+    """Specifies that a Query as called within a "lazy load"
        should load results from a cache."""
 
     propagate_to_loaders = True
 
     def __init__(self, region, namespace, attribute):
         """Construct a new RelationshipCache.
-        
+
         :param region: the cache region.  Should be a
         region configured in the Beaker CacheManager.
-        
+
         :param namespace: the cache namespace.  Should
         be a name uniquely describing the target Query's
         lexical structure.
-        
+
         :param attribute: A Class.attribute which
         indicates a particular class relationship() whose
         lazy loader should be pulled from the cache.
-        
+
         """
         self.region = region
         self.namespace = namespace
@@ -241,11 +241,11 @@
 
     def and_(self, option):
         """Chain another RelationshipCache option to this one.
-        
+
         While many RelationshipCache objects can be specified on a single
         Query separately, chaining them together allows for a more efficient
         lookup during load.
-        
+
         """
         self._relationship_options.update(option._relationship_options)
         return self
@@ -253,12 +253,12 @@
 
 def _params_from_query(query):
     """Pull the bind parameter values from a query.
-    
+
     This takes into account any scalar attribute bindparam set up.
-    
+
     E.g. params_from_query(query.filter(Cls.foo==5).filter(Cls.bar==7)))
     would return [5, 7].
-    
+
     """
     v = []
     def visit_bindparam(bind):
--- a/rhodecode/model/db.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/model/db.py	Sun Apr 03 18:23:15 2011 +0200
@@ -2,24 +2,24 @@
 """
     rhodecode.model.db
     ~~~~~~~~~~~~~~~~~~
-    
+
     Database Models for RhodeCode
-    
+
     :created_on: Apr 08, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -387,4 +387,3 @@
     repository_id = Column('repository_id', String(250), primary_key=True)
     repository_path = Column('repository_path', Text)
     version = Column('version', Integer)
-
--- a/rhodecode/model/forms.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/model/forms.py	Sun Apr 03 18:23:15 2011 +0200
@@ -10,14 +10,14 @@
 allow_extra_fields      False     If True, then it is not an error when keys that aren't associated with a validator are present
 filter_extra_fields     False     If True, then keys that aren't associated with a validator are removed
 if_key_missing          NoDefault If this is given, then any keys that aren't available but are expected will be replaced with this value (and then validated). This does not override a present .if_missing attribute on validators. NoDefault is a special FormEncode class to mean that no default values has been specified and therefore missing keys shouldn't take a default value.
-ignore_key_missing      False     If True, then missing keys will be missing in the result, if the validator doesn't have .if_missing on it already    
-  
-  
+ignore_key_missing      False     If True, then missing keys will be missing in the result, if the validator doesn't have .if_missing on it already
+
+
 <name> = formencode.validators.<name of validator>
 <name> must equal form name
 list=[1,2,3,4,5]
 for SELECT use formencode.All(OneOf(list), Int())
-    
+
 """
 import os
 import re
@@ -361,7 +361,7 @@
         return value
 
 #===============================================================================
-# FORMS        
+# FORMS
 #===============================================================================
 class LoginForm(formencode.Schema):
     allow_extra_fields = True
--- a/rhodecode/model/meta.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/model/meta.py	Sun Apr 03 18:23:15 2011 +0200
@@ -21,7 +21,7 @@
 
 class BaseModel(object):
     """Base Model for all classess
-    
+
     """
 
     @classmethod
@@ -30,7 +30,7 @@
         return class_mapper(cls).c.keys()
 
     def get_dict(self):
-        """return dict with keys and values corresponding 
+        """return dict with keys and values corresponding
         to this model data """
 
         d = {}
@@ -39,7 +39,7 @@
         return d
 
     def get_appstruct(self):
-        """return list with keys and values tupples corresponding 
+        """return list with keys and values tupples corresponding
         to this model data """
 
         l = []
--- a/rhodecode/model/permission.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/model/permission.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     permissions model for RhodeCode
-    
+
     :created_on: Aug 20, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -43,7 +43,7 @@
 
     def get_permission(self, permission_id, cache=False):
         """Get's permissions by id
-        
+
         :param permission_id: id of permission to get from database
         :param cache: use Cache for this query
         """
@@ -55,7 +55,7 @@
 
     def get_permission_by_name(self, name, cache=False):
         """Get's permissions by given name
-        
+
         :param name: name to fetch
         :param cache: Use cache for this query
         """
@@ -76,7 +76,7 @@
                             ' your database' % len(u2p))
 
         try:
-            #stage 1 change defaults    
+            #stage 1 change defaults
             for p in u2p:
                 if p.permission.permission_name.startswith('repository.'):
                     p.permission = self.get_permission_by_name(
--- a/rhodecode/model/repo.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/model/repo.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~
 
     Repository model for rhodecode
-    
+
     :created_on: Jun 5, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -304,7 +304,7 @@
     def __create_repo(self, repo_name, alias, clone_uri=False):
         """
         makes repository on filesystem
-        
+
         :param repo_name:
         :param alias:
         """
@@ -319,7 +319,7 @@
     def __rename_repo(self, old, new):
         """
         renames repository on filesystem
-        
+
         :param old: old name
         :param new: new name
         """
@@ -338,7 +338,7 @@
         added rm__ prefix into dir, and rename internat .hg/.git dirs so this
         repository is no longer valid for rhodecode, can be undeleted later on
         by reverting the renames on this repository
-        
+
         :param repo: repo object
         """
         rm_path = os.path.join(self.repos_path, repo.repo_name)
--- a/rhodecode/model/scm.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/model/scm.py	Sun Apr 03 18:23:15 2011 +0200
@@ -7,19 +7,19 @@
 
     :created_on: Apr 9, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -84,9 +84,9 @@
         return q.ui_value
 
     def repo_scan(self, repos_path=None):
-        """Listing of repositories in given path. This path should not be a 
+        """Listing of repositories in given path. This path should not be a
         repository itself. Return a dictionary of repository objects
-        
+
         :param repos_path: path to directory containing repositories
         """
 
@@ -120,7 +120,7 @@
     def get_repos(self, all_repos=None):
         """Get all repos from db and for each repo create it's backend instance.
         and fill that backed with information from database
-        
+
         :param all_repos: give specific repositories list, good for filtering
             this have to be a list of  just the repository names
         """
@@ -166,10 +166,10 @@
         """Returns a tuple of Repository,DbRepository,
         Get's repository from given name, creates BackendInstance and
         propagates it's data from database with all additional information
-        
+
         :param repo_name:
         :param invalidation_list: if a invalidation list is given the get
-            method should not manually check if this repository needs 
+            method should not manually check if this repository needs
             invalidation and just invalidate the repositories in list
         :param retval: string specifing what to return one of 'repo','dbrepo',
             'all'if repo or dbrepo is given it'll just lazy load chosen type
@@ -234,9 +234,9 @@
         return r, dbr
 
     def mark_for_invalidation(self, repo_name):
-        """Puts cache invalidation task into db for 
+        """Puts cache invalidation task into db for
         further global cache invalidation
-        
+
         :param repo_name: this repo that should invalidation take place
         """
 
@@ -367,7 +367,7 @@
                       'action':'push_remote',
                       'repository':repo_name}
 
-            #inject ui extra param to log this action via push logger        
+            #inject ui extra param to log this action via push logger
             for k, v in extras.items():
                 repo._repo.ui.setconfig('rhodecode_extras', k, v)
 
@@ -383,7 +383,7 @@
 
     def _should_invalidate(self, repo_name):
         """Looks up database for invalidation signals for this repo_name
-        
+
         :param repo_name:
         """
 
@@ -395,9 +395,9 @@
         return ret
 
     def _mark_invalidated(self, cache_key):
-        """ Marks all occurrences of cache to invalidation as already 
+        """ Marks all occurrences of cache to invalidation as already
         invalidated
-        
+
         :param cache_key:
         """
 
@@ -410,4 +410,3 @@
         except (DatabaseError,):
             log.error(traceback.format_exc())
             self.sa.rollback()
-
--- a/rhodecode/model/settings.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/model/settings.py	Sun Apr 03 18:23:15 2011 +0200
@@ -7,19 +7,19 @@
 
     :created on Nov 17, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -47,8 +47,8 @@
         return r
 
     def get_app_settings(self, cache=False):
-        """Get's config from database, each config key is prefixed with 
-        'rhodecode_' prefix, than global pylons config is updated with such 
+        """Get's config from database, each config key is prefixed with
+        'rhodecode_' prefix, than global pylons config is updated with such
         keys
         """
 
@@ -71,11 +71,11 @@
         :returns:
         ldap_active
         ldap_host
-        ldap_port 
+        ldap_port
         ldap_ldaps
         ldap_tls_reqcert
-        ldap_dn_user 
-        ldap_dn_pass 
+        ldap_dn_user
+        ldap_dn_pass
         ldap_base_dn
         ldap_filter
         ldap_search_scope
--- a/rhodecode/model/user.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/model/user.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~
 
     users model for RhodeCode
-    
+
     :created_on: Apr 9, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -223,9 +223,9 @@
         """
         Fetches auth_user by user_id,or api_key if present.
         Fills auth_user attributes with those taken from database.
-        Additionally set's is_authenitated if lookup fails 
+        Additionally set's is_authenitated if lookup fails
         present in database
-        
+
         :param auth_user: instance of user to set attributes
         :param user_id: user id to fetch by
         :param api_key: api key to fetch by
@@ -255,7 +255,7 @@
         """Fills user permission attribute with permissions taken from database
         works for permissions given for repositories, and for permissions that
         as part of beeing group member
-        
+
         :param user: user instance to fill his perms
         """
 
@@ -274,7 +274,7 @@
 
         if user.is_admin:
             #=======================================================================
-            # #admin have all default rights set to admin        
+            # #admin have all default rights set to admin
             #=======================================================================
             user.permissions['global'].add('hg.admin')
 
@@ -325,7 +325,7 @@
 
 
             #=======================================================================
-            # check if user is part of groups for this repository and fill in 
+            # check if user is part of groups for this repository and fill in
             # (or replace with higher) permissions
             #=======================================================================
             user_perms_from_users_groups = self.sa.query(UsersGroupToPerm, Permission, Repository,)\
--- a/rhodecode/model/users_group.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/model/users_group.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     users groups model for RhodeCode
-    
+
     :created_on: Jan 25, 2011
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--- a/rhodecode/tests/functional/test_files.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/tests/functional/test_files.py	Sun Apr 03 18:23:15 2011 +0200
@@ -311,4 +311,3 @@
                                     f_path=f_path))
 
         assert "There is no file nor directory at the given path: %r at revision %r" % (f_path, rev[:12]) in response.session['flash'][0][1], 'No flash message'
-
--- a/rhodecode/tests/functional/test_login.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/tests/functional/test_login.py	Sun Apr 03 18:23:15 2011 +0200
@@ -228,6 +228,3 @@
         print response.session['flash']
         assert 'You have successfully registered into rhodecode' in response.session['flash'][0], 'No flash message about user registration'
         assert 'Your new password was sent' in response.session['flash'][1], 'No flash message about password reset'
-
-
-
--- a/rhodecode/tests/functional/test_search.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/tests/functional/test_search.py	Sun Apr 03 18:23:15 2011 +0200
@@ -33,4 +33,3 @@
         print response.body
         assert '4 results' in response.body, 'no message about proper search results'
         assert 'Permission denied' not in response.body, 'Wrong permissions settings for that repo and user'
-
--- a/rhodecode/tests/functional/test_settings.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/tests/functional/test_settings.py	Sun Apr 03 18:23:15 2011 +0200
@@ -47,4 +47,3 @@
                                     repo_name=fork_name))
 
         assert 'Fork of %s' % repo_name in response.body, 'no message about that this repo is a fork'
-
--- a/rhodecode/tests/functional/test_summary.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/tests/functional/test_summary.py	Sun Apr 03 18:23:15 2011 +0200
@@ -29,4 +29,3 @@
         r.enable_statistics = True
         self.sa.add(r)
         self.sa.commit()
-
--- a/rhodecode/tests/test_hg_operations.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/tests/test_hg_operations.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,7 +4,7 @@
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     Test suite for making push/pull operations
-    
+
     :created_on: Dec 30, 2010
     :copyright: (c) 2010 by marcink.
     :license: LICENSE_NAME, see LICENSE_FILE for more details.
@@ -328,5 +328,3 @@
     test_push_new_file(commits=15)
     #test_push_wrong_path()
     #test_push_wrong_credentials()
-
-
--- a/rhodecode/websetup.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/rhodecode/websetup.py	Sun Apr 03 18:23:15 2011 +0200
@@ -4,22 +4,22 @@
     ~~~~~~~~~~~~~~~~~~
 
     Weboperations and setup for rhodecode
-    
+
     :created_on: Dec 11, 2010
     :author: marcink
-    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>    
+    :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
     :license: GPLv3, see COPYING for more details.
 """
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -47,8 +47,3 @@
     dbmanage.populate_default_permissions()
 
     load_environment(conf.global_conf, conf.local_conf, initial=True)
-
-
-
-
-
--- a/setup.py	Sun Apr 03 12:43:29 2011 +0200
+++ b/setup.py	Sun Apr 03 18:23:15 2011 +0200
@@ -115,6 +115,6 @@
     celerybeat=rhodecode.lib.celerypylons.commands:CeleryBeatCommand
     camqadm=rhodecode.lib.celerypylons.commands:CAMQPAdminCommand
     celeryev=rhodecode.lib.celerypylons.commands:CeleryEventCommand
-              
+
     """,
 )