835 if dname.endswith(os.sep): |
835 if dname.endswith(os.sep): |
836 dname = dname[:-1] |
836 dname = dname[:-1] |
837 |
837 |
838 found = False |
838 found = False |
839 for name in list(self.statusCache.keys()): |
839 for name in list(self.statusCache.keys()): |
840 if os.path.dirname(name) == dname: |
840 ## if os.path.dirname(name) == dname: |
841 if shortcut: |
841 ## if shortcut: |
842 found = True |
842 ## found = True |
843 break |
843 ## break |
844 if name in names: |
844 if name in names: |
845 found = True |
845 found = True |
846 names[name] = self.statusCache[name] |
846 names[name] = self.statusCache[name] |
847 |
847 |
848 if not found: |
848 if not found: |
849 # find the root of the repo |
849 # find the root of the repo |
850 repodir = dname |
850 repodir = dname |
851 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
851 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
869 output = \ |
869 output = \ |
870 str(process.readAllStandardOutput(), ioEncoding, 'replace') |
870 str(process.readAllStandardOutput(), ioEncoding, 'replace') |
871 for line in output.splitlines(): |
871 for line in output.splitlines(): |
872 flag, path = line.split(" ", 1) |
872 flag, path = line.split(" ", 1) |
873 name = os.path.join(repodir, os.path.normcase(path)) |
873 name = os.path.join(repodir, os.path.normcase(path)) |
|
874 dirName = os.path.dirname(name) |
874 if name.startswith(dname): |
875 if name.startswith(dname): |
875 if flag not in "?I": |
876 if flag not in "?I": |
876 if name in names: |
877 if name in names: |
877 names[name] = self.canBeCommitted |
878 names[name] = self.canBeCommitted |
878 dirName = os.path.dirname(name) |
879 ## dirName = os.path.dirname(name) |
879 if dirName in names: |
880 if dirName in names: |
880 names[dirName] = self.canBeCommitted |
881 names[dirName] = self.canBeCommitted |
881 self.statusCache[name] = self.canBeCommitted |
882 ## self.statusCache[name] = self.canBeCommitted |
882 self.statusCache[dirName] = self.canBeCommitted |
883 ## self.statusCache[dirName] = self.canBeCommitted |
883 if dirs: |
884 if dirs: |
884 for d in dirs: |
885 for d in dirs: |
885 if name.startswith(d): |
886 if name.startswith(d): |
886 names[d] = self.canBeCommitted |
887 names[d] = self.canBeCommitted |
887 dirs.remove(d) |
888 dirs.remove(d) |
888 break |
889 break |
889 else: |
890 if flag not in "?I": |
890 self.statusCache[name] = self.canBeAdded |
891 self.statusCache[name] = self.canBeCommitted |
891 dirName = os.path.dirname(name) |
892 self.statusCache[dirName] = self.canBeCommitted |
892 if dirName not in self.statusCache: |
893 else: |
893 self.statusCache[dirName] = self.canBeAdded |
894 self.statusCache[name] = self.canBeAdded |
|
895 ## dirName = os.path.dirname(name) |
|
896 if dirName not in self.statusCache: |
|
897 self.statusCache[dirName] = self.canBeAdded |
894 |
898 |
895 return names |
899 return names |
896 |
900 |
897 def clearStatusCache(self): |
901 def clearStatusCache(self): |
898 """ |
902 """ |