Mercurial > hg > easyhg
comparison hgrunner.cpp @ 257:4adccef8964d
* Explicitly request 32-bit Python on OS/X 10.6
author | Chris Cannam |
---|---|
date | Wed, 12 Jan 2011 15:46:05 +0000 |
parents | 8fd71f570884 |
children | 0dbfea0099ca |
comparison
equal
deleted
inserted
replaced
255:12df2232e40a | 257:4adccef8964d |
---|---|
379 { | 379 { |
380 QString executable = action.executable; | 380 QString executable = action.executable; |
381 bool interactive = false; | 381 bool interactive = false; |
382 QStringList params = action.params; | 382 QStringList params = action.params; |
383 | 383 |
384 QSettings settings; | |
385 settings.beginGroup("General"); | |
386 | |
384 if (executable == "") { | 387 if (executable == "") { |
385 // This is a Hg command | 388 // This is a Hg command |
386 executable = getHgBinaryName(); | 389 executable = getHgBinaryName(); |
387 | 390 |
388 if (action.mayBeInteractive()) { | 391 if (action.mayBeInteractive()) { |
389 params.push_front("ui.interactive=true"); | 392 params.push_front("ui.interactive=true"); |
390 params.push_front("--config"); | 393 params.push_front("--config"); |
391 | 394 |
392 QSettings settings; | |
393 settings.beginGroup("General"); | |
394 if (settings.value("useextension", true).toBool()) { | 395 if (settings.value("useextension", true).toBool()) { |
395 QString extpath = getExtensionLocation(); | 396 QString extpath = getExtensionLocation(); |
396 params.push_front(QString("extensions.easyhg=%1").arg(extpath)); | 397 params.push_front(QString("extensions.easyhg=%1").arg(extpath)); |
397 params.push_front("--config"); | 398 params.push_front("--config"); |
398 } | 399 } |
413 m_proc = new QProcess; | 414 m_proc = new QProcess; |
414 | 415 |
415 QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); | 416 QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); |
416 | 417 |
417 #ifdef Q_OS_WIN32 | 418 #ifdef Q_OS_WIN32 |
419 // On Win32 we like to bundle Hg and other executables with EasyHg | |
418 if (m_myDirPath != "") { | 420 if (m_myDirPath != "") { |
419 env.insert("PATH", m_myDirPath + ";" + env.value("PATH")); | 421 env.insert("PATH", m_myDirPath + ";" + env.value("PATH")); |
422 } | |
423 #endif | |
424 | |
425 #ifdef Q_OS_MAC | |
426 // On OS/X 10.6, Python is 64-bit by default but our Hg extension | |
427 // is only available in 32-bit | |
428 if (settings.value("python32", true).toBool()) { | |
429 env.insert("VERSIONER_PYTHON_PREFER_32_BIT", 1); | |
420 } | 430 } |
421 #endif | 431 #endif |
422 | 432 |
423 env.insert("LANG", "en_US.utf8"); | 433 env.insert("LANG", "en_US.utf8"); |
424 env.insert("LC_ALL", "en_US.utf8"); | 434 env.insert("LC_ALL", "en_US.utf8"); |