diff pylons_app/model/hg_model.py @ 450:c3236d7febad

fixed, empty cs bug. Implemented as webhlepers function
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 03 Sep 2010 09:55:48 +0200
parents 7fbf81447c6c
children 6b934c9607e7
line wrap: on
line diff
--- a/pylons_app/model/hg_model.py	Fri Sep 03 09:23:50 2010 +0200
+++ b/pylons_app/model/hg_model.py	Fri Sep 03 09:55:48 2010 +0200
@@ -29,7 +29,7 @@
 from pylons_app.lib.auth import HasRepoPermissionAny
 from pylons_app.model import meta
 from pylons_app.model.db import Repository, User
-from sqlalchemy.orm import joinedload
+from pylons_app.lib import helpers as h
 from vcs.exceptions import RepositoryError, VCSError
 import logging
 import os
@@ -151,11 +151,7 @@
                 continue
             
             last_change = repo.last_change
-            try:
-                tip = repo.get_changeset('tip')
-            except RepositoryError:
-                from pylons_app.lib.utils import EmptyChangeset
-                tip = EmptyChangeset()
+            tip = h.get_changeset_safe(repo, 'tip')
                 
             tmp_d = {}
             tmp_d['name'] = repo.name