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