diff --git a/pylons_app/model/hg_model.py b/pylons_app/model/hg_model.py --- a/pylons_app/model/hg_model.py +++ b/pylons_app/model/hg_model.py @@ -15,7 +15,7 @@ try: from vcs.backends.hg import get_repositories, MercurialRepository except ImportError: print 'You have to import vcs module' - raise + raise Exception('Unable to import vcs') class HgModel(object): """ @@ -37,7 +37,8 @@ class HgModel(object): continue last_change = mercurial_repo.last_change - tip = mercurial_repo.repo.changectx('tip') + tip_rev = mercurial_repo._get_revision('tip') + tip = mercurial_repo.get_changeset(tip_rev) tmp_d = {} tmp_d['name'] = mercurial_repo.name tmp_d['name_sort'] = tmp_d['name'] @@ -45,9 +46,9 @@ class HgModel(object): 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['tip'] = str(tip) - tmp_d['tip_sort'] = tip.rev() - tmp_d['rev'] = tip.rev() + tmp_d['tip'] = tip._short + tmp_d['tip_sort'] = tip_rev + tmp_d['rev'] = tip_rev tmp_d['contact'] = mercurial_repo.contact tmp_d['contact_sort'] = tmp_d['contact'] tmp_d['repo_archives'] = list(mercurial_repo._get_archives())