1185 else: |
1185 else: |
1186 output, error = self.__client.runcommand(args) |
1186 output, error = self.__client.runcommand(args) |
1187 |
1187 |
1188 if output: |
1188 if output: |
1189 for line in output.splitlines(): |
1189 for line in output.splitlines(): |
1190 flag, path = line.split(" ", 1) |
1190 if line and line[0] in "MARC!?I": |
1191 absname = os.path.join(repodir, os.path.normcase(path)) |
1191 flag, path = line.split(" ", 1) |
1192 if flag not in "?I": |
1192 absname = os.path.join(repodir, os.path.normcase(path)) |
1193 if fname == '.': |
1193 if flag not in "?I": |
1194 if absname.startswith(dname + os.path.sep): |
1194 if fname == '.': |
1195 return self.canBeCommitted |
1195 if absname.startswith(dname + os.path.sep): |
1196 if absname == dname: |
1196 return self.canBeCommitted |
1197 return self.canBeCommitted |
1197 if absname == dname: |
1198 else: |
1198 return self.canBeCommitted |
1199 if absname == name: |
1199 else: |
1200 return self.canBeCommitted |
1200 if absname == name: |
|
1201 return self.canBeCommitted |
1201 |
1202 |
1202 return self.canBeAdded |
1203 return self.canBeAdded |
1203 |
1204 |
1204 def vcsAllRegisteredStates(self, names, dname, shortcut=True): |
1205 def vcsAllRegisteredStates(self, names, dname, shortcut=True): |
1205 """ |
1206 """ |
1253 output, error = self.__client.runcommand(args) |
1254 output, error = self.__client.runcommand(args) |
1254 |
1255 |
1255 if output: |
1256 if output: |
1256 dirs = [x for x in names.keys() if os.path.isdir(x)] |
1257 dirs = [x for x in names.keys() if os.path.isdir(x)] |
1257 for line in output.splitlines(): |
1258 for line in output.splitlines(): |
1258 flag, path = line.split(" ", 1) |
1259 if line and line[0] in "MARC!?I": |
1259 name = os.path.normcase(os.path.join(repodir, path)) |
1260 flag, path = line.split(" ", 1) |
1260 dirName = os.path.dirname(name) |
1261 name = os.path.normcase(os.path.join(repodir, path)) |
1261 if name.startswith(dname): |
1262 dirName = os.path.dirname(name) |
|
1263 if name.startswith(dname): |
|
1264 if flag not in "?I": |
|
1265 if name in names: |
|
1266 names[name] = self.canBeCommitted |
|
1267 if dirName in names: |
|
1268 names[dirName] = self.canBeCommitted |
|
1269 if dirs: |
|
1270 for d in dirs: |
|
1271 if name.startswith(d): |
|
1272 names[d] = self.canBeCommitted |
|
1273 dirs.remove(d) |
|
1274 break |
1262 if flag not in "?I": |
1275 if flag not in "?I": |
1263 if name in names: |
1276 self.statusCache[name] = self.canBeCommitted |
1264 names[name] = self.canBeCommitted |
1277 self.statusCache[dirName] = self.canBeCommitted |
1265 if dirName in names: |
1278 else: |
1266 names[dirName] = self.canBeCommitted |
1279 self.statusCache[name] = self.canBeAdded |
1267 if dirs: |
1280 if dirName not in self.statusCache: |
1268 for d in dirs: |
1281 self.statusCache[dirName] = self.canBeAdded |
1269 if name.startswith(d): |
|
1270 names[d] = self.canBeCommitted |
|
1271 dirs.remove(d) |
|
1272 break |
|
1273 if flag not in "?I": |
|
1274 self.statusCache[name] = self.canBeCommitted |
|
1275 self.statusCache[dirName] = self.canBeCommitted |
|
1276 else: |
|
1277 self.statusCache[name] = self.canBeAdded |
|
1278 if dirName not in self.statusCache: |
|
1279 self.statusCache[dirName] = self.canBeAdded |
|
1280 |
1282 |
1281 return names |
1283 return names |
1282 |
1284 |
1283 def clearStatusCache(self): |
1285 def clearStatusCache(self): |
1284 """ |
1286 """ |