# HG changeset patch # User Marcin Kuzminski # Date 2012-07-16 12:42:21 # Node ID cd207411cf2252c10510ca6c44100706f4e46a36 # Parent f1dfd3a2a1936210931dbd760eaeb80fdc06d4b9 fixed python2.5 compat and repo mapper issue diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -450,8 +450,8 @@ def repo2db_mapper(initial_repo_list, re 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 @@ def repo2db_mapper(initial_repo_list, re 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: diff --git a/rhodecode/model/scm.py b/rhodecode/model/scm.py --- a/rhodecode/model/scm.py +++ b/rhodecode/model/scm.py @@ -22,6 +22,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import with_statement import os import re import time