##// END OF EJS Templates
fixed hooks broken symlink issue...
marcink -
r679:d85b0948 rhodecode-0.0.1.0.2 default
parent child Browse files
Show More
@@ -10,5 +10,6 b' recursive-include rhodecode/public/image'
10 include rhodecode/public/js/yui2.js
10 include rhodecode/public/js/yui2.js
11 include rhodecode/public/js/excanvas.min.js
11 include rhodecode/public/js/excanvas.min.js
12 include rhodecode/public/js/yui.flot.js
12 include rhodecode/public/js/yui.flot.js
13 include rhodecode/public/js/graph.js
13 #templates
14 #templates
14 recursive-include rhodecode/templates *
15 recursive-include rhodecode/templates *
@@ -3,6 +3,14 b''
3 Changelog
3 Changelog
4 =========
4 =========
5
5
6 1.0.2 (**2010-11-XX**)
7 ----------------------
8
9 - fixed #59 missing graph.js
10 - fixed repo_size crash when repository had broken symlinks
11 - fixed python2.5 crashes.
12 - tested under python2.7
13 - bumped sqlalcehmy and celery versions
6
14
7 1.0.1 (**2010-11-10**)
15 1.0.1 (**2010-11-10**)
8 ----------------------
16 ----------------------
@@ -24,7 +24,7 b' versioning implementation: http://semver'
24 @author: marcink
24 @author: marcink
25 """
25 """
26
26
27 VERSION = (1, 0, 1,)
27 VERSION = (1, 0, 2,)
28
28
29 __version__ = '.'.join((str(each) for each in VERSION[:4]))
29 __version__ = '.'.join((str(each) for each in VERSION[:4]))
30
30
@@ -12,7 +12,7 b' log = logging.getLogger(__name__)'
12 class ResultWrapper(object):
12 class ResultWrapper(object):
13 def __init__(self, task):
13 def __init__(self, task):
14 self.task = task
14 self.task = task
15
15
16 @LazyProperty
16 @LazyProperty
17 def result(self):
17 def result(self):
18 return self.task
18 return self.task
@@ -23,15 +23,22 b' def run_task(task, *args, **kwargs):'
23 log.info('running task %s', t.task_id)
23 log.info('running task %s', t.task_id)
24 return t
24 return t
25 except socket.error, e:
25 except socket.error, e:
26 if e.errno == 111:
26
27 try:
28 conn_failed = e.errno == 111
29 except AttributeError:
30 conn_failed = False
31
32 if conn_failed:
27 log.debug('Unable to connect to celeryd. Sync execution')
33 log.debug('Unable to connect to celeryd. Sync execution')
28 else:
34 else:
29 log.error(traceback.format_exc())
35 log.debug('Unable to connect to celeryd. Sync execution')
36
30 except KeyError, e:
37 except KeyError, e:
31 log.debug('Unable to connect to celeryd. Sync execution')
38 log.debug('Unable to connect to celeryd. Sync execution')
32 except Exception, e:
39 except Exception, e:
33 log.error(traceback.format_exc())
40 log.error(traceback.format_exc())
34
41
35 return ResultWrapper(task(*args, **kwargs))
42 return ResultWrapper(task(*args, **kwargs))
36
43
37
44
@@ -39,7 +46,7 b' def locked_task(func):'
39 def __wrapper(func, *fargs, **fkwargs):
46 def __wrapper(func, *fargs, **fkwargs):
40 params = list(fargs)
47 params = list(fargs)
41 params.extend(['%s-%s' % ar for ar in fkwargs.items()])
48 params.extend(['%s-%s' % ar for ar in fkwargs.items()])
42
49
43 lockkey = 'task_%s' % \
50 lockkey = 'task_%s' % \
44 md5(str(func.__name__) + '-' + \
51 md5(str(func.__name__) + '-' + \
45 '-'.join(map(str, params))).hexdigest()
52 '-'.join(map(str, params))).hexdigest()
@@ -51,14 +58,14 b' def locked_task(func):'
51 return ret
58 return ret
52 except LockHeld:
59 except LockHeld:
53 log.info('LockHeld')
60 log.info('LockHeld')
54 return 'Task with key %s already running' % lockkey
61 return 'Task with key %s already running' % lockkey
55
62
56 return decorator(__wrapper, func)
63 return decorator(__wrapper, func)
57
64
65
58
66
59
67
60
68
61
69
62
70
63
71
64
@@ -37,11 +37,17 b' def repo_size(ui, repo, hooktype=None, *'
37 for path, dirs, files in os.walk(repo.root):
37 for path, dirs, files in os.walk(repo.root):
38 if path.find('.hg') != -1:
38 if path.find('.hg') != -1:
39 for f in files:
39 for f in files:
40 size_hg += os.path.getsize(os.path.join(path, f))
40 try:
41 size_hg += os.path.getsize(os.path.join(path, f))
42 except OSError:
43 pass
41 else:
44 else:
42 for f in files:
45 for f in files:
43 size_root += os.path.getsize(os.path.join(path, f))
46 try:
44
47 size_root += os.path.getsize(os.path.join(path, f))
48 except OSError:
49 pass
50
45 size_hg_f = h.format_byte_size(size_hg)
51 size_hg_f = h.format_byte_size(size_hg)
46 size_root_f = h.format_byte_size(size_root)
52 size_root_f = h.format_byte_size(size_root)
47 size_total_f = h.format_byte_size(size_root + size_hg)
53 size_total_f = h.format_byte_size(size_root + size_hg)
@@ -465,7 +465,7 b' def create_test_env(repos_test_path, con'
465 import tarfile
465 import tarfile
466 import shutil
466 import shutil
467 from os.path import dirname as dn, join as jn, abspath
467 from os.path import dirname as dn, join as jn, abspath
468 from rhodecode.tests import REPO_PATH, NEW_REPO_PATH
468 from rhodecode.tests import REPO_PATH, NEW_REPO_PATH, FORK_REPO_PATH
469
469
470 log = logging.getLogger('TestEnvCreator')
470 log = logging.getLogger('TestEnvCreator')
471 # create logger
471 # create logger
@@ -505,6 +505,9 b' def create_test_env(repos_test_path, con'
505 if os.path.isdir(NEW_REPO_PATH):
505 if os.path.isdir(NEW_REPO_PATH):
506 log.debug('REMOVING %s', NEW_REPO_PATH)
506 log.debug('REMOVING %s', NEW_REPO_PATH)
507 shutil.rmtree(NEW_REPO_PATH)
507 shutil.rmtree(NEW_REPO_PATH)
508 if os.path.isdir(FORK_REPO_PATH):
509 log.debug('REMOVING %s', FORK_REPO_PATH)
510 shutil.rmtree(FORK_REPO_PATH)
508
511
509 cur_dir = dn(dn(abspath(__file__)))
512 cur_dir = dn(dn(abspath(__file__)))
510 tar = tarfile.open(jn(cur_dir, 'tests', "vcs_test.tar.gz"))
513 tar = tarfile.open(jn(cur_dir, 'tests', "vcs_test.tar.gz"))
@@ -34,6 +34,7 b' environ = {}'
34 TEST_DIR = '/tmp'
34 TEST_DIR = '/tmp'
35 REPO_PATH = os.path.join(TEST_DIR, 'vcs_test')
35 REPO_PATH = os.path.join(TEST_DIR, 'vcs_test')
36 NEW_REPO_PATH = os.path.join(TEST_DIR, 'vcs_test_new')
36 NEW_REPO_PATH = os.path.join(TEST_DIR, 'vcs_test_new')
37 FORK_REPO_PATH = os.path.join(TEST_DIR, 'vcs_test_fork')
37
38
38 class TestController(TestCase):
39 class TestController(TestCase):
39
40
@@ -4,13 +4,13 b' py_version = sys.version_info'
4
4
5 requirements = [
5 requirements = [
6 "Pylons>=1.0.0",
6 "Pylons>=1.0.0",
7 "SQLAlchemy==0.6.4",
7 "SQLAlchemy==0.6.5",
8 "Mako>=0.3.2",
8 "Mako>=0.3.2",
9 "vcs==0.1.8",
9 "vcs==0.1.8",
10 "pygments>=1.3.0",
10 "pygments>=1.3.0",
11 "mercurial==1.6.4",
11 "mercurial==1.6.4",
12 "whoosh==1.2.5",
12 "whoosh==1.2.5",
13 "celery==2.1.2",
13 "celery==2.1.3",
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