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