Show More
@@ -3,15 +3,14 b' RhodeCode (RhodiumCode)' | |||||
3 | ======================= |
|
3 | ======================= | |
4 |
|
4 | |||
5 | ``RhodeCode`` (formerly hg-app) is Pylons based repository management and |
|
5 | ``RhodeCode`` (formerly hg-app) is Pylons based repository management and | |
6 |
serving for mercurial_. It's similar to github or bitbucket, but |
|
6 | serving for mercurial_ and git_. It's similar to github or bitbucket, but | |
7 |
as standalone app, it's open source and focuses more on |
|
7 | it's suppose to run as standalone app, it's open source and focuses more on | |
8 | There's no default free access to RhodeCode You have to create an account in order |
|
8 | restricted access to repositories. There's no default free access to RhodeCode | |
9 | to use the application. It's powered by vcs_ library that we created to handle |
|
9 | You have to create an account in order to use the application. It's powered | |
10 | many various version control systems. |
|
10 | by vcs_ library that we created to handle many various version control systems. | |
11 |
|
11 | |||
12 | RhodeCode uses `Semantic Versioning <http://semver.org/>`_ |
|
12 | RhodeCode uses `Semantic Versioning <http://semver.org/>`_ | |
13 |
|
13 | |||
14 |
|
||||
15 | RhodeCode demo |
|
14 | RhodeCode demo | |
16 | -------------- |
|
15 | -------------- | |
17 |
|
16 |
@@ -23,9 +23,10 b' summary controller for pylons' | |||||
23 | @author: marcink |
|
23 | @author: marcink | |
24 | """ |
|
24 | """ | |
25 | from pylons import tmpl_context as c, request, url |
|
25 | from pylons import tmpl_context as c, request, url | |
|
26 | from vcs.exceptions import ChangesetError | |||
26 | from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator |
|
27 | from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator | |
27 | from rhodecode.lib.base import BaseController, render |
|
28 | from rhodecode.lib.base import BaseController, render | |
28 | from rhodecode.lib.utils import OrderedDict |
|
29 | from rhodecode.lib.utils import OrderedDict, EmptyChangeset | |
29 | from rhodecode.model.hg import HgModel |
|
30 | from rhodecode.model.hg import HgModel | |
30 | from rhodecode.model.db import Statistics |
|
31 | from rhodecode.model.db import Statistics | |
31 | from webhelpers.paginate import Page |
|
32 | from webhelpers.paginate import Page | |
@@ -70,11 +71,17 b' class SummaryController(BaseController):' | |||||
70 | c.clone_repo_url = uri |
|
71 | c.clone_repo_url = uri | |
71 | c.repo_tags = OrderedDict() |
|
72 | c.repo_tags = OrderedDict() | |
72 | for name, hash in c.repo_info.tags.items()[:10]: |
|
73 | for name, hash in c.repo_info.tags.items()[:10]: | |
73 | c.repo_tags[name] = c.repo_info.get_changeset(hash) |
|
74 | try: | |
|
75 | c.repo_tags[name] = c.repo_info.get_changeset(hash) | |||
|
76 | except ChangesetError: | |||
|
77 | c.repo_tags[name] = EmptyChangeset(hash) | |||
74 |
|
78 | |||
75 | c.repo_branches = OrderedDict() |
|
79 | c.repo_branches = OrderedDict() | |
76 | for name, hash in c.repo_info.branches.items()[:10]: |
|
80 | for name, hash in c.repo_info.branches.items()[:10]: | |
77 | c.repo_branches[name] = c.repo_info.get_changeset(hash) |
|
81 | try: | |
|
82 | c.repo_branches[name] = c.repo_info.get_changeset(hash) | |||
|
83 | except ChangesetError: | |||
|
84 | c.repo_branches[name] = EmptyChangeset(hash) | |||
78 |
|
85 | |||
79 | td = datetime.today() + timedelta(days=1) |
|
86 | td = datetime.today() + timedelta(days=1) | |
80 | y, m, d = td.year, td.month, td.day |
|
87 | y, m, d = td.year, td.month, td.day |
@@ -328,8 +328,11 b' from mercurial.templatefilters import pe' | |||||
328 |
|
328 | |||
329 | def _age(curdate): |
|
329 | def _age(curdate): | |
330 | """turns a datetime into an age string.""" |
|
330 | """turns a datetime into an age string.""" | |
|
331 | if not curdate: | |||
|
332 | return '' | |||
331 |
|
333 | |||
332 | from datetime import timedelta, datetime |
|
334 | from datetime import timedelta, datetime | |
|
335 | ||||
333 | agescales = [("year", 3600 * 24 * 365), |
|
336 | agescales = [("year", 3600 * 24 * 365), | |
334 | ("month", 3600 * 24 * 30), |
|
337 | ("month", 3600 * 24 * 30), | |
335 | #("week", 3600 * 24 * 7), |
|
338 | #("week", 3600 * 24 * 7), |
@@ -151,7 +151,7 b' class SimpleGit(object):' | |||||
151 | return HTTPNotFound()(environ, start_response) |
|
151 | return HTTPNotFound()(environ, start_response) | |
152 | try: |
|
152 | try: | |
153 | app = self.__make_app() |
|
153 | app = self.__make_app() | |
154 |
except |
|
154 | except: | |
155 | log.error(traceback.format_exc()) |
|
155 | log.error(traceback.format_exc()) | |
156 | return HTTPInternalServerError()(environ, start_response) |
|
156 | return HTTPInternalServerError()(environ, start_response) | |
157 |
|
157 |
@@ -296,13 +296,16 b' def invalidate_cache(name, *args):' | |||||
296 |
|
296 | |||
297 | class EmptyChangeset(BaseChangeset): |
|
297 | class EmptyChangeset(BaseChangeset): | |
298 | """ |
|
298 | """ | |
299 | An dummy empty changeset. |
|
299 | An dummy empty changeset. It's possible to pass hash when creating | |
|
300 | an EmptyChangeset | |||
300 | """ |
|
301 | """ | |
301 |
|
302 | |||
302 | revision = -1 |
|
303 | def __init__(self, cs='0' * 40): | |
303 | message = '' |
|
304 | self._empty_cs = cs | |
304 | author = '' |
|
305 | self.revision = -1 | |
305 | date = '' |
|
306 | self.message = '' | |
|
307 | self.author = '' | |||
|
308 | self.date = '' | |||
306 |
|
309 | |||
307 | @LazyProperty |
|
310 | @LazyProperty | |
308 | def raw_id(self): |
|
311 | def raw_id(self): | |
@@ -310,7 +313,7 b' class EmptyChangeset(BaseChangeset):' | |||||
310 | Returns raw string identifying this changeset, useful for web |
|
313 | Returns raw string identifying this changeset, useful for web | |
311 | representation. |
|
314 | representation. | |
312 | """ |
|
315 | """ | |
313 | return '0' * 40 |
|
316 | return self._empty_cs | |
314 |
|
317 | |||
315 | @LazyProperty |
|
318 | @LazyProperty | |
316 | def short_id(self): |
|
319 | def short_id(self): |
@@ -6,11 +6,11 b' requirements = [' | |||||
6 | "Pylons>=1.0.0", |
|
6 | "Pylons>=1.0.0", | |
7 | "SQLAlchemy>=0.6.4", |
|
7 | "SQLAlchemy>=0.6.4", | |
8 | "Mako>=0.3.5", |
|
8 | "Mako>=0.3.5", | |
9 |
"vcs |
|
9 | "vcs>=0.1.10", | |
10 | "pygments>=1.3.0", |
|
10 | "pygments>=1.3.0", | |
11 | "mercurial==1.6.4", |
|
11 | "mercurial==1.6.4", | |
12 |
"whoosh |
|
12 | "whoosh>=1.2.5", | |
13 |
"celery |
|
13 | "celery>=2.1.2", | |
14 | "py-bcrypt", |
|
14 | "py-bcrypt", | |
15 | "babel", |
|
15 | "babel", | |
16 | ] |
|
16 | ] |
General Comments 0
You need to be logged in to leave comments.
Login now