87 process.start('hg', args) |
87 process.start('hg', args) |
88 procStarted = process.waitForStarted(5000) |
88 procStarted = process.waitForStarted(5000) |
89 if procStarted: |
89 if procStarted: |
90 finished = process.waitForFinished(300000) |
90 finished = process.waitForFinished(300000) |
91 if finished and process.exitCode() == 0: |
91 if finished and process.exitCode() == 0: |
92 output = \ |
92 output = str(process.readAllStandardOutput(), |
93 str(process.readAllStandardOutput(), self.__ioEncoding, 'replace') |
93 self.__ioEncoding, 'replace') |
94 else: |
94 else: |
95 process.kill() |
95 process.kill() |
96 process.waitForFinished() |
96 process.waitForFinished() |
97 error = \ |
97 error = str(process.readAllStandardError(), |
98 str(process.readAllStandardError(), self.__ioEncoding, 'replace') |
98 self.__ioEncoding, 'replace') |
99 else: |
99 else: |
100 process.kill() |
100 process.kill() |
101 process.waitForFinished() |
101 process.waitForFinished() |
102 error = self.trUtf8("Could not start the Mercurial process.") |
102 error = self.trUtf8("Could not start the Mercurial process.") |
103 |
103 |
130 procStarted = process.waitForStarted(5000) |
130 procStarted = process.waitForStarted(5000) |
131 if procStarted: |
131 if procStarted: |
132 finished = process.waitForFinished(300000) |
132 finished = process.waitForFinished(300000) |
133 if finished and process.exitCode() == 0: |
133 if finished and process.exitCode() == 0: |
134 output = str( |
134 output = str( |
135 process.readAllStandardOutput(), self.__ioEncoding, 'replace') |
135 process.readAllStandardOutput(), |
|
136 self.__ioEncoding, 'replace') |
136 |
137 |
137 for line in output.splitlines(): |
138 for line in output.splitlines(): |
138 flag, name = line.split(" ", 1) |
139 flag, name = line.split(" ", 1) |
139 if flag == "U": |
140 if flag == "U": |
140 states[name] = "Z" # conflict |
141 states[name] = "Z" # conflict |
141 |
142 |
142 # step 3: collect the status to be reported back |
143 # step 3: collect the status to be reported back |
143 for name in states: |
144 for name in states: |
144 try: |
145 try: |
145 if self.reportedStates[name] != states[name]: |
146 if self.reportedStates[name] != states[name]: |
146 self.statusList.append("{0} {1}".format(states[name], name)) |
147 self.statusList.append( |
|
148 "{0} {1}".format(states[name], name)) |
147 except KeyError: |
149 except KeyError: |
148 self.statusList.append("{0} {1}".format(states[name], name)) |
150 self.statusList.append("{0} {1}".format(states[name], name)) |
149 for name in self.reportedStates.keys(): |
151 for name in self.reportedStates.keys(): |
150 if name not in states: |
152 if name not in states: |
151 self.statusList.append(" {0}".format(name)) |
153 self.statusList.append(" {0}".format(name)) |