Mercurial > hg > easyhg
changeset 259:f32465eba055
Merge
author | Chris Cannam |
---|---|
date | Wed, 12 Jan 2011 15:46:37 +0000 |
parents | a574b89bfddd (diff) f649f6066e4d (current diff) |
children | 7057a4dcac3e 0dbfea0099ca |
files | |
diffstat | 2 files changed, 30 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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:
--- 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");