668 self.statusCache[os.path.normcase(d)] == self.canBeAdded): |
668 self.statusCache[os.path.normcase(d)] == self.canBeAdded): |
669 tree.append(d) |
669 tree.append(d) |
670 d = os.path.dirname(d) |
670 d = os.path.dirname(d) |
671 else: |
671 else: |
672 while not os.path.exists(os.path.join(d, self.adminDir)): |
672 while not os.path.exists(os.path.join(d, self.adminDir)): |
673 # add directories recursively, |
673 # add directories recursively, |
674 # if they aren't in the repository already |
674 # if they aren't in the repository already |
675 if d in tree: |
675 if d in tree: |
676 break |
676 break |
677 tree.append(d) |
677 tree.append(d) |
678 d = os.path.dirname(d) |
678 d = os.path.dirname(d) |
1130 |
1130 |
1131 if name in self.statusCache: |
1131 if name in self.statusCache: |
1132 return self.statusCache[name] |
1132 return self.statusCache[name] |
1133 |
1133 |
1134 name = os.path.normcase(name) |
1134 name = os.path.normcase(name) |
1135 states = { name : 0 } |
1135 states = {name: 0} |
1136 states = self.vcsAllRegisteredStates(states, dname, False) |
1136 states = self.vcsAllRegisteredStates(states, dname, False) |
1137 if states[name] == self.canBeCommitted: |
1137 if states[name] == self.canBeCommitted: |
1138 return self.canBeCommitted |
1138 return self.canBeCommitted |
1139 else: |
1139 else: |
1140 return self.canBeAdded |
1140 return self.canBeAdded |
1182 if self.__wcng: |
1182 if self.__wcng: |
1183 return self.__vcsAllRegisteredStates_wcng(names, dname, shortcut) |
1183 return self.__vcsAllRegisteredStates_wcng(names, dname, shortcut) |
1184 else: |
1184 else: |
1185 return self.__vcsAllRegisteredStates_wc(names, dname, shortcut) |
1185 return self.__vcsAllRegisteredStates_wc(names, dname, shortcut) |
1186 |
1186 |
1187 def __vcsAllRegisteredStates_wcng(self, names, dname, shortcut = True): |
1187 def __vcsAllRegisteredStates_wcng(self, names, dname, shortcut=True): |
1188 """ |
1188 """ |
1189 Private method used to get the registered states of a number of files in the vcs. |
1189 Private method used to get the registered states of a number of files in the vcs. |
1190 |
1190 |
1191 This is the variant for subversion installations using the new working copy |
1191 This is the variant for subversion installations using the new working copy |
1192 meta-data format. |
1192 meta-data format. |
1196 all files has been populated by the previous run. |
1196 all files has been populated by the previous run. |
1197 |
1197 |
1198 @param names dictionary with all filenames to be checked as keys |
1198 @param names dictionary with all filenames to be checked as keys |
1199 @param dname directory to check in (string) |
1199 @param dname directory to check in (string) |
1200 @param shortcut flag indicating a shortcut should be taken (boolean) |
1200 @param shortcut flag indicating a shortcut should be taken (boolean) |
1201 @return the received dictionary completed with a combination of |
1201 @return the received dictionary completed with a combination of |
1202 canBeCommited and canBeAdded or None in order to signal an error |
1202 canBeCommited and canBeAdded or None in order to signal an error |
1203 """ |
1203 """ |
1204 if dname.endswith(os.sep): |
1204 if dname.endswith(os.sep): |
1205 dname = dname[:-1] |
1205 dname = dname[:-1] |
1206 dname = os.path.normcase(dname) |
1206 dname = os.path.normcase(dname) |
1250 else: |
1250 else: |
1251 self.statusCache[name] = self.canBeAdded |
1251 self.statusCache[name] = self.canBeAdded |
1252 |
1252 |
1253 return names |
1253 return names |
1254 |
1254 |
1255 def __vcsAllRegisteredStates_wc(self, names, dname, shortcut = True): |
1255 def __vcsAllRegisteredStates_wc(self, names, dname, shortcut=True): |
1256 """ |
1256 """ |
1257 Private method used to get the registered states of a number of files in the vcs. |
1257 Private method used to get the registered states of a number of files in the vcs. |
1258 |
1258 |
1259 This is the variant for subversion installations using the old working copy |
1259 This is the variant for subversion installations using the old working copy |
1260 meta-data format. |
1260 meta-data format. |
1264 all files has been populated by the previous run. |
1264 all files has been populated by the previous run. |
1265 |
1265 |
1266 @param names dictionary with all filenames to be checked as keys |
1266 @param names dictionary with all filenames to be checked as keys |
1267 @param dname directory to check in (string) |
1267 @param dname directory to check in (string) |
1268 @param shortcut flag indicating a shortcut should be taken (boolean) |
1268 @param shortcut flag indicating a shortcut should be taken (boolean) |
1269 @return the received dictionary completed with a combination of |
1269 @return the received dictionary completed with a combination of |
1270 canBeCommited and canBeAdded or None in order to signal an error |
1270 canBeCommited and canBeAdded or None in order to signal an error |
1271 """ |
1271 """ |
1272 if not os.path.isdir(os.path.join(dname, self.adminDir)): |
1272 if not os.path.isdir(os.path.join(dname, self.adminDir)): |
1273 # not under version control -> do nothing |
1273 # not under version control -> do nothing |
1274 return names |
1274 return names |