Changeset - d85b0948e539
[Not reviewed]
Marcin Kuzminski - 15 years ago 2010-11-11 15:03:40
marcin@python-works.com
fixed hooks broken symlink issue
fixed python2.5 crash.
fixed #58 missing graph.js bug
Fixed tests to remove the forked repository when building enviroment
version bump
8 files changed with 32 insertions and 6 deletions:
0 comments (0 inline, 0 general)
MANIFEST.in
Show inline comments
 
include rhodecode/config/deployment.ini_tmpl
 

	
 
include README.rst
 
recursive-include rhodecode/i18n/ *
 

	
 
#images
 
recursive-include rhodecode/public/css *
 
recursive-include rhodecode/public/images *
 
#js
 
include rhodecode/public/js/yui2.js
 
include rhodecode/public/js/excanvas.min.js
 
include rhodecode/public/js/yui.flot.js
 
include rhodecode/public/js/graph.js
 
#templates
 
recursive-include rhodecode/templates *
docs/changelog.rst
Show inline comments
 
.. _changelog:
 

	
 
Changelog
 
=========
 

	
 
1.0.2 (**2010-11-XX**)
 
----------------------
 

	
 
- fixed #59 missing graph.js
 
- fixed repo_size crash when repository had broken symlinks
 
- fixed python2.5 crashes.
 
- tested under python2.7
 
- bumped sqlalcehmy and celery versions
 

	
 
1.0.1 (**2010-11-10**)
 
----------------------
 

	
 
- fixed #53 python2.5 incompatible enumerate calls
 
- fixed #52 disable mercurial extension for web
 
- fixed #51 deleting repositories don't delete it's dependent objects
 
- small css updated
 

	
 

	
 
1.0.0 (**2010-11-02**)
 
----------------------
rhodecode/__init__.py
Show inline comments
 
@@ -15,21 +15,21 @@
 
# 
 
# You should have received a copy of the GNU General Public License
 
# 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 9, 2010
 
RhodeCode, a web based repository management based on pylons
 
versioning implementation: http://semver.org/
 
@author: marcink
 
"""
 

	
 
VERSION = (1, 0, 1,)
 
VERSION = (1, 0, 2,)
 

	
 
__version__ = '.'.join((str(each) for each in VERSION[:4]))
 

	
 
def get_version():
 
    """
 
    Returns shorter version (digit parts only) as string.
 
    """
 
    return '.'.join((str(each) for each in VERSION[:3]))
rhodecode/lib/celerylib/__init__.py
Show inline comments
 
@@ -14,28 +14,35 @@ class ResultWrapper(object):
 
        self.task = task
 
        
 
    @LazyProperty
 
    def result(self):
 
        return self.task
 

	
 
def run_task(task, *args, **kwargs):
 
    try:
 
        t = task.delay(*args, **kwargs)
 
        log.info('running task %s', t.task_id)
 
        return t
 
    except socket.error, e:
 
        if  e.errno == 111:
 

	
 
        try:
 
            conn_failed = e.errno == 111
 
        except AttributeError:
 
            conn_failed = False
 

	
 
        if  conn_failed:
 
            log.debug('Unable to connect to celeryd. Sync execution')
 
        else:
 
            log.error(traceback.format_exc())    
 
            log.debug('Unable to connect to celeryd. Sync execution')
 

	
 
    except KeyError, e:
 
            log.debug('Unable to connect to celeryd. Sync execution')
 
    except Exception, e:
 
        log.error(traceback.format_exc())
 
    
 
    return ResultWrapper(task(*args, **kwargs))
 

	
 

	
 
def locked_task(func):
 
    def __wrapper(func, *fargs, **fkwargs):
 
        params = list(fargs)
 
        params.extend(['%s-%s' % ar for ar in fkwargs.items()])
rhodecode/lib/hooks.py
Show inline comments
 
@@ -28,28 +28,34 @@ import os
 
from rhodecode.lib import helpers as h
 
from rhodecode.model import meta
 
from rhodecode.model.db import UserLog, User
 

	
 
def repo_size(ui, repo, hooktype=None, **kwargs):
 

	
 
    if hooktype != 'changegroup':
 
        return False
 
    size_hg, size_root = 0, 0
 
    for path, dirs, files in os.walk(repo.root):
 
        if path.find('.hg') != -1:
 
            for f in files:
 
                try:
 
                size_hg += os.path.getsize(os.path.join(path, f))
 
                except OSError:
 
                    pass
 
        else:
 
            for f in files:
 
                try:
 
                size_root += os.path.getsize(os.path.join(path, f))
 
                except OSError:
 
                    pass
 
                
 
    size_hg_f = h.format_byte_size(size_hg)
 
    size_root_f = h.format_byte_size(size_root)
 
    size_total_f = h.format_byte_size(size_root + size_hg)
 
    sys.stdout.write('Repository size .hg:%s repo:%s total:%s\n' \
 
                     % (size_hg_f, size_root_f, size_total_f))
 
    
 
    user_action_mapper(ui, repo, hooktype, **kwargs)
 

	
 
def user_action_mapper(ui, repo, hooktype=None, **kwargs):
 
    """
 
    Maps user last push action to new changeset id, from mercurial
rhodecode/lib/utils.py
Show inline comments
 
@@ -456,25 +456,25 @@ def create_test_index(repo_location, ful
 
        l.release()
 
    except LockHeld:
 
        pass
 

	
 
def create_test_env(repos_test_path, config):
 
    """Makes a fresh database and 
 
    install test repository into tmp dir
 
    """
 
    from rhodecode.lib.db_manage import DbManage
 
    import tarfile
 
    import shutil
 
    from os.path import dirname as dn, join as jn, abspath
 
    from rhodecode.tests import REPO_PATH, NEW_REPO_PATH
 
    from rhodecode.tests import REPO_PATH, NEW_REPO_PATH, FORK_REPO_PATH
 

	
 
    log = logging.getLogger('TestEnvCreator')
 
    # create logger
 
    log.setLevel(logging.DEBUG)
 
    log.propagate = True
 
    # create console handler and set level to debug
 
    ch = logging.StreamHandler()
 
    ch.setLevel(logging.DEBUG)
 

	
 
    # create formatter
 
    formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
 

	
 
@@ -496,17 +496,20 @@ def create_test_env(repos_test_path, con
 
    dbmanage.admin_prompt()
 
    dbmanage.create_permissions()
 
    dbmanage.populate_default_permissions()
 

	
 
    #PART TWO make test repo
 
    log.debug('making test vcs repo')
 
    if os.path.isdir(REPO_PATH):
 
        log.debug('REMOVING %s', REPO_PATH)
 
        shutil.rmtree(REPO_PATH)
 
    if os.path.isdir(NEW_REPO_PATH):
 
        log.debug('REMOVING %s', NEW_REPO_PATH)
 
        shutil.rmtree(NEW_REPO_PATH)
 
    if os.path.isdir(FORK_REPO_PATH):
 
        log.debug('REMOVING %s', FORK_REPO_PATH)
 
        shutil.rmtree(FORK_REPO_PATH)
 

	
 
    cur_dir = dn(dn(abspath(__file__)))
 
    tar = tarfile.open(jn(cur_dir, 'tests', "vcs_test.tar.gz"))
 
    tar.extractall('/tmp')
 
    tar.close()
rhodecode/tests/__init__.py
Show inline comments
 
@@ -25,24 +25,25 @@ import pylons.test
 
__all__ = ['environ', 'url', 'TestController']
 

	
 
# Invoke websetup with the current config file
 
#SetupCommand('setup-app').run([config_file])
 

	
 
##RUNNING DESIRED TESTS
 
#nosetests rhodecode.tests.functional.test_admin_settings:TestSettingsController.test_my_account
 

	
 
environ = {}
 
TEST_DIR = '/tmp'
 
REPO_PATH = os.path.join(TEST_DIR, 'vcs_test')
 
NEW_REPO_PATH = os.path.join(TEST_DIR, 'vcs_test_new')
 
FORK_REPO_PATH = os.path.join(TEST_DIR, 'vcs_test_fork')
 

	
 
class TestController(TestCase):
 

	
 
    def __init__(self, *args, **kwargs):
 
        wsgiapp = pylons.test.pylonsapp
 
        config = wsgiapp.config
 
        self.app = TestApp(wsgiapp)
 
        url._push_object(URLGenerator(config['routes.map'], environ))
 
        self.sa = meta.Session
 

	
 
        TestCase.__init__(self, *args, **kwargs)
 

	
setup.py
Show inline comments
 
from rhodecode import get_version
 
import sys
 
py_version = sys.version_info
 

	
 
requirements = [
 
        "Pylons>=1.0.0",
 
        "SQLAlchemy==0.6.4",
 
        "SQLAlchemy==0.6.5",
 
        "Mako>=0.3.2",
 
        "vcs==0.1.8",
 
        "pygments>=1.3.0",
 
        "mercurial==1.6.4",
 
        "whoosh==1.2.5",
 
        "celery==2.1.2",
 
        "celery==2.1.3",
 
        "py-bcrypt",
 
        "babel",
 
    ]
 

	
 
classifiers = ["Development Status :: 5 - Production/Stable",
 
                   'Environment :: Web Environment',
 
                   'Framework :: Pylons',
 
                   'Intended Audience :: Developers',
 
                   'License :: OSI Approved :: BSD License',
 
                   'Operating System :: OS Independent',
 
                   'Programming Language :: Python', ]
 

	
0 comments (0 inline, 0 general)