diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -16,6 +16,12 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. +""" +Created on April 18, 2010 +Utilities for RhodeCode +@author: marcink +""" + from UserDict import DictMixin from mercurial import ui, config, hg from mercurial.error import RepoError @@ -33,12 +39,6 @@ import datetime import logging import os -""" -Created on April 18, 2010 -Utilities for RhodeCode -@author: marcink -""" - log = logging.getLogger(__name__) @@ -110,8 +110,12 @@ def get_repos(path, recursive=False, ini """ from vcs.utils.helpers import get_scm from vcs.exceptions import VCSError - scm = get_scm(path) - if scm: + + try: + scm = get_scm(path) + except: + pass + else: raise Exception('The given path %s should not be a repository got %s', path, scm) diff --git a/rhodecode/model/hg.py b/rhodecode/model/hg.py --- a/rhodecode/model/hg.py +++ b/rhodecode/model/hg.py @@ -33,6 +33,8 @@ from sqlalchemy.orm import joinedload from vcs.exceptions import RepositoryError, VCSError import logging import sys +import time + log = logging.getLogger(__name__) try: @@ -155,7 +157,7 @@ class HgModel(object): tmp_d['description'] = repo.description tmp_d['description_sort'] = tmp_d['description'] tmp_d['last_change'] = last_change - tmp_d['last_change_sort'] = last_change[1] - last_change[0] + tmp_d['last_change_sort'] = time.mktime(last_change.timetuple()) tmp_d['tip'] = tip.short_id tmp_d['tip_sort'] = tip.revision tmp_d['rev'] = tip.revision diff --git a/rhodecode/templates/branches/branches_data.html b/rhodecode/templates/branches/branches_data.html --- a/rhodecode/templates/branches/branches_data.html +++ b/rhodecode/templates/branches/branches_data.html @@ -8,7 +8,7 @@ %for cnt,branch in enumerate(c.repo_branches.items()):