Mercurial > kallithea
comparison rhodecode/model/hg.py @ 633:fcf599cd3404 beta
Move changes for git implementation
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 24 Oct 2010 22:27:28 +0200 |
parents | 05528ad948c4 |
children | ffd07396d315 |
comparison
equal
deleted
inserted
replaced
631:05528ad948c4 | 633:fcf599cd3404 |
---|---|
31 from rhodecode.model.db import Repository, User | 31 from rhodecode.model.db import Repository, User |
32 from sqlalchemy.orm import joinedload | 32 from sqlalchemy.orm import joinedload |
33 from vcs.exceptions import RepositoryError, VCSError | 33 from vcs.exceptions import RepositoryError, VCSError |
34 import logging | 34 import logging |
35 import sys | 35 import sys |
36 import time | |
37 | |
36 log = logging.getLogger(__name__) | 38 log = logging.getLogger(__name__) |
37 | 39 |
38 try: | 40 try: |
39 from vcs.backends.hg import MercurialRepository | 41 from vcs.backends.hg import MercurialRepository |
40 from vcs.backends.git import GitRepository | 42 from vcs.backends.git import GitRepository |
153 tmp_d['name'] = repo.name | 155 tmp_d['name'] = repo.name |
154 tmp_d['name_sort'] = tmp_d['name'].lower() | 156 tmp_d['name_sort'] = tmp_d['name'].lower() |
155 tmp_d['description'] = repo.description | 157 tmp_d['description'] = repo.description |
156 tmp_d['description_sort'] = tmp_d['description'] | 158 tmp_d['description_sort'] = tmp_d['description'] |
157 tmp_d['last_change'] = last_change | 159 tmp_d['last_change'] = last_change |
158 tmp_d['last_change_sort'] = last_change[1] - last_change[0] | 160 tmp_d['last_change_sort'] = time.mktime(last_change.timetuple()) |
159 tmp_d['tip'] = tip.short_id | 161 tmp_d['tip'] = tip.short_id |
160 tmp_d['tip_sort'] = tip.revision | 162 tmp_d['tip_sort'] = tip.revision |
161 tmp_d['rev'] = tip.revision | 163 tmp_d['rev'] = tip.revision |
162 tmp_d['contact'] = repo.contact | 164 tmp_d['contact'] = repo.contact |
163 tmp_d['contact_sort'] = tmp_d['contact'] | 165 tmp_d['contact_sort'] = tmp_d['contact'] |