eric7/Plugins/VcsPlugins/vcsMercurial/HgStatusMonitorThread.py

branch
eric7
changeset 8620
84f7f7867b5f
parent 8618
356a2f1b04b0
child 8881
54e42bc2437a
equal deleted inserted replaced
8619:2dc55ddafc68 8620:84f7f7867b5f
40 <li>"M" path has local changes</li> 40 <li>"M" path has local changes</li>
41 <li>"O" path was removed</li> 41 <li>"O" path was removed</li>
42 <li>"R" path was deleted and then re-added</li> 42 <li>"R" path was deleted and then re-added</li>
43 <li>"U" path needs an update</li> 43 <li>"U" path needs an update</li>
44 <li>"Z" path contains a conflict</li> 44 <li>"Z" path contains a conflict</li>
45 <li>"?" path is not tracked</li>
46 <li>"!" path is missing</li>
45 <li>" " path is back at normal</li> 47 <li>" " path is back at normal</li>
46 </ul> 48 </ul>
47 49
48 @return tuple of flag indicating successful operation and a status 50 @return tuple of flag indicating successful operation and a status
49 message in case of non successful operation 51 message in case of non successful operation
57 59
58 # step 1: get overall status 60 # step 1: get overall status
59 args = self.vcs.initCommand("status") 61 args = self.vcs.initCommand("status")
60 args.append('--noninteractive') 62 args.append('--noninteractive')
61 args.append('--all') 63 args.append('--all')
64 if self.vcs.hasSubrepositories():
65 args.append("--subrepos")
62 66
63 output, error = self.__client.runcommand(args) 67 output, error = self.__client.runcommand(args)
64 68
65 if error: 69 if error:
66 return False, error 70 return False, error
67 71
68 states = {} 72 states = {}
69 for line in output.splitlines(): 73 for line in output.splitlines():
70 if not line.startswith(" "): 74 if not line.startswith(" "):
71 flag, name = line.split(" ", 1) 75 flag, name = line.split(" ", 1)
72 if flag in "AMR": 76 if flag in "AMR?!":
73 if flag == "R": 77 if flag == "R":
74 status = "O" 78 status = "O"
75 else: 79 else:
76 status = flag 80 status = flag
77 states[name] = status 81 states[name] = status

eric ide

mercurial