Changeset - 59670f091c76
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 15 years ago 2010-11-11 01:33:26
marcin@python-works.com
bugfix, repo_size crashed when broken symlinks where inside a repository.
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/hooks.py
Show inline comments
 
@@ -37,10 +37,16 @@ def repo_size(ui, repo, hooktype=None, *
 
    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)
0 comments (0 inline, 0 general)