changeset 679:d85b0948e539 rhodecode-0.0.1.0.2

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
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 11 Nov 2010 15:03:40 +0100
parents 6f796f56a64c
children 7358dfd7c14f
files MANIFEST.in docs/changelog.rst rhodecode/__init__.py rhodecode/lib/celerylib/__init__.py rhodecode/lib/hooks.py rhodecode/lib/utils.py rhodecode/tests/__init__.py setup.py
diffstat 8 files changed, 47 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/MANIFEST.in	Wed Nov 10 19:25:44 2010 +0100
+++ b/MANIFEST.in	Thu Nov 11 15:03:40 2010 +0100
@@ -10,5 +10,6 @@
 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 *
--- a/docs/changelog.rst	Wed Nov 10 19:25:44 2010 +0100
+++ b/docs/changelog.rst	Thu Nov 11 15:03:40 2010 +0100
@@ -3,6 +3,14 @@
 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**)
 ----------------------
--- a/rhodecode/__init__.py	Wed Nov 10 19:25:44 2010 +0100
+++ b/rhodecode/__init__.py	Thu Nov 11 15:03:40 2010 +0100
@@ -24,7 +24,7 @@
 @author: marcink
 """
 
-VERSION = (1, 0, 1,)
+VERSION = (1, 0, 2,)
 
 __version__ = '.'.join((str(each) for each in VERSION[:4]))
 
--- a/rhodecode/lib/celerylib/__init__.py	Wed Nov 10 19:25:44 2010 +0100
+++ b/rhodecode/lib/celerylib/__init__.py	Thu Nov 11 15:03:40 2010 +0100
@@ -12,7 +12,7 @@
 class ResultWrapper(object):
     def __init__(self, task):
         self.task = task
-        
+
     @LazyProperty
     def result(self):
         return self.task
@@ -23,15 +23,22 @@
         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))
 
 
@@ -39,7 +46,7 @@
     def __wrapper(func, *fargs, **fkwargs):
         params = list(fargs)
         params.extend(['%s-%s' % ar for ar in fkwargs.items()])
-            
+
         lockkey = 'task_%s' % \
             md5(str(func.__name__) + '-' + \
                 '-'.join(map(str, params))).hexdigest()
@@ -51,14 +58,14 @@
             return ret
         except LockHeld:
             log.info('LockHeld')
-            return 'Task with key %s already running' % lockkey   
+            return 'Task with key %s already running' % lockkey
 
-    return decorator(__wrapper, func)      
-            
+    return decorator(__wrapper, func)
+
+
 
-        
-        
-    
-    
-    
-  
+
+
+
+
+
--- a/rhodecode/lib/hooks.py	Wed Nov 10 19:25:44 2010 +0100
+++ b/rhodecode/lib/hooks.py	Thu Nov 11 15:03:40 2010 +0100
@@ -37,11 +37,17 @@
     for path, dirs, files in os.walk(repo.root):
         if path.find('.hg') != -1:
             for f in files:
-                size_hg += os.path.getsize(os.path.join(path, f))
+                try:
+                    size_hg += os.path.getsize(os.path.join(path, f))
+                except OSError:
+                    pass
         else:
             for f in files:
-                size_root += os.path.getsize(os.path.join(path, f))
-                
+                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)
--- a/rhodecode/lib/utils.py	Wed Nov 10 19:25:44 2010 +0100
+++ b/rhodecode/lib/utils.py	Thu Nov 11 15:03:40 2010 +0100
@@ -465,7 +465,7 @@
     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
@@ -505,6 +505,9 @@
     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"))
--- a/rhodecode/tests/__init__.py	Wed Nov 10 19:25:44 2010 +0100
+++ b/rhodecode/tests/__init__.py	Thu Nov 11 15:03:40 2010 +0100
@@ -34,6 +34,7 @@
 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):
 
--- a/setup.py	Wed Nov 10 19:25:44 2010 +0100
+++ b/setup.py	Thu Nov 11 15:03:40 2010 +0100
@@ -4,13 +4,13 @@
 
 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",
     ]