##// END OF EJS Templates
Move changes for git implementation
marcink -
r633:fcf599cd beta
parent child Browse files
Show More
@@ -16,6 +16,12 b''
16 16 # along with this program; if not, write to the Free Software
17 17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 18 # MA 02110-1301, USA.
19 """
20 Created on April 18, 2010
21 Utilities for RhodeCode
22 @author: marcink
23 """
24
19 25 from UserDict import DictMixin
20 26 from mercurial import ui, config, hg
21 27 from mercurial.error import RepoError
@@ -33,12 +39,6 b' import datetime'
33 39 import logging
34 40 import os
35 41
36 """
37 Created on April 18, 2010
38 Utilities for RhodeCode
39 @author: marcink
40 """
41
42 42 log = logging.getLogger(__name__)
43 43
44 44
@@ -110,8 +110,12 b' def get_repos(path, recursive=False, ini'
110 110 """
111 111 from vcs.utils.helpers import get_scm
112 112 from vcs.exceptions import VCSError
113 scm = get_scm(path)
114 if scm:
113
114 try:
115 scm = get_scm(path)
116 except:
117 pass
118 else:
115 119 raise Exception('The given path %s should not be a repository got %s',
116 120 path, scm)
117 121
@@ -33,6 +33,8 b' from sqlalchemy.orm import joinedload'
33 33 from vcs.exceptions import RepositoryError, VCSError
34 34 import logging
35 35 import sys
36 import time
37
36 38 log = logging.getLogger(__name__)
37 39
38 40 try:
@@ -155,7 +157,7 b' class HgModel(object):'
155 157 tmp_d['description'] = repo.description
156 158 tmp_d['description_sort'] = tmp_d['description']
157 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 161 tmp_d['tip'] = tip.short_id
160 162 tmp_d['tip_sort'] = tip.revision
161 163 tmp_d['rev'] = tip.revision
@@ -8,7 +8,7 b''
8 8 </tr>
9 9 %for cnt,branch in enumerate(c.repo_branches.items()):
10 10 <tr class="parity${cnt%2}">
11 <td>${h.age(branch[1]._ctx.date())}</td>
11 <td>${h.age(branch[1].date)}</td>
12 12 <td>r${branch[1].revision}:${branch[1].short_id}</td>
13 13 <td>
14 14 <span class="logtags">
@@ -1,6 +1,6 b''
1 # HG changeset patch
1 # c.scm_type changeset patch
2 2 # User ${c.changeset.author|n}
3 # Date ${"%d %d" % c.changeset._ctx.date()}
3 # Date ${"%d %d" % c.changeset.date}
4 4 # Node ID ${c.changeset.raw_id}
5 5 # ${c.parent_tmpl}
6 6 ${c.changeset.message}
@@ -30,7 +30,7 b''
30 30 </tr>
31 31 </thead>
32 32
33 % if c.files_list.parent:
33 %if c.files_list.parent:
34 34 <tr class="parity0">
35 35 <td>
36 36 ${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 b''
40 40 <td></td>
41 41 <td></td>
42 42 <td></td>
43 </tr>
43 </tr>
44 44 %endif
45 45
46 46 %for cnt,node in enumerate(c.files_list,1):
@@ -65,7 +65,7 b''
65 65 </td>
66 66 <td>
67 67 %if node.is_file():
68 ${h.age(node.last_changeset._ctx.date())} - ${node.last_changeset.date}
68 ${h.age(node.last_changeset.date)} - ${node.last_changeset.date}
69 69 %endif
70 70 </td>
71 71 <td>
@@ -45,7 +45,7 b''
45 45 <th class="left">${get_sort(_('Description'))}</th>
46 46 <th class="left">${get_sort(_('Last change'))}</th>
47 47 <th class="left">${get_sort(_('Tip'))}</th>
48 <th class="left">${get_sort(_('Contact'))}</th>
48 <th class="left">${get_sort(_('Owner'))}</th>
49 49 <th class="left">${_('RSS')}</th>
50 50 <th class="left">${_('Atom')}</th>
51 51 </tr>
@@ -8,7 +8,7 b''
8 8 </tr>
9 9 %for cnt,tag in enumerate(c.repo_tags.items()):
10 10 <tr class="parity${cnt%2}">
11 <td>${h.age(tag[1]._ctx.date())}</td>
11 <td>${h.age(tag[1].date)}</td>
12 12 <td>r${tag[1].revision}:${tag[1].short_id}</td>
13 13 <td>
14 14 <span class="logtags">
General Comments 0
You need to be logged in to leave comments. Login now