Changeset - 9dc1d92d82ed
[Not reviewed]
beta
0 6 0
Marcin Kuzminski - 15 years ago 2010-11-02 22:26:50
marcin@python-works.com
updated setup for all newest versions
EmptyChangeset can take changeset as creation param.
6 files changed with 31 insertions and 19 deletions:
0 comments (0 inline, 0 general)
README.rst
Show inline comments
 
@@ -3,15 +3,14 @@ RhodeCode (RhodiumCode)
 
=======================
 

	
 
``RhodeCode`` (formerly hg-app) is Pylons based repository management and 
 
serving for mercurial_. It's similar to github or bitbucket, but it's suppose to run
 
as standalone app, it's open source and focuses more on restricted access to repositories
 
There's no default free access to RhodeCode You have to create an account in order
 
to use the application. It's powered by vcs_ library that we created to handle
 
many various version control systems.
 
serving for mercurial_ and git_. It's similar to github or bitbucket, but 
 
it's suppose to run as standalone app, it's open source and focuses more on 
 
restricted access to repositories. There's no default free access to RhodeCode 
 
You have to create an account in order to use the application. It's powered 
 
by vcs_ library that we created to handle many various version control systems.
 

	
 
RhodeCode uses `Semantic Versioning <http://semver.org/>`_
 

	
 

	
 
RhodeCode demo
 
--------------
 

	
rhodecode/controllers/summary.py
Show inline comments
 
@@ -23,9 +23,10 @@ summary controller for pylons
 
@author: marcink
 
"""
 
from pylons import tmpl_context as c, request, url
 
from vcs.exceptions import ChangesetError
 
from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
 
from rhodecode.lib.base import BaseController, render
 
from rhodecode.lib.utils import OrderedDict
 
from rhodecode.lib.utils import OrderedDict, EmptyChangeset
 
from rhodecode.model.hg import HgModel
 
from rhodecode.model.db import Statistics
 
from webhelpers.paginate import Page
 
@@ -70,11 +71,17 @@ class SummaryController(BaseController):
 
        c.clone_repo_url = uri
 
        c.repo_tags = OrderedDict()
 
        for name, hash in c.repo_info.tags.items()[:10]:
 
            c.repo_tags[name] = c.repo_info.get_changeset(hash)
 
            try:
 
                c.repo_tags[name] = c.repo_info.get_changeset(hash)
 
            except ChangesetError:
 
                c.repo_tags[name] = EmptyChangeset(hash)
 

	
 
        c.repo_branches = OrderedDict()
 
        for name, hash in c.repo_info.branches.items()[:10]:
 
            c.repo_branches[name] = c.repo_info.get_changeset(hash)
 
            try:
 
                c.repo_branches[name] = c.repo_info.get_changeset(hash)
 
            except ChangesetError:
 
                c.repo_branches[name] = EmptyChangeset(hash)
 

	
 
        td = datetime.today() + timedelta(days=1)
 
        y, m, d = td.year, td.month, td.day
rhodecode/lib/helpers.py
Show inline comments
 
@@ -328,8 +328,11 @@ from mercurial.templatefilters import pe
 

	
 
def _age(curdate):
 
    """turns a datetime into an age string."""
 
    if not curdate:
 
        return ''
 

	
 
    from datetime import timedelta, datetime
 

	
 
    agescales = [("year", 3600 * 24 * 365),
 
             ("month", 3600 * 24 * 30),
 
             #("week", 3600 * 24 * 7),
rhodecode/lib/middleware/simplegit.py
Show inline comments
 
@@ -151,7 +151,7 @@ class SimpleGit(object):
 
            return HTTPNotFound()(environ, start_response)
 
        try:
 
            app = self.__make_app()
 
        except Exception:
 
        except:
 
            log.error(traceback.format_exc())
 
            return HTTPInternalServerError()(environ, start_response)
 

	
rhodecode/lib/utils.py
Show inline comments
 
@@ -296,13 +296,16 @@ def invalidate_cache(name, *args):
 

	
 
class EmptyChangeset(BaseChangeset):
 
    """
 
    An dummy empty changeset.
 
    An dummy empty changeset. It's possible to pass hash when creating
 
    an EmptyChangeset
 
    """
 

	
 
    revision = -1
 
    message = ''
 
    author = ''
 
    date = ''
 
    def __init__(self, cs='0' * 40):
 
        self._empty_cs = cs
 
        self.revision = -1
 
        self.message = ''
 
        self.author = ''
 
        self.date = ''
 

	
 
    @LazyProperty
 
    def raw_id(self):
 
@@ -310,7 +313,7 @@ class EmptyChangeset(BaseChangeset):
 
        Returns raw string identifying this changeset, useful for web
 
        representation.
 
        """
 
        return '0' * 40
 
        return self._empty_cs
 

	
 
    @LazyProperty
 
    def short_id(self):
setup.py
Show inline comments
 
@@ -6,11 +6,11 @@ requirements = [
 
        "Pylons>=1.0.0",
 
        "SQLAlchemy>=0.6.4",
 
        "Mako>=0.3.5",
 
        "vcs==0.1.10",
 
        "vcs>=0.1.10",
 
        "pygments>=1.3.0",
 
        "mercurial==1.6.4",
 
        "whoosh==1.1.1",
 
        "celery==2.1.1",
 
        "whoosh>=1.2.5",
 
        "celery>=2.1.2",
 
        "py-bcrypt",
 
        "babel",
 
    ]
0 comments (0 inline, 0 general)