--- meld-1.3.1_orig/vc/svn.py	2009-10-06 17:59:08.000000000 -0700
+++ meld-1.3.1/vc/svn.py	2009-10-12 10:37:49.000000000 -0700
@@ -44,10 +44,11 @@
         "C": _vc.STATE_CONFLICT,
     }
 
-    re_status_moved = re.compile(r'^(A) +[+] +- +([?]) +[?] +([^ ].*)$')
-    re_status_vc = re.compile(r'^(.) +\d+ +(\?|(?:\d+)) +[^ ]+ +([^ ].*)$')
-    re_status_non_vc = re.compile(r'^([?]) +([^ ].*)$')
-    re_status_tree_conflict = re.compile(r'^ +> +.*')
+    re_status_entry_open = re.compile(r'<entry')
+    re_status_entry_close = re.compile(r'</entry>')
+    re_status_get_rev = re.compile(r'revision="(.*)"')
+    re_status_get_item = re.compile(r'item="(.*)"')
+    re_status_get_path = re.compile(r'path="(.*)"')
 
     def commit_command(self, message):
         return [self.CMD,"commit","-m",message]
@@ -69,7 +70,7 @@
 
         while 1:
             try:
-                entries = _vc.popen([self.CMD, "status", "-Nv", directory])
+                entries = _vc.popen([self.CMD, "status", "-Nv", "--xml", directory])
                 break
             except OSError, e:
                 if e.errno != errno.EAGAIN:
@@ -77,29 +78,62 @@
 
         matches = []
 
+        inEntry = False
+        rev = ""
+        item = ""
+        path = ""
+        item_char = ""
         for line in entries:
             # svn-1.6.x changed 'status' command output
             # adding tree-conflict lines, c.f.:
             # http://subversion.tigris.org/svn_1.6_releasenotes.html
-            m = self.re_status_tree_conflict.match(line)
-            if m:
-                # skip this line
-                continue
-            # A svn moved file
-            m = self.re_status_moved.match(line)
-            if m:
-                matches.append((m.group(3), m.group(1), m.group(2)))
-                continue
-            # A svn controlled file
-            m = self.re_status_vc.match(line)
-            if m:
-                matches.append((m.group(3), m.group(1), m.group(2)))
-                continue
-            # A new file, unknown to svn
-            m = self.re_status_non_vc.match(line)
-            if m:
-                matches.append((m.group(2), m.group(1), ""))
-                continue
+            if not inEntry:
+                # check if we have the start of an xml entry
+                if self.re_status_entry_open.search(line):
+                    inEntry = True
+                else:
+                    continue
+            else:
+                # check if we are done with this entry
+                if self.re_status_entry_close.search(line):
+                    inEntry = False
+                    # check for complete entry details
+                    if item == "" or path == "" or item == "conflicted":
+                        continue
+                    else:
+                        if item == "normal":
+                            item_char = " "
+                        elif item == "added":
+                            item_char = "A"
+                        elif item == "deleted":
+                            item_char = "D"
+                        elif item == "modified":
+                            item_char = "M"
+                        elif item == "unversioned":
+                            item_char = "?"
+                        elif item == "missing":
+                            item_char = "!"
+                        # append entry to matches
+                        if item_char == "":
+                            print "Missing item data: item = %s, path = %s, line = %s\n", item, path, line
+                        else:
+                            matches.append((path, item_char, rev))
+
+                    # clear variables for next entry
+                    rev = ""
+                    item = ""
+                    path = ""
+                else:
+                    # continue to gather entry details
+                    m = self.re_status_get_rev.search(line)
+                    if m:
+                        rev = m.group(1)
+                    m = self.re_status_get_item.search(line)
+                    if m:
+                        item = m.group(1)
+                    m = self.re_status_get_path.search(line)
+                    if m:
+                        path = m.group(1)
 
         matches.sort()
         return matches
