Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 192
2c1187ab98ce
parent 191
dccb19a7c52e
child 194
4820fc69705c
diff -r dccb19a7c52e -r 2c1187ab98ce Plugins/VcsPlugins/vcsMercurial/hg.py
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py	Tue Apr 20 19:50:37 2010 +0000
+++ b/Plugins/VcsPlugins/vcsMercurial/hg.py	Thu Apr 22 14:33:39 2010 +0000
@@ -837,13 +837,13 @@
         
         found = False
         for name in list(self.statusCache.keys()):
-            if os.path.dirname(name) == dname:
-                if shortcut:
-                    found = True
-                    break
-                if name in names:
-                    found = True
-                    names[name] = self.statusCache[name]
+##            if os.path.dirname(name) == dname:
+##                if shortcut:
+##                    found = True
+##                    break
+            if name in names:
+                found = True
+                names[name] = self.statusCache[name]
         
         if not found:
             # find the root of the repo
@@ -870,27 +870,31 @@
                         str(process.readAllStandardOutput(), ioEncoding, 'replace')
                     for line in output.splitlines():
                         flag, path = line.split(" ", 1)
-                        name = os.path.join(repodir, os.path.normcase(path))
+                        name = os.path.join(repodir, os.path.normcase(path))
+                        dirName = os.path.dirname(name)
                         if name.startswith(dname):
                             if flag not in "?I":
                                 if name in names:
                                     names[name] = self.canBeCommitted
-                                dirName = os.path.dirname(name)
+##                                dirName = os.path.dirname(name)
                                 if dirName in names:
                                     names[dirName] = self.canBeCommitted
-                                self.statusCache[name] = self.canBeCommitted
-                                self.statusCache[dirName] = self.canBeCommitted
+##                                self.statusCache[name] = self.canBeCommitted
+##                                self.statusCache[dirName] = self.canBeCommitted
                                 if dirs:
                                     for d in dirs:
                                         if name.startswith(d):
                                             names[d] = self.canBeCommitted
                                             dirs.remove(d)
                                             break
-                            else:
-                                self.statusCache[name] = self.canBeAdded
-                                dirName = os.path.dirname(name)
-                                if dirName not in self.statusCache:
-                                    self.statusCache[dirName] = self.canBeAdded
+                        if flag not in "?I":
+                            self.statusCache[name] = self.canBeCommitted
+                            self.statusCache[dirName] = self.canBeCommitted
+                        else:
+                            self.statusCache[name] = self.canBeAdded
+##                            dirName = os.path.dirname(name)
+                            if dirName not in self.statusCache:
+                                self.statusCache[dirName] = self.canBeAdded
         
         return names
     

eric ide

mercurial