***************
*** 66,72 ****
  
      def __init__(self, db, path, log, config):
          Repository.__init__(self, path, None, log)
-         self.path = str(path)
          self.db = db
          self.__youngest_rev = 0
          self.__history = None
--- 66,72 ----
  
      def __init__(self, db, path, log, config):
          Repository.__init__(self, path, None, log)
+         self.path = path
          self.db = db
          self.__youngest_rev = 0
          self.__history = None
***************
*** 342,348 ****
  
          cursor = self.db.cursor()
          path = node.path.strip('/')
-         cursor.execute("SELECT rev, path, change_type, base_path, base_rev "
                         "  FROM node_change "
                         "WHERE ((LENGTH(rev)<LENGTH(%s)) OR "
                         "       (LENGTH(rev)=LENGTH(%s) AND rev<=%s)) "
--- 342,348 ----
  
          cursor = self.db.cursor()
          path = node.path.strip('/')
+         cursor.execute("SELECT rev, path, change_type, base_path "
                         "  FROM node_change "
                         "WHERE ((LENGTH(rev)<LENGTH(%s)) OR "
                         "       (LENGTH(rev)=LENGTH(%s) AND rev<=%s)) "
***************
*** 355,370 ****
  
          done = {}
          for entry in cursor:
-             rev, subtreepath, change, oldpath, oldrev = entry
-             if oldpath:
-                 # This is a move/copy: it may be either a new item
-                 # (something copied/moved to the directory we are
-                 # listing) or a desaparecidos (something that was
-                 # there and moved away).
-                 if oldpath.startswith(path):
-                     subpath = oldpath[len(path):].lstrip('/')
-                 else:
-                     subpath = subtreepath[len(path):].lstrip('/')
              elif subtreepath.startswith(path):
                  subpath = subtreepath[len(path):].lstrip('/')
              else:
--- 355,363 ----
  
          done = {}
          for entry in cursor:
+             rev, subtreepath, change, oldpath = entry
+             if oldpath and oldpath.startswith(path):
+                 subpath = oldpath[len(path):].lstrip('/')
              elif subtreepath.startswith(path):
                  subpath = subtreepath[len(path):].lstrip('/')
              else:
***************
*** 381,393 ****
                  child, rest = subpath, None
  
              if not child or child in done:
-                 if oldpath and not oldpath.startswith(path):
-                     # Ok, it's something new: recursively list its
-                     # children, adjusting their paths
-                     oldnode = self.get_node(oldpath, oldrev)
-                     for newnode in self._getNodeEntries(oldnode):
-                         newnode.path = subtreepath + newnode.path[len(oldpath):]
-                         yield newnode
                  continue
  
              done[child] = True
--- 374,379 ----
                  child, rest = subpath, None
  
              if not child or child in done:
                  continue
  
              done[child] = True
