Mercurial > public > src > rhodecode
changeset 688: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 | 0d18cf02278a |
files | rhodecode/lib/utils.py rhodecode/model/hg.py rhodecode/templates/branches/branches_data.html rhodecode/templates/changeset/raw_changeset.html rhodecode/templates/files/files_browser.html rhodecode/templates/index.html rhodecode/templates/tags/tags_data.html |
diffstat | 7 files changed, 23 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/utils.py Sun Oct 24 16:15:40 2010 +0200 +++ b/rhodecode/lib/utils.py Sun Oct 24 22:27:28 2010 +0200 @@ -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 logging import os -""" -Created on April 18, 2010 -Utilities for RhodeCode -@author: marcink -""" - log = logging.getLogger(__name__) @@ -110,8 +110,12 @@ """ 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)
--- a/rhodecode/model/hg.py Sun Oct 24 16:15:40 2010 +0200 +++ b/rhodecode/model/hg.py Sun Oct 24 22:27:28 2010 +0200 @@ -33,6 +33,8 @@ from vcs.exceptions import RepositoryError, VCSError import logging import sys +import time + log = logging.getLogger(__name__) try: @@ -155,7 +157,7 @@ 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
--- a/rhodecode/templates/branches/branches_data.html Sun Oct 24 16:15:40 2010 +0200 +++ b/rhodecode/templates/branches/branches_data.html Sun Oct 24 22:27:28 2010 +0200 @@ -8,7 +8,7 @@ </tr> %for cnt,branch in enumerate(c.repo_branches.items()): <tr class="parity${cnt%2}"> - <td>${h.age(branch[1]._ctx.date())}</td> + <td>${h.age(branch[1].date)}</td> <td>r${branch[1].revision}:${branch[1].short_id}</td> <td> <span class="logtags">
--- a/rhodecode/templates/changeset/raw_changeset.html Sun Oct 24 16:15:40 2010 +0200 +++ b/rhodecode/templates/changeset/raw_changeset.html Sun Oct 24 22:27:28 2010 +0200 @@ -1,6 +1,6 @@ -# HG changeset patch +# c.scm_type changeset patch # User ${c.changeset.author|n} -# Date ${"%d %d" % c.changeset._ctx.date()} +# Date ${"%d %d" % c.changeset.date} # Node ID ${c.changeset.raw_id} # ${c.parent_tmpl} ${c.changeset.message}
--- a/rhodecode/templates/files/files_browser.html Sun Oct 24 16:15:40 2010 +0200 +++ b/rhodecode/templates/files/files_browser.html Sun Oct 24 22:27:28 2010 +0200 @@ -30,7 +30,7 @@ </tr> </thead> - % if c.files_list.parent: + %if c.files_list.parent: <tr class="parity0"> <td> ${h.link_to('..',h.url('files_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.files_list.parent.path),class_="browser-dir")} @@ -40,7 +40,7 @@ <td></td> <td></td> <td></td> - </tr> + </tr> %endif %for cnt,node in enumerate(c.files_list,1): @@ -65,7 +65,7 @@ </td> <td> %if node.is_file(): - ${h.age(node.last_changeset._ctx.date())} - ${node.last_changeset.date} + ${h.age(node.last_changeset.date)} - ${node.last_changeset.date} %endif </td> <td>
--- a/rhodecode/templates/index.html Sun Oct 24 16:15:40 2010 +0200 +++ b/rhodecode/templates/index.html Sun Oct 24 22:27:28 2010 +0200 @@ -45,7 +45,7 @@ <th class="left">${get_sort(_('Description'))}</th> <th class="left">${get_sort(_('Last change'))}</th> <th class="left">${get_sort(_('Tip'))}</th> - <th class="left">${get_sort(_('Contact'))}</th> + <th class="left">${get_sort(_('Owner'))}</th> <th class="left">${_('RSS')}</th> <th class="left">${_('Atom')}</th> </tr>
--- a/rhodecode/templates/tags/tags_data.html Sun Oct 24 16:15:40 2010 +0200 +++ b/rhodecode/templates/tags/tags_data.html Sun Oct 24 22:27:28 2010 +0200 @@ -8,7 +8,7 @@ </tr> %for cnt,tag in enumerate(c.repo_tags.items()): <tr class="parity${cnt%2}"> - <td>${h.age(tag[1]._ctx.date())}</td> + <td>${h.age(tag[1].date)}</td> <td>r${tag[1].revision}:${tag[1].short_id}</td> <td> <span class="logtags">