--- 	Wed Feb 18 10:10:13 2004
+++ 	Wed Feb 18 12:17:34 2004
@@ -440,6 +440,8 @@
 def GetInfoCache(startproj) :
     InfoCache = []
     SubProj   = [startproj]
+    DelProj   = []
+    RecProj   = []
     while len(SubProj) :
         ThisProj = SubProj.pop(0)
         user_pass = ''
@@ -529,17 +531,36 @@
                 else : path = parent
                 # if the filename starts with a $, it's a new path we created
                 if len(filename) > 0 and filename[0] == '$' :
+                    projectname = parent + '/' + filename[1:]
                     if action == 'added' :
-                        filename = filename[1:]
-                        SubProj.append(parent + '/' + filename)
+                        # Only add it if it has not been deleted afterwards.
+                        if projectname not in DelProj:
+                            SubProj.append(projectname)
                         continue
                         action = 'diradded'
                     # Handle directory moving.  We get an entry for both the
                     # from and to directory. Skip one of them.
                     elif action[:10] == 'moved from' :
-                        filename = filename[1:]
-                        SubProj.append(parent + '/' + filename)
+                        SubProj.append(projectname)
                     elif action[:8] == 'moved to' :
+                        continue
+                    elif action[:7] == 'deleted' :
+                        if projectname not in RecProj : # Only append when not recovered later on.
+                            DelProj.append(projectname)
+                        else :
+                            RecProj.remove(projectname) # Lower recovery count.
+                        continue
+                    elif action[:6] == 'purged' :
+                        # This assumes that the 'deleted' action is seen before 'purged'
+                        continue
+                    elif action[:9] == 'recovered' :
+                        if projectname not in DelProj : # Only append when not deleted later on.
+                            RecProj.append(projectname)
+                        else :
+                            DelProj.remove(projectname) # Lower deleted count.
+                        continue
+                    elif action[:9] == 'destroyed' :
+                        DelProj.append(projectname)
                         continue
                     else :
                         raise RuntimeError('action %s not handled' % action)
