Mercurial > kallithea
changeset 2620:cd207411cf22 beta
fixed python2.5 compat and repo mapper issue
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 16 Jul 2012 14:42:21 +0200 |
parents | f1dfd3a2a193 |
children | 4f3ecd7357a2 |
files | rhodecode/lib/utils.py rhodecode/model/scm.py |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/utils.py Mon Jul 16 03:02:41 2012 +0200 +++ b/rhodecode/lib/utils.py Mon Jul 16 14:42:21 2012 +0200 @@ -450,8 +450,8 @@ for name, repo in initial_repo_list.items(): group = map_groups(name) - repo = rm.get_by_repo_name(name) - if not repo: + db_repo = rm.get_by_repo_name(name) + if not db_repo: log.info('repository %s not found creating now' % name) added.append(name) desc = (repo.description @@ -466,8 +466,8 @@ just_db=True ) elif install_git_hook: - if repo.repo_type == 'git': - ScmModel().install_git_hook(repo.scm_instance) + if db_repo.repo_type == 'git': + ScmModel().install_git_hook(db_repo.scm_instance) sa.commit() removed = [] if remove_obsolete:
--- a/rhodecode/model/scm.py Mon Jul 16 03:02:41 2012 +0200 +++ b/rhodecode/model/scm.py Mon Jul 16 14:42:21 2012 +0200 @@ -22,6 +22,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +from __future__ import with_statement import os import re import time