Bug #257660 - Handle directories that are unlisted in Entries, which is normal
authorZac Medico <zmedico@gentoo.org>
Sat, 12 Sep 2009 01:36:28 +0000 (01:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 12 Sep 2009 01:36:28 +0000 (01:36 -0000)
when checked out without -P. Thanks to Christian Ruppert <idl0r@gentoo.org>
for this patch.

svn path=/main/trunk/; revision=14222

pym/portage/cvstree.py

index a35c5fcf11e875cc662007c85c2be62427680cda..0fd2a54c5d2b1ac844db9887578ad607ddb76c08 100644 (file)
@@ -252,7 +252,11 @@ def getentries(mydir,recursive=0):
                        print mydir,file
                if os.path.isdir(mydir+"/"+file):
                        if file not in entries["dirs"]:
-                               entries["dirs"][file]={"dirs":{},"files":{}}
+                               # It's normal for a directory to be unlisted in Entries
+                               # when checked out without -P (see bug #257660).
+                               rentries=getentries(mydir+"/"+file,recursive)
+                               entries["dirs"][file]["dirs"]=rentries["dirs"]
+                               entries["dirs"][file]["files"]=rentries["files"]
                        if "status" in entries["dirs"][file]:
                                if "exists" not in entries["dirs"][file]["status"]:
                                        entries["dirs"][file]["status"]+=["exists"]