# HG changeset patch # User Chris Cannam # Date 1294847197 0 # Node ID f32465eba05544d37edcf7ab2f74c6cad59db738 # Parent a574b89bfddd14bc914e5b8dde3545f4bf625039# Parent f649f6066e4dbf876d2ffd764d9cbf8801700739 Merge diff -r f649f6066e4d -r f32465eba055 easyhg.py --- a/easyhg.py Wed Jan 12 15:02:11 2011 +0000 +++ b/easyhg.py Wed Jan 12 15:46:37 2011 +0000 @@ -55,8 +55,15 @@ return default if msg == _('user:'): msg = _('User:') - (r,ok) = QtGui.QInputDialog.getText(None, _('Information needed'), - msg, QtGui.QLineEdit.Normal) + d = QtGui.QInputDialog() + d.setInputMode(QtGui.QInputDialog.TextInput) + d.setTextEchoMode(QtGui.QLineEdit.Normal) + d.setLabelText(prompt) + d.setWindowTitle(_('EasyMercurial: Information')) + d.show() + d.raise_() + ok = d.exec_() + r = d.textValue() if not ok: raise util.Abort(_('response expected')) if not r: @@ -68,8 +75,15 @@ return default if not prompt or prompt == _('password:'): prompt = _('Password:'); - (r,ok) = QtGui.QInputDialog.getText(None, _('Password'), prompt, - QtGui.QLineEdit.Password) + d = QtGui.QInputDialog() + d.setInputMode(QtGui.QInputDialog.TextInput) + d.setTextEchoMode(QtGui.QLineEdit.Password) + d.setLabelText(prompt) + d.setWindowTitle(_('EasyMercurial: Password')) + d.show() + d.raise_() + ok = d.exec_() + r = d.textValue() if not ok: raise util.Abort(_('response expected')) if not r: diff -r f649f6066e4d -r f32465eba055 hgrunner.cpp --- a/hgrunner.cpp Wed Jan 12 15:02:11 2011 +0000 +++ b/hgrunner.cpp Wed Jan 12 15:46:37 2011 +0000 @@ -381,6 +381,9 @@ bool interactive = false; QStringList params = action.params; + QSettings settings; + settings.beginGroup("General"); + if (executable == "") { // This is a Hg command executable = getHgBinaryName(); @@ -389,8 +392,6 @@ params.push_front("ui.interactive=true"); params.push_front("--config"); - QSettings settings; - settings.beginGroup("General"); if (settings.value("useextension", true).toBool()) { QString extpath = getExtensionLocation(); params.push_front(QString("extensions.easyhg=%1").arg(extpath)); @@ -415,11 +416,20 @@ QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); #ifdef Q_OS_WIN32 + // On Win32 we like to bundle Hg and other executables with EasyHg if (m_myDirPath != "") { env.insert("PATH", m_myDirPath + ";" + env.value("PATH")); } #endif +#ifdef Q_OS_MAC + // On OS/X 10.6, Python is 64-bit by default but our Hg extension + // is only available in 32-bit + if (settings.value("python32", true).toBool()) { + env.insert("VERSIONER_PYTHON_PREFER_32_BIT", 1); + } +#endif + env.insert("LANG", "en_US.utf8"); env.insert("LC_ALL", "en_US.utf8"); env.insert("HGPLAIN", "1");