changeset 885:94f7585af8a1 beta

fixes to #92, updated changelog
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 28 Dec 2010 18:44:32 +0100
parents 322b53be49cc
children 0736230c7d91
files docs/changelog.rst rhodecode/lib/indexers/daemon.py
diffstat 2 files changed, 28 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/docs/changelog.rst	Tue Dec 28 18:17:04 2010 +0100
+++ b/docs/changelog.rst	Tue Dec 28 18:44:32 2010 +0100
@@ -13,10 +13,14 @@
 ++++
 
 - implemented #91 added nicer looking archive urls
+- implemented #44 into file browsing, and added follow branch option
 
 fixes
 ++++
 
+- fixed file browser bug, when switching into given form revision the url was 
+  not changing
+- fixed #92
 
 1.1.0 (**2010-12-18**)
 ----------------------
--- a/rhodecode/lib/indexers/daemon.py	Tue Dec 28 18:17:04 2010 +0100
+++ b/rhodecode/lib/indexers/daemon.py	Tue Dec 28 18:44:32 2010 +0100
@@ -1,8 +1,15 @@
-#!/usr/bin/env python
-# encoding: utf-8
-# whoosh indexer daemon for rhodecode
-# Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
-#
+# -*- coding: utf-8 -*-
+"""
+    rhodecode.lib.indexers.daemon
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    A deamon will read from task table and run tasks
+    
+    :created_on: Jan 26, 2010
+    :author: marcink
+    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>    
+    :license: GPLv3, see COPYING for more details.
+"""
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; version 2
@@ -17,14 +24,10 @@
 # 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 Jan 26, 2010
 
-@author: marcink
-A deamon will read from task table and run tasks
-"""
 import sys
 import os
+import traceback
 from os.path import dirname as dn
 from os.path import join as jn
 
@@ -99,7 +102,8 @@
                     for f in files:
                         index_paths_.add(jn(repo.path, f.path))
 
-        except RepositoryError:
+        except RepositoryError, e:
+            log.debug(traceback.format_exc())
             pass
         return index_paths_
 
@@ -118,8 +122,15 @@
 
         #we just index the content of chosen files
         if node.extension in INDEX_EXTENSIONS:
-            log.debug('    >> %s [WITH CONTENT]' % path)
+
             u_content = node.content
+            if not isinstance(u_content, unicode):
+                log.warning('  >> %s Could not get this content as unicode '
+                          'replacing with empty content', path)
+                u_content = u''
+            else:
+                log.debug('    >> %s [WITH CONTENT]' % path)
+
         else:
             log.debug('    >> %s' % path)
             #just index file name without it's content
@@ -143,7 +154,7 @@
 
         idx = create_in(self.index_location, SCHEMA, indexname=IDX_NAME)
         writer = idx.writer()
-
+        print self.repo_paths.values()
         for cnt, repo in enumerate(self.repo_paths.values()):
             log.debug('building index @ %s' % repo.path)