diff --git a/meld/vc/svn.py b/meld/vc/svn.py
index 49e5ec9..0bf9bde 100644
--- a/meld/vc/svn.py
+++ b/meld/vc/svn.py
@@ -50,6 +50,13 @@ class Vc(_vc.CachedVc):
         "conflicted": _vc.STATE_CONFLICT,
     }
 
+    conflict_map = {
+        _vc.CONFLICT_BASE: '.r1',
+        _vc.CONFLICT_OTHER: '.r2',
+        _vc.CONFLICT_THIS: '.mine',
+        _vc.CONFLICT_MERGED: '',
+    }
+
     def commit_command(self, message):
         return [self.CMD,"commit","-m",message]
     def diff_command(self):
@@ -93,6 +100,12 @@ class Vc(_vc.CachedVc):
 
         return f.name
 
+    def get_path_for_conflict(self, path, conflict=None):
+        if not path.startswith(self.root + os.path.sep):
+            raise _vc.InvalidVCPath(self, path, "Path not in repository")
+        
+        return "%s%s" % (path, self.conflict_map[conflict])
+
     def _repo_version_support(self, version):
         return version < 12
 
@@ -137,13 +150,8 @@ class Vc(_vc.CachedVc):
                     item = status.attrib["item"]
                     if item == "":
                         continue
-                    rev = None
-                    if "revision" in status.attrib:
-                        rev = status.attrib["revision"]
-                    mydir, name = os.path.split(path)
-                    if mydir not in tree_state:
-                        tree_state[mydir] = {}
-                    tree_state[mydir][name] = (item, rev)
+                    tree_state[path] = self.state_map.get(
+                                                    item, _vc.STATE_NORMAL)
 
     def _lookup_tree_cache(self, rootdir):
         # Get a list of all files in rootdir, as well as their status
@@ -161,26 +169,29 @@ class Vc(_vc.CachedVc):
         if not directory in tree:
             return [], []
 
+        svnfiles = {}
         retfiles = []
         retdirs = []
 
-        dirtree = tree[directory]
-
-        for name in sorted(dirtree.keys()):
-            svn_state, rev = dirtree[name]
-            path = os.path.join(directory, name)
-
-            isdir = os.path.isdir(path)
-            if isdir:
-                if os.path.exists(path):
-                    state = _vc.STATE_NORMAL
-                else:
-                    state = _vc.STATE_MISSING
-                # svn adds the directory reported to the status list we get.
-                if name != directory:
-                    retdirs.append( _vc.Dir(path,name,state) )
+        for path, state in tree.items():
+            mydir, name = os.path.split(path)
+            if path.endswith('/'):
+                mydir, name = os.path.split(mydir)
+            if mydir != directory:
+                continue
+            if path.endswith('/'):
+                retdirs.append(_vc.Dir(path[:-1], name, state))
             else:
-                state = self.state_map.get(svn_state, _vc.STATE_NONE)
-                retfiles.append(_vc.File(path, name, state, rev))
+                retfiles.append(_vc.File(path, name, state))
+            svnfiles[name] = 1
+        for f,path in files:
+            if f not in svnfiles:
+                state = _vc.STATE_NORMAL
+                retfiles.append(_vc.File(path, f, state))
+        for d,path in dirs:
+            if d not in svnfiles:
+                state = _vc.STATE_NORMAL
+                retdirs.append( _vc.Dir(path, d, state) )
+        print retdirs, retfiles
 
         return retdirs, retfiles
