201 errMsg = "" |
201 errMsg = "" |
202 ioEncoding = Preferences.getSystem("IOEncoding") |
202 ioEncoding = Preferences.getSystem("IOEncoding") |
203 |
203 |
204 process = QProcess() |
204 process = QProcess() |
205 process.start('hg', ['version']) |
205 process.start('hg', ['version']) |
206 procStarted = process.waitForStarted() |
206 procStarted = process.waitForStarted(5000) |
207 if procStarted: |
207 if procStarted: |
208 finished = process.waitForFinished(30000) |
208 finished = process.waitForFinished(30000) |
209 if finished and process.exitCode() == 0: |
209 if finished and process.exitCode() == 0: |
210 output = \ |
210 output = \ |
211 str(process.readAllStandardOutput(), ioEncoding, 'replace') |
211 str(process.readAllStandardOutput(), ioEncoding, 'replace') |
1037 output = "" |
1037 output = "" |
1038 if self.__client is None: |
1038 if self.__client is None: |
1039 process = QProcess() |
1039 process = QProcess() |
1040 process.setWorkingDirectory(repodir) |
1040 process.setWorkingDirectory(repodir) |
1041 process.start('hg', args) |
1041 process.start('hg', args) |
1042 procStarted = process.waitForStarted() |
1042 procStarted = process.waitForStarted(5000) |
1043 if procStarted: |
1043 if procStarted: |
1044 finished = process.waitForFinished(30000) |
1044 finished = process.waitForFinished(30000) |
1045 if finished and process.exitCode() == 0: |
1045 if finished and process.exitCode() == 0: |
1046 output = \ |
1046 output = \ |
1047 str(process.readAllStandardOutput(), |
1047 str(process.readAllStandardOutput(), |
1106 output = "" |
1106 output = "" |
1107 if self.__client is None: |
1107 if self.__client is None: |
1108 process = QProcess() |
1108 process = QProcess() |
1109 process.setWorkingDirectory(dname) |
1109 process.setWorkingDirectory(dname) |
1110 process.start('hg', args) |
1110 process.start('hg', args) |
1111 procStarted = process.waitForStarted() |
1111 procStarted = process.waitForStarted(5000) |
1112 if procStarted: |
1112 if procStarted: |
1113 finished = process.waitForFinished(30000) |
1113 finished = process.waitForFinished(30000) |
1114 if finished and process.exitCode() == 0: |
1114 if finished and process.exitCode() == 0: |
1115 output = \ |
1115 output = \ |
1116 str(process.readAllStandardOutput(), |
1116 str(process.readAllStandardOutput(), |
1265 output = "" |
1265 output = "" |
1266 if self.__client is None: |
1266 if self.__client is None: |
1267 process = QProcess() |
1267 process = QProcess() |
1268 process.setWorkingDirectory(ppath) |
1268 process.setWorkingDirectory(ppath) |
1269 process.start('hg', args) |
1269 process.start('hg', args) |
1270 procStarted = process.waitForStarted() |
1270 procStarted = process.waitForStarted(5000) |
1271 if procStarted: |
1271 if procStarted: |
1272 finished = process.waitForFinished(30000) |
1272 finished = process.waitForFinished(30000) |
1273 if finished and process.exitCode() == 0: |
1273 if finished and process.exitCode() == 0: |
1274 output = str(process.readAllStandardOutput(), |
1274 output = str(process.readAllStandardOutput(), |
1275 Preferences.getSystem("IOEncoding"), 'replace') |
1275 Preferences.getSystem("IOEncoding"), 'replace') |
1313 |
1313 |
1314 output = "" |
1314 output = "" |
1315 if self.__client is None: |
1315 if self.__client is None: |
1316 process.setWorkingDirectory(ppath) |
1316 process.setWorkingDirectory(ppath) |
1317 process.start('hg', args) |
1317 process.start('hg', args) |
1318 procStarted = process.waitForStarted() |
1318 procStarted = process.waitForStarted(5000) |
1319 if procStarted: |
1319 if procStarted: |
1320 finished = process.waitForFinished(30000) |
1320 finished = process.waitForFinished(30000) |
1321 if finished and process.exitCode() == 0: |
1321 if finished and process.exitCode() == 0: |
1322 output = str(process.readAllStandardOutput(), |
1322 output = str(process.readAllStandardOutput(), |
1323 Preferences.getSystem("IOEncoding"), 'replace') |
1323 Preferences.getSystem("IOEncoding"), 'replace') |
1442 output = "" |
1442 output = "" |
1443 if self.__client is None: |
1443 if self.__client is None: |
1444 process = QProcess() |
1444 process = QProcess() |
1445 process.setWorkingDirectory(repodir) |
1445 process.setWorkingDirectory(repodir) |
1446 process.start('hg', args) |
1446 process.start('hg', args) |
1447 procStarted = process.waitForStarted() |
1447 procStarted = process.waitForStarted(5000) |
1448 if procStarted: |
1448 if procStarted: |
1449 finished = process.waitForFinished(30000) |
1449 finished = process.waitForFinished(30000) |
1450 if finished and process.exitCode() == 0: |
1450 if finished and process.exitCode() == 0: |
1451 output = \ |
1451 output = \ |
1452 str(process.readAllStandardOutput(), |
1452 str(process.readAllStandardOutput(), |
1484 output = "" |
1484 output = "" |
1485 if self.__client is None: |
1485 if self.__client is None: |
1486 process = QProcess() |
1486 process = QProcess() |
1487 process.setWorkingDirectory(repodir) |
1487 process.setWorkingDirectory(repodir) |
1488 process.start('hg', args) |
1488 process.start('hg', args) |
1489 procStarted = process.waitForStarted() |
1489 procStarted = process.waitForStarted(5000) |
1490 if procStarted: |
1490 if procStarted: |
1491 finished = process.waitForFinished(30000) |
1491 finished = process.waitForFinished(30000) |
1492 if finished and process.exitCode() == 0: |
1492 if finished and process.exitCode() == 0: |
1493 output = \ |
1493 output = \ |
1494 str(process.readAllStandardOutput(), |
1494 str(process.readAllStandardOutput(), |
1756 return |
1756 return |
1757 |
1757 |
1758 process = QProcess() |
1758 process = QProcess() |
1759 process.setWorkingDirectory(repodir) |
1759 process.setWorkingDirectory(repodir) |
1760 process.start('hg', args) |
1760 process.start('hg', args) |
1761 procStarted = process.waitForStarted() |
1761 procStarted = process.waitForStarted(5000) |
1762 if procStarted: |
1762 if procStarted: |
1763 finished = process.waitForFinished(30000) |
1763 finished = process.waitForFinished(30000) |
1764 if finished and process.exitCode() == 0: |
1764 if finished and process.exitCode() == 0: |
1765 output = str(process.readAllStandardOutput(), |
1765 output = str(process.readAllStandardOutput(), |
1766 Preferences.getSystem("IOEncoding"), 'replace') |
1766 Preferences.getSystem("IOEncoding"), 'replace') |
1908 from .HgUtilities import getConfigPath |
1908 from .HgUtilities import getConfigPath |
1909 cfgFile = getConfigPath() |
1909 cfgFile = getConfigPath() |
1910 if not os.path.exists(cfgFile): |
1910 if not os.path.exists(cfgFile): |
1911 try: |
1911 try: |
1912 f = open(cfgFile, "w") |
1912 f = open(cfgFile, "w") |
|
1913 f.write("[ui]\nusername = Firstname Lastname <email_address>\n") |
1913 f.close() |
1914 f.close() |
1914 except (IOError, OSError): |
1915 except (IOError, OSError): |
1915 # ignore these |
1916 # ignore these |
1916 pass |
1917 pass |
1917 self.userEditor = MiniEditor(cfgFile, "Properties") |
1918 self.userEditor = MiniEditor(cfgFile, "Properties") |
2903 |
2904 |
2904 output = "" |
2905 output = "" |
2905 if self.__client is None: |
2906 if self.__client is None: |
2906 process = QProcess() |
2907 process = QProcess() |
2907 process.start('hg', args) |
2908 process.start('hg', args) |
2908 procStarted = process.waitForStarted() |
2909 procStarted = process.waitForStarted(5000) |
2909 if procStarted: |
2910 if procStarted: |
2910 finished = process.waitForFinished(30000) |
2911 finished = process.waitForFinished(30000) |
2911 if finished and process.exitCode() == 0: |
2912 if finished and process.exitCode() == 0: |
2912 output = str(process.readAllStandardOutput(), |
2913 output = str(process.readAllStandardOutput(), |
2913 Preferences.getSystem("IOEncoding"), 'replace') |
2914 Preferences.getSystem("IOEncoding"), 'replace') |