782 dname, fname = self.splitPath(name) |
782 dname, fname = self.splitPath(name) |
783 |
783 |
784 if fname == '.' and os.path.isdir(os.path.join(dname, self.adminDir)): |
784 if fname == '.' and os.path.isdir(os.path.join(dname, self.adminDir)): |
785 return self.canBeCommitted |
785 return self.canBeCommitted |
786 |
786 |
|
787 if name in self.statusCache: |
|
788 return self.statusCache[name] |
|
789 |
787 # find the root of the repo |
790 # find the root of the repo |
788 repodir = dname |
791 repodir = dname |
789 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
792 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
790 repodir = os.path.dirname(repodir) |
793 repodir = os.path.dirname(repodir) |
791 if repodir == os.sep: |
794 if repodir == os.sep: |
874 dirName = os.path.dirname(name) |
873 dirName = os.path.dirname(name) |
875 if name.startswith(dname): |
874 if name.startswith(dname): |
876 if flag not in "?I": |
875 if flag not in "?I": |
877 if name in names: |
876 if name in names: |
878 names[name] = self.canBeCommitted |
877 names[name] = self.canBeCommitted |
879 ## dirName = os.path.dirname(name) |
|
880 if dirName in names: |
878 if dirName in names: |
881 names[dirName] = self.canBeCommitted |
879 names[dirName] = self.canBeCommitted |
882 ## self.statusCache[name] = self.canBeCommitted |
|
883 ## self.statusCache[dirName] = self.canBeCommitted |
|
884 if dirs: |
880 if dirs: |
885 for d in dirs: |
881 for d in dirs: |
886 if name.startswith(d): |
882 if name.startswith(d): |
887 names[d] = self.canBeCommitted |
883 names[d] = self.canBeCommitted |
888 dirs.remove(d) |
884 dirs.remove(d) |
890 if flag not in "?I": |
886 if flag not in "?I": |
891 self.statusCache[name] = self.canBeCommitted |
887 self.statusCache[name] = self.canBeCommitted |
892 self.statusCache[dirName] = self.canBeCommitted |
888 self.statusCache[dirName] = self.canBeCommitted |
893 else: |
889 else: |
894 self.statusCache[name] = self.canBeAdded |
890 self.statusCache[name] = self.canBeAdded |
895 ## dirName = os.path.dirname(name) |
|
896 if dirName not in self.statusCache: |
891 if dirName not in self.statusCache: |
897 self.statusCache[dirName] = self.canBeAdded |
892 self.statusCache[dirName] = self.canBeAdded |
898 |
893 |
899 return names |
894 return names |
900 |
895 |